From 1966d5435235282227a0d41ce234ffcb22c047b2 Mon Sep 17 00:00:00 2001 From: whitesockcat Date: Mon, 13 Apr 2026 20:00:46 +0800 Subject: [PATCH 1/2] fix: change sidebar toggle shortcut from Cmd+B to Cmd+Shift+B Cmd+B conflicts with common terminal keybindings (e.g. tmux prefix). Change the sidebar-files toggle to Cmd+Shift+B and update the menu accelerator and tooltip to match. Cmd+\ remains as an alternative. Co-Authored-By: Claude Opus 4.6 (1M context) --- collab-electron/src/main/index.ts | 4 ++-- collab-electron/src/windows/shell/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collab-electron/src/main/index.ts b/collab-electron/src/main/index.ts index 19e7d150..272f3c25 100644 --- a/collab-electron/src/main/index.ts +++ b/collab-electron/src/main/index.ts @@ -185,7 +185,7 @@ interface ShortcutEntry { const TOGGLE_SHORTCUTS: Record = { KeyB: [ { modifier: altCmdOrCtrl, action: "toggle-agent" }, - { modifier: cmdOrCtrl, action: "sidebar-files" }, + { modifier: shiftCmdOrCtrl, action: "sidebar-files" }, ], Backslash: [{ modifier: cmdOrCtrl, action: "sidebar-files" }], Comma: [{ modifier: cmdOrCtrl, action: "toggle-settings" }], @@ -377,7 +377,7 @@ function buildAppMenu(): void { submenu: [ { label: "Toggle Files", - accelerator: "CommandOrControl+B", + accelerator: "CommandOrControl+Shift+B", registerAccelerator: false, click: () => sendShortcut("sidebar-files"), }, diff --git a/collab-electron/src/windows/shell/index.html b/collab-electron/src/windows/shell/index.html index 4bde8e42..b3b0f1d3 100644 --- a/collab-electron/src/windows/shell/index.html +++ b/collab-electron/src/windows/shell/index.html @@ -15,7 +15,7 @@ id="alpha-dismiss" href="#">[DISMISS] + data-tooltip="Toggle Nav" data-shortcut="Shift+Cmd+B"> From 53e9f40acf8b77a83e42a0343fc475bda4fe8226 Mon Sep 17 00:00:00 2001 From: whitesockcat Date: Mon, 13 Apr 2026 20:00:47 +0800 Subject: [PATCH 2/2] fix: fall back to home dir when terminal cwd does not exist When a terminal tile remembers a remote/WSL cwd (e.g. /home/user/) that does not exist on the local host, pty.spawn starts a shell in a nonexistent directory causing it to exit immediately. The tile then auto-closes via the pty:exit handler, appearing as a flash-and-disappear to the user. Validate the cwd with fs.accessSync before spawning and fall back to os.homedir() when it is inaccessible. Co-Authored-By: Claude Opus 4.6 (1M context) --- collab-electron/src/main/pty.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/collab-electron/src/main/pty.ts b/collab-electron/src/main/pty.ts index f8b86e69..eb6d88c7 100644 --- a/collab-electron/src/main/pty.ts +++ b/collab-electron/src/main/pty.ts @@ -485,7 +485,14 @@ export async function createSession( cwdHostPath: string; cwdGuestPath?: string; }> { - const resolvedCwd = cwd || os.homedir(); + let resolvedCwd = cwd || os.homedir(); + // Fall back to home directory if the requested cwd does not exist + // (e.g. a remembered remote/WSL path on a local macOS host). + try { + fs.accessSync(resolvedCwd); + } catch { + resolvedCwd = os.homedir(); + } const shell = process.env.SHELL || "/bin/zsh"; const c = cols || 80; const r = rows || 24;