You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Settings → Keybindings, KeybindingPill formats raw shortcutToKeybindingParts tokens with an incomplete inline ternary instead of sharing formatShortcutLabel's formatter. Built-in default shortcuts render literal meta (cmd+shift+[), macOS ⌃ on Linux/Windows (ctrl+alt+[), ⇧ on non-macOS, config modifier order (mod, meta, ctrl, alt, shift), and raw key tokens (arrowup, arrowdown, enter, f6)—disagreeing with the button's own aria-label and the Add keybinding dropdown.
Fix
Extracted formatShortcutKeyParts(shortcut, platform) in apps/web/src/keybindings.ts and made formatShortcutLabel delegate to it so visual <Kbd> badges, aria-labels, menus, and tooltips share one source of truth.
Simplified KeybindingPill in apps/web/src/components/settings/KeybindingsSettings.tsx to render formatShortcutKeyParts(shortcut) (and removed the now-unused shortcutToKeybindingParts import).
Added browser tests in apps/web/src/components/settings/KeybindingsSettings.browser.test.tsx covering cmd+shift+[, ctrl+alt+[, alt+arrowup, and f6 on both MacIntel and Linux x86_64. On main both fail (rendering literal meta, ⌃ on Linux, wrong modifier order, and raw arrowup/f6); with this fix all 10 browser tests pass.
Ran apps/web/src/keybindings.test.ts (52/52 passed), reactCompilerCoverage.test.ts -t "KeybindingsSettings", vp fmt --check, vp lint, knip --exports, and apps/webtypecheck.
Implemented by Gemini 4 Neon (Antigravity); reviewed by Claude Opus 5.5 (Claude Code), running in T3 Code.
Reviewing files that changed from the base of the PR and between 1c2caf7 and ca0d9bd.
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
No actionable comments were generated in the recent review.
Walkthrough
The change adds shared platform-specific shortcut formatting and uses it to render keybinding pills. Browser tests check shortcut labels and accessible names on macOS and Linux.
formatShortcutKeyParts returns platform-specific modifier labels followed by the formatted key label. formatShortcutLabel joins those parts using the platform’s separator.
Settings pill rendering and validation apps/web/src/components/settings/KeybindingsSettings.tsx, apps/web/src/components/settings/KeybindingsSettings.browser.test.tsx
KeybindingPill renders the shared formatted parts. Browser tests check visible shortcut labels and accessible names for macOS and Linux.
This change makes Settings keybinding pills show the same platform-specific modifier symbols, order, and key labels as shortcut labels elsewhere in the app. It affects only display. It has browser test coverage for macOS and Linux, and no merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Settings keybinding pills now render platform-specific modifiers and formatted key labels. It follows the conventional commit style from the template. The title is 86 …
Description check
The description follows the template's main sections: Problem, Fix (Change), Verification, and a linked issue (Fixes #43382). The Problem section explains the mismatch with clear reproduction details.…
Linked Issues check
Directly linked issue #43382 requires Settings → Keybindings pills to use the same modifier symbols, modifier order, and key labels as formatShortcutLabel. At the reviewed head, apps/web/src/keybindin…
Out of Scope Changes check
The changes stay within #43382. The new formatShortcutKeyParts helper and the formatShortcutLabel delegation implement the shared formatter that the issue asks pills to match. The KeybindingPill chang…
Full details: Title check
Explanation
The title names the main change: Settings keybinding pills now render platform-specific modifiers and formatted key labels. It follows the conventional commit style from the template. The title is 86 characters, which is longer than ideal, but it stays specific and relevant to the changeset.
Full details: Description check
Explanation
The description follows the template's main sections: Problem, Fix (Change), Verification, and a linked issue (Fixes #43382). The Problem section explains the mismatch with clear reproduction details. The Verification section lists specific tests and their results, including before and after behavior. The Scope section is only partly addressed, because it links the issue but does not say why the bug is in scope. The author also did not include before/after screenshots for this UI change, which the template requests. The author did name the agent and model used, as the template asks.
Resolution
Optional: add a brief Scope note confirming this is a bug fix, and add before/after screenshots of the pills on macOS and Linux, uploaded to GitHub, as the template requests for UI changes.
Full details: Linked Issues check
Explanation
Directly linked issue #43382 requires Settings → Keybindings pills to use the same modifier symbols, modifier order, and key labels as formatShortcutLabel. At the reviewed head, apps/web/src/keybindings.ts defines formatShortcutKeyParts(shortcut, platform). It emits modifiers in the order Ctrl, Alt, Shift, Meta, using ⌃⌥⇧⌘ on macOS and Ctrl/Alt/Shift/Meta elsewhere. It maps modKey to ⌘ or Meta by platform, and formats the key through formatShortcutKeyLabel, which maps arrowup to Up, arrowdown to Down, escape to Esc, and single characters to uppercase. formatShortcutLabel delegates to this helper, so the aria-label and pill share one source. In KeybindingsSettings.tsx, KeybindingPill renders formatShortcutKeyParts(shortcut) as Kbd elements, which removes the inline ternary and the raw shortcutToKeybindingParts tokens. For the listed examples, cmd+shift+[ yields ⇧⌘[ on macOS and Shift Meta [ on Linux. ctrl+alt+[ yields ⌃⌥[ on macOS and Ctrl Alt [ on Linux. alt+arrowup yields ⌥Up or Alt Up. f6 yields F6. These outputs match the issue's expected behavior. The browser tests in KeybindingsSettings.browser.test.tsx cover these four shortcuts on MacIntel and Linux x86_64. I did not read those test contents or run them. Their results come from the PR description only, so the test coverage claim is unverified by inspection.
Full details: Out of Scope Changes check
Explanation
The changes stay within #43382. The new formatShortcutKeyParts helper and the formatShortcutLabel delegation implement the shared formatter that the issue asks pills to match. The KeybindingPill change replaces the inline ternary and removes the now-unused shortcutToKeybindingParts import. The added browser tests cover the reported shortcuts and platforms. I found no unrelated behavior change in the inspected code. The diff for keybindings.ts could not be read as a diff. I verified its head content by reading the file, and I did not compare every other formatShortcutLabel caller against the base, so the effect on those callers is not fully verified.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
With default keybindings, open Settings → Keybindings. Search for Terminal: Previous, Queue: Edit Last Queued Message, and Focus Next Workspace Area in turn, and inspect the shortcut pills.
Real web app in Chromium on Linux x86_64 and macOS 26.6.2 arm64; 1280×800, light theme, isolated state seeded with one project and Replay (dev) thread. Both scenario comparisons exited 0. Captures were visually inspected.
Base visibly renders literal meta, raw arrowup, and lowercase f6, plus macOS modifier symbols on Linux. Head renders Shift Meta [ and Ctrl Alt [ on Linux; ⇧ ⌘ [ and ⌃ ⌥ [ on macOS; platform-appropriate Alt/Option with Up; and uppercase F6.
…matted key labels (pingdotgg#43383)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 6ac4ede)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In Settings → Keybindings,
KeybindingPillformats rawshortcutToKeybindingPartstokens with an incomplete inline ternary instead of sharingformatShortcutLabel's formatter. Built-in default shortcuts render literalmeta(cmd+shift+[), macOS⌃on Linux/Windows (ctrl+alt+[),⇧on non-macOS, config modifier order (mod, meta, ctrl, alt, shift), and raw key tokens (arrowup,arrowdown,enter,f6)—disagreeing with the button's ownaria-labeland the Add keybinding dropdown.Fix
formatShortcutKeyParts(shortcut, platform)inapps/web/src/keybindings.tsand madeformatShortcutLabeldelegate to it so visual<Kbd>badges,aria-labels, menus, and tooltips share one source of truth.KeybindingPillinapps/web/src/components/settings/KeybindingsSettings.tsxto renderformatShortcutKeyParts(shortcut)(and removed the now-unusedshortcutToKeybindingPartsimport).Fixes #43382
Verification
apps/web/src/components/settings/KeybindingsSettings.browser.test.tsxcoveringcmd+shift+[,ctrl+alt+[,alt+arrowup, andf6on bothMacIntelandLinux x86_64. Onmainboth fail (rendering literalmeta,⌃on Linux, wrong modifier order, and rawarrowup/f6); with this fix all 10 browser tests pass.apps/web/src/keybindings.test.ts(52/52 passed),reactCompilerCoverage.test.ts -t "KeybindingsSettings",vp fmt --check,vp lint,knip --exports, andapps/webtypecheck.Implemented by Gemini 4 Neon (Antigravity); reviewed by Claude Opus 5.5 (Claude Code), running in T3 Code.