Skip to content

[QOL] Hide keyboard shortcuts in phone mode #166

@VooDisss

Description

@VooDisss

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.

Image

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 dev branch.
  • 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>

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

  1. Wrap with Conditional Rendering: Use the existing props.isPhoneLayout() accessor in SessionSidebar.tsx to wrap the shortcut <div> blocks in a <Show when={!props.isPhoneLayout()}> component.
  2. CSS Breakpoints: Alternatively, apply responsive utility classes (e.g., hidden md:flex) to the session-sidebar-shortcuts and session-sidebar-selector-hints classes to ensure they are only visible on larger screens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions