Skip to content

feat(desktop): Mac-style session switcher (^Tab / ^⇧Tab / ^1-9)#43111

Merged
OutThisLife merged 1 commit into
mainfrom
bb/desktop-session-cycle-hotkey
Jun 10, 2026
Merged

feat(desktop): Mac-style session switcher (^Tab / ^⇧Tab / ^1-9)#43111
OutThisLife merged 1 commit into
mainfrom
bb/desktop-session-cycle-hotkey

Conversation

@OutThisLife

@OutThisLife OutThisLife commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Mac-style session switching for the desktop app:

  • ^Tab / ^⇧Tab — cycle recent sessions (Control, not Cmd — macOS reserves Cmd+Tab)
  • ^1…^9 — jump to the Nth recent session (mirrors profile ⌘1…⌘9)
  • Quick tap — jumps on keydown, no HUD (even if Ctrl stays down)
  • Hold Tab ~220ms or second Tab while Ctrl held — compact HUD for browsing
  • Ctrl↑ commits highlight · Esc cancels · rows clickable (^+click safe)

Implementation

  • ctrl modifier token in combo.ts — literal Control on macOS; folds to mod elsewhere so one default works on every platform
  • session-switcher store — Tab-hold reveal (matches macOS app switcher), immediate first-step navigation, frozen recency snapshot
  • SessionSwitcher overlay — compact centered panel (text-xs), not a fullscreen Dialog (Tab stays with global keybind listener)
  • Context menu suppression — swallows trailing contextmenu after Ctrl+click commit (Electron main-process menu)

Test plan

  • combo.test.tsctrl token across macOS/non-macOS (8 cases)
  • session-switcher.test.ts — quick tap, Tab-hold reveal, second-Tab HUD, Ctrl↑ commit (7 cases)
  • npm run type-check + eslint on touched files
  • Manual: quick ^Tab (no HUD), hold Tab (HUD), browse + commit, ^1-9 jumps, click row, Esc cancel

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: bb/desktop-session-cycle-hotkey vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 10614 on HEAD, 10614 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5561 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@OutThisLife OutThisLife force-pushed the bb/desktop-session-cycle-hotkey branch from b596c30 to 954e4a7 Compare June 9, 2026 21:59
Bind session.next/prev to Control+Tab / Control+Shift+Tab with a distinct
`ctrl` modifier token (literal Control on macOS — not Cmd, which the OS
reserves). Add ^1…^9 positional jumps mirroring profile ⌘1…⌘9.

Mac-style interaction:
- Quick ^Tab tap jumps on keydown with no HUD (even if Ctrl stays down)
- Hold Tab ~220ms, or tap Tab again while Ctrl is held → compact HUD
- Ctrl↑ commits the highlight; Esc cancels; rows clickable (^+click safe)
- Recency-ordered list snapshotted on open; cycles by stored session id

Includes combo.test.ts + session-switcher.test.ts.
@OutThisLife OutThisLife changed the title feat(desktop): cycle sessions with Ctrl+Tab / Ctrl+Shift+Tab feat(desktop): Mac-style session switcher (^Tab / ^⇧Tab / ^1-9) Jun 9, 2026
@OutThisLife OutThisLife force-pushed the bb/desktop-session-cycle-hotkey branch from 954e4a7 to 0e89211 Compare June 9, 2026 22:53
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have labels Jun 9, 2026
@OutThisLife OutThisLife merged commit ab5f1a1 into main Jun 10, 2026
20 checks passed
@OutThisLife OutThisLife deleted the bb/desktop-session-cycle-hotkey branch June 10, 2026 01:12
wachoo pushed a commit to wachoo/hermes-agent that referenced this pull request Jun 10, 2026
…Research#43111)

Bind session.next/prev to Control+Tab / Control+Shift+Tab with a distinct
`ctrl` modifier token (literal Control on macOS — not Cmd, which the OS
reserves). Add ^1…^9 positional jumps mirroring profile ⌘1…⌘9.

Mac-style interaction:
- Quick ^Tab tap jumps on keydown with no HUD (even if Ctrl stays down)
- Hold Tab ~220ms, or tap Tab again while Ctrl is held → compact HUD
- Ctrl↑ commits the highlight; Esc cancels; rows clickable (^+click safe)
- Recency-ordered list snapshotted on open; cycles by stored session id

Includes combo.test.ts + session-switcher.test.ts.
changman pushed a commit to changman/hermes-agent that referenced this pull request Jun 10, 2026
…Research#43111)

Bind session.next/prev to Control+Tab / Control+Shift+Tab with a distinct
`ctrl` modifier token (literal Control on macOS — not Cmd, which the OS
reserves). Add ^1…^9 positional jumps mirroring profile ⌘1…⌘9.

Mac-style interaction:
- Quick ^Tab tap jumps on keydown with no HUD (even if Ctrl stays down)
- Hold Tab ~220ms, or tap Tab again while Ctrl is held → compact HUD
- Ctrl↑ commits the highlight; Esc cancels; rows clickable (^+click safe)
- Recency-ordered list snapshotted on open; cycles by stored session id

Includes combo.test.ts + session-switcher.test.ts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants