File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 55 * Each workspace can have multiple terminal windows open simultaneously.
66 */
77
8- import { BrowserWindow } from "electron" ;
8+ import { app , BrowserWindow } from "electron" ;
99import * as path from "path" ;
1010import { log } from "@/node/services/log" ;
1111import type { Config } from "@/node/config" ;
@@ -71,16 +71,18 @@ export class TerminalWindowManager {
7171 } ) ;
7272
7373 // Load the terminal page
74- const isDev = ! process . env . NODE_ENV || process . env . NODE_ENV === "development" ;
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 ;
7577
76- if ( isDev ) {
78+ if ( useDevServer ) {
7779 // Development mode - load from Vite dev server
7880 await terminalWindow . loadURL (
7981 `http://localhost:5173/terminal.html?workspaceId=${ encodeURIComponent ( workspaceId ) } `
8082 ) ;
8183 terminalWindow . webContents . openDevTools ( ) ;
8284 } else {
83- // Production mode - load from built files
85+ // Production mode (or E2E dist mode) - load from built files
8486 await terminalWindow . loadFile ( path . join ( __dirname , "../terminal.html" ) , {
8587 query : { workspaceId } ,
8688 } ) ;
You can’t perform that action at this time.
0 commit comments