Skip to content

fix(staged): hide keyboard shortcut hints on touch devices#730

Open
matt2e wants to merge 5 commits into
mainfrom
keyboard-shortcut-visibility
Open

fix(staged): hide keyboard shortcut hints on touch devices#730
matt2e wants to merge 5 commits into
mainfrom
keyboard-shortcut-visibility

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented May 15, 2026

Summary

  • Detect touch/coarse-pointer devices via (pointer: coarse) and (hover: none) media queries and expose a reactive showShortcutHints flag on the shared viewport state
  • Conditionally hide keyboard shortcut badges, hints, and tooltip shortcut suffixes (e.g. "Close (Esc)") across all modals, the top bar, project list, repo config form, splash screen, session modals, and in-content search

Test plan

  • On a desktop browser, verify shortcut hints (e.g. ⌘↵, ⌘N, Esc in tooltips) still appear
  • On a touch device or using Chrome DevTools touch emulation, verify shortcut hints are hidden
  • Verify keyboard shortcuts themselves still work on desktop regardless of hint visibility

🤖 Generated with Claude Code

matt2e added 2 commits May 15, 2026 10:51
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners May 15, 2026 06:19
matt2e and others added 3 commits May 15, 2026 16:31
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
The prior collapse into a match guard moved `data` (Bytes, not Copy)
out of the pattern, which the borrow checker rejects. Clippy is happy
with the original nested-if form, so restore it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The lint's suggested match-guard fix doesn't compile (Bytes isn't Copy
and can't be moved into the guard), so suppress it at the function level
with a note explaining why future attempts to collapse will fail.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant