Skip to content

fix(web): keyboard hints no longer assume macOS - #7715

Open
DraftProducts wants to merge 1 commit into
pingdotgg:mainfrom
DraftProducts:t3code/platform-aware-stash-hint
Open

fix(web): keyboard hints no longer assume macOS#7715
DraftProducts wants to merge 1 commit into
pingdotgg:mainfrom
DraftProducts:t3code/platform-aware-stash-hint

Conversation

@DraftProducts

@DraftProducts DraftProducts commented Aug 20, 2026

Copy link
Copy Markdown

UI Changes

No screenshots: the change is text, and the strings are exact. On Windows/Linux:

Where Before After
Settings → Keybindings pill, mod+shift+d Ctrl D Ctrl Shift D
Settings → Keybindings pill, mod+esc Ctrl esc Ctrl Esc
Diff comment composer ⌘/Ctrl Enter to send Ctrl+Enter to send
Empty prompt stash Press ⌘S with a prompt… Press Ctrl+S with a prompt…

macOS is unchanged everywhere except the diff comment hint, which loses the
/Ctrl half.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes — text-only change, exact strings tabled above
  • I included a video for animation/interaction changes — N/A, no motion

Changes by Claude Opus 5 running in Claude Code.


Note

Low Risk
UI-only label formatting; shortcut matching is unchanged. Low chance of visual regressions in keybinding pills.

Overview
Shortcut hints no longer tell Windows/Linux users to press Mac keys.

formatShortcutLabel now joins formatShortcutLabelParts, so settings pills render each key from the structured shortcut instead of splitting a serialized string. That fixes mixed Mac glyphs (/ on every OS), the + key, and named keys like Esc.

Diff comment send hints resolve to ⌘Enter or Ctrl+Enter. The empty stash drawer uses shortcutLabelForCommand for composer.stash (or omits the key if unbound).

Reviewed by Cursor Bugbot for commit 3d22677. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix keyboard hints to stop assuming macOS in web components

  • Adds formatShortcutLabelParts in keybindings.ts to produce per-key labels with platform-correct symbols (⌃⌥⇧⌘ on Mac, Ctrl/Alt/Shift/Meta elsewhere); formatShortcutLabel now delegates to it
  • DiffCommentAnnotation.tsx shows ⌘Enter or Ctrl+Enter based on host platform instead of the fixed ⌘/Ctrl Enter to send
  • ComposerStashMenu.tsx reads the configured stash shortcut from primaryServerKeybindingsAtom and renders it in the empty-state hint, falling back to a generic message when unavailable
  • KeybindingsSettings.tsx KeybindingPill switches from a string value prop to a structured shortcut: KeybindingShortcut, using formatShortcutLabelParts for rendering
  • Behavioral Change: KeybindingPill now requires a shortcut prop instead of value; any callers still passing value will break

Macroscope summarized 3d22677.

Three shortcut hints in the web UI rendered Mac key symbols unconditionally.
The keybindings settings pills now derive their labels from the structured
shortcut through a new formatShortcutLabelParts, which also fixes the "+" key
and the lowercase names for Esc, Space and the arrows. The diff comment hint
and the empty prompt-stash hint pick their label per platform, the stash one
through shortcutLabelForCommand so a rebind is reflected too.
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c05a6ff-f60e-464d-a15d-d230a9772e2e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 20, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 3d22677

Macroscope's review found this PR approvable — This PR fixes keyboard shortcut hints to show platform-appropriate labels (Ctrl+X on Windows/Linux, ⌘X on Mac) instead of always assuming macOS. The changes are display-only, well-tested, and self-contained.

You can add or adjust custom eligibility rules. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant