File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -303,26 +303,25 @@ async function main(): Promise<void> {
303303
304304 const root = createRoot ( renderer )
305305
306- // Add SIGWINCH listener for terminal resize support on Windows PowerShell
307- // This ensures the terminal UI updates when the window is resized
308- // The listener triggers a re-render to update the layout with new dimensions
306+ // React component tree to render
307+ const app = (
308+ < QueryClientProvider client = { queryClient} >
309+ < AppWithAsyncAuth / >
310+ < / QueryClientProvider >
311+ )
312+
313+ // Add resize event listener for terminal resize support on Windows PowerShell
314+ // On Windows, the SIGWINCH signal may not fire reliably, so we listen to
315+ // process.stdout 'resize' event to ensure the UI updates when the window is resized
309316 if ( process . stdout . isTTY ) {
310317 process . stdout . on ( 'resize' , ( ) => {
311318 // Re-render the React tree to update with new terminal dimensions
312- // This is necessary on Windows where SIGWINCH may not work reliably
313- root . render (
314- < QueryClientProvider client = { queryClient} >
315- < AppWithAsyncAuth / >
316- < / QueryClientProvider > ,
317- )
319+ root . render ( app )
318320 } )
319321 }
320322
321- root . render (
322- < QueryClientProvider client = { queryClient} >
323- < AppWithAsyncAuth / >
324- < / QueryClientProvider > ,
325- )
323+ // Initial render
324+ root . render ( app )
326325}
327326
328327void main ( )
You can’t perform that action at this time.
0 commit comments