Skip to content

feat(staged): polish New Session mode picker with ⌘1/2/3 switching#779

Merged
matt2e merged 1 commit into
mainfrom
command-1-2-3-for-types
Jun 10, 2026
Merged

feat(staged): polish New Session mode picker with ⌘1/2/3 switching#779
matt2e merged 1 commit into
mainfrom
command-1-2-3-for-types

Conversation

@matt2e

@matt2e matt2e commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Polishes the New Session mode picker (NewSessionModal.svelte) with keyboard switching and a clearer trigger.

  • ⌘1/2/3 (Ctrl on non-Mac) switch modes while the dialog is open, whether or not the dropdown is expanded. The listener is registered in the capture phase so it fires before ProjectsList's bubble-phase ⌘1-9 handler (which would otherwise switch the project behind the dialog); handled combos call stopImmediatePropagation() so that handler never sees them.
  • Mode-switch hints (⌘1 / ⌘2 / ⌘3, platform-aware via isMac()) render in the dropdown items when shortcut hints are enabled.
  • Trigger restyled as a single coloured pill that tracks the active mode (note/commit/review tints), with both the mode icon and chevron inheriting the pill's tint.
  • Minor menu polish: bg-menu surface, wider min-width, and slightly roomier trigger padding.

🤖 Generated with Claude Code

Make the New Session dialog's mode-picker trigger a single coloured pill
that tracks the selected mode (note/commit/review), give the dropdown the
menu surface colour, show platform-aware ⌘1/2/3 affordances on each option
(gated by viewport.showShortcutHints), and wire ⌘1/2/3 (Ctrl elsewhere) to
switch the mode whenever the dialog or dropdown is open.

The shortcut handler is registered as a capture-phase window listener that
stops propagation for handled combos, so it beats ProjectsList's bubble-phase
⌘1-9 project-switch handler and the project behind the dialog is left alone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners June 10, 2026 07:04
@matt2e matt2e merged commit 6ea69df into main Jun 10, 2026
5 checks passed
@matt2e matt2e deleted the command-1-2-3-for-types branch June 10, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant