Skip to content

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

Merged
matt2e merged 5 commits into
mainfrom
keyboard-shortcut-visibility
May 17, 2026
Merged

fix(staged): hide keyboard shortcut hints on touch devices#730
matt2e merged 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>
@matt2e matt2e merged commit 2c45d41 into main May 17, 2026
5 checks passed
@matt2e matt2e deleted the keyboard-shortcut-visibility branch May 17, 2026 23:50
matt2e added a commit that referenced this pull request May 18, 2026
Rebase the branch onto origin/main (now at 317e721). No new migrations
were added on main since the previous rebase — both sides still end at
0014-add-pipeline, so no renumbering was needed.

Conflict resolution:
- NoteModal.svelte / SessionModal.svelte: merge new viewport import
  (from #730 keyboard-shortcut-hints change) alongside the branch's
  noteFreshness imports.

Follow-up fixes:
- Add workingDir to the test session fixture for the field introduced on
  main during the rebase window.
- Use invokeCommand (not raw invoke) for count_assistant_messages_after
  to match the rest of the file's wrapper convention.

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