Skip to content

Commit c89e5e6

Browse files
committed
feedback
1 parent fa9b465 commit c89e5e6

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/desktop/terminalWindowManager.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff 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}`);

0 commit comments

Comments
 (0)