feat(staged): polish New Session mode picker with ⌘1/2/3 switching#779
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Polishes the New Session mode picker (
NewSessionModal.svelte) with keyboard switching and a clearer trigger.ProjectsList's bubble-phase ⌘1-9 handler (which would otherwise switch the project behind the dialog); handled combos callstopImmediatePropagation()so that handler never sees them.⌘1/⌘2/⌘3, platform-aware viaisMac()) render in the dropdown items when shortcut hints are enabled.bg-menusurface, wider min-width, and slightly roomier trigger padding.🤖 Generated with Claude Code