-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Description
The user needs keyboard shortcut hints to be hidden when using the application in phone mode. Currently, these shortcut combos (e.g., Ctrl + Shift + [, Ctrl + Shift + A) are displayed on mobile devices, where they occupy valuable screen real estate and are not actionable for touch-based users.
Expected Behavior
Keyboard shortcut hints should only be visible in desktop mode and should be automatically hidden when the UI detects a phone layout.
Actual Behavior
Shortcut hints are displayed at the top of the session sidebar and below the agent/model selectors on mobile layouts (tested on Galaxy A05s, Android 14, Vivaldi 7.2).
Technical Context
- Relevant File:
packages/ui/src/components/instance/shell/SessionSidebar.tsx - Environment: Galaxy A05s (Android 14, One UI 6.1), Vivaldi 7.2.3628.162, V0.10.3
devbranch. - Code Snippets:
- Upper shortcuts (Line 122):
<div class="session-sidebar-shortcuts"> <Show when={props.keyboardShortcuts().length}> <KeyboardHint shortcuts={props.keyboardShortcuts()} separator=" " showDescription={false} /> </Show> </div>
- Lower hints (Line 169):
<div class="session-sidebar-selector-hints" aria-hidden="true"> <Kbd shortcut="cmd+shift+a" /> <Kbd shortcut="cmd+shift+m" /> <Kbd shortcut="cmd+shift+t" /> </div>
- Upper shortcuts (Line 122):
User Experience Goal
Mobile users should have a cleaner interface focused on touch interactions, removing "clutter" from keyboard shortcuts that are irrelevant to the mobile browsing experience.
Implementation Suggestions
- Wrap with Conditional Rendering: Use the existing
props.isPhoneLayout()accessor inSessionSidebar.tsxto wrap the shortcut<div>blocks in a<Show when={!props.isPhoneLayout()}>component. - CSS Breakpoints: Alternatively, apply responsive utility classes (e.g.,
hidden md:flex) to thesession-sidebar-shortcutsandsession-sidebar-selector-hintsclasses to ensure they are only visible on larger screens.