-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: Show platform-specific keyboard shortcuts in UI #6323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds platform-specific keyboard shortcut display logic to the desktop UI, detecting whether the user is on Mac or Windows/Linux and showing the appropriate modifier keys (⌘ for Mac, Ctrl for Windows/Linux).
- Created a utility module for platform detection and keyboard shortcut text generation
- Updated UI text across multiple views to dynamically display the correct keyboard shortcuts based on the user's platform
- Replaced hardcoded shortcut text with function calls for navigation and search shortcuts
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ui/desktop/src/utils/keyboardShortcuts.ts | New utility module with platform detection and functions to generate platform-specific shortcut text |
| ui/desktop/src/components/sessions/SessionListView.tsx | Uses dynamic search shortcut text instead of hardcoded "⌘F/Ctrl+F" |
| ui/desktop/src/components/recipes/RecipesView.tsx | Uses dynamic search shortcut text instead of hardcoded "⌘F/Ctrl+F" |
| ui/desktop/src/components/extensions/ExtensionsView.tsx | Uses dynamic search shortcut text instead of hardcoded "⌘F/Ctrl+F" |
| ui/desktop/src/components/ChatInput.tsx | Uses dynamic navigation shortcut text instead of hardcoded "⌘↑/⌘↓" |
5212095 to
7c213a5
Compare
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
7c213a5 to
af1df9f
Compare
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
|
@Abhijay007 rebase and then LGTM to merge |
closes #5540
PR Description
This PR adds platform-specific keyboard shortcut display logic to the desktop UI, detecting whether the user is on Mac or Windows/Linux and showing the appropriate modifier keys (⌘ for Mac, Ctrl for Windows/Linux).
Changes made :
Type of Change
AI Assistance
Testing
Tested on Windows on the desktop UI
Screenshots/Demos (for UX changes)
Before: (Windows)
After: (Windows)