fix(web): show the configured stash shortcut - #8437
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, focused UI fix that replaces a hardcoded stash shortcut with the effective configured binding and handles unbound shortcuts cleanly. Existing stash behavior is unchanged, and focused tests cover both display cases. You can add or adjust custom eligibility rules. Learn more. |
Fixes #8369
What Changed
The empty stash state now displays the effective configured
composer.stashshortcut instead of hardcoding⌘S. The shortcut label is platform-aware and custom-keybinding aware. If stash is unbound, the empty state does not advertise a shortcut.Why
The stash action already resolves the active keybinding, but the empty-state copy always showed
⌘S, which was incorrect on Windows/Linux and after customizing or removing the binding. Passing the resolved display label fromChatComposerkeeps the UI aligned with the behavior.UI Changes
Before:

After:

Checklist
Note
Low Risk
Copy-only UI change in the composer stash empty state with no auth, data, or behavior changes beyond displayed shortcut text.
Overview
The empty stash drawer no longer hardcodes
⌘S.ChatComposernow passes the resolvedcomposer.stashdisplay label viashortcutLabelForCommand, matching platform and custom keybindings.ComposerStashMenutakes a newstashShortcutLabelprop (string | null). When set, the empty state adds “Press {label} with a prompt…”; when stash is unbound, it only shows “Nothing stashed yet.” Tests cover both cases.Reviewed by Cursor Bugbot for commit d0709a7. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Show configured stash shortcut in
ComposerStashMenuPasses a dynamic shortcut label for the
composer.stashcommand from ChatComposer.tsx into ComposerStashMenu.tsx. The empty-state helper text now appends 'Press {stashShortcutLabel} ...' only when a label is provided, and omits shortcut guidance when the command is unbound. Tests in ComposerStashMenu.test.tsx cover both the bound and null-label cases.Macroscope summarized d0709a7.