feat: add keyboard shortcuts and hints (#1138, #1222)#1232
Open
ad4mou wants to merge 6 commits into
Open
Conversation
Contributor
🚀 Preview Deployment
Preview will be automatically removed when this PR is closed. |
Contributor
There was a problem hiding this comment.
1 issue found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/frontend/src/hooks/use-keyboard-shortcuts.ts">
<violation number="1" location="apps/frontend/src/hooks/use-keyboard-shortcuts.ts:21">
P2: Platform-specific shortcuts also fire with the other platform's modifier: e.g. `Ctrl+B` toggles the sidebar on macOS despite the advertised `⌘B`. Make matching choose `metaKey` on macOS and `ctrlKey` elsewhere, matching displayed shortcuts.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Contributor
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/frontend/src/lib/stories-cache.ts">
<violation number="1" location="apps/frontend/src/lib/stories-cache.ts:12">
P2: Opening Stories through this helper can retain a stale archived shared-stories list for up to the query stale time. Include `story.listSharedArchived` with the other story cache keys.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
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
lib/keyboard-shortcuts.ts),useKeyboardShortcutshook (ignores keystrokes while typing in inputs/editors), and aplatform.tsutil (⌘ on macOS, Ctrl elsewhere), mounted once in_sidebar-layout.tsx.Mod+Btoggle sidebar,Mod+Kcommand palette,Shift+Mod+Onew chat,Shift+Mod+SStories,Mod+/keyboard-shortcuts dialog.⇧⌘S), a Keyboard shortcuts help dialog, and "Keyboard shortcuts" + "Go to Stories" command-menu entries.⇧⌘Olistener and the duplicate⌘Klistener; de-duplicatednavigator.platformchecks via the shared util.How to test
Just do Command/Ctrl + / to see this

Also check out the keyboard shortcut hint which shows when hovering over the toggle sidebar button
Closes #1138
Closes #1222