Skip to content

Commit 1c88400

Browse files
committed
🤖 fix: send terminal IPC events to correct window
The TERMINAL_CREATE handler was hardcoded to send events to mainWindow, but terminal windows are separate BrowserWindows that call terminal.create(). This caused terminal output to be sent to the main app window instead of the terminal window, resulting in a blank/blinking cursor with no prompt. Fix: Use BrowserWindow.fromWebContents(event.sender) to get the actual window that made the IPC call, so events are routed correctly. Generated with `mux`
1 parent 74d3274 commit 1c88400

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/services/ipcMain.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,8 +1479,7 @@ export class IpcMain {
14791479
ipcMain.handle(IPC_CHANNELS.TERMINAL_CREATE, async (event, params: TerminalCreateParams) => {
14801480
try {
14811481
// Get the window that requested this terminal
1482-
// For now, all terminals use the main window (pop-out windows not yet implemented)
1483-
const senderWindow = mainWindow;
1482+
const senderWindow = BrowserWindow.fromWebContents(event.sender);
14841483
if (!senderWindow) {
14851484
throw new Error("Could not find sender window for terminal creation");
14861485
}

0 commit comments

Comments
 (0)