File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -71,18 +71,21 @@ export class TerminalWindowManager {
7171 } ) ;
7272
7373 // Load the terminal page
74- // app.isPackaged is true when running from a built .app/.exe, false in development
75- if ( app . isPackaged ) {
76- // Production mode - load from built files
77- await terminalWindow . loadFile ( path . join ( __dirname , "../terminal.html" ) , {
78- query : { workspaceId } ,
79- } ) ;
80- } else {
74+ // Match main window logic: use dev server unless packaged or MUX_E2E_LOAD_DIST=1
75+ const forceDistLoad = process . env . MUX_E2E_LOAD_DIST === "1" ;
76+ const useDevServer = ! app . isPackaged && ! forceDistLoad ;
77+
78+ if ( useDevServer ) {
8179 // Development mode - load from Vite dev server
8280 await terminalWindow . loadURL (
8381 `http://localhost:5173/terminal.html?workspaceId=${ encodeURIComponent ( workspaceId ) } `
8482 ) ;
8583 terminalWindow . webContents . openDevTools ( ) ;
84+ } else {
85+ // Production mode (or E2E dist mode) - load from built files
86+ await terminalWindow . loadFile ( path . join ( __dirname , "../terminal.html" ) , {
87+ query : { workspaceId } ,
88+ } ) ;
8689 }
8790
8891 log . info ( `Terminal window ${ windowId } opened for workspace: ${ workspaceId } ` ) ;
You can’t perform that action at this time.
0 commit comments