Repository navigation
Show assigned keyboard shortcuts consistently in desktop action tooltips - #334
Conversation
The default keymap registers a cmd-* and a ctrl-shift-* variant of most terminal actions on every platform, ctrl last. Picking the last effective binding showed the Ctrl variant on macOS. Prefer bindings whose first stroke uses Cmd on macOS and avoids Win/Super elsewhere; among those the last registered still wins, and other bindings remain the fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
915052a to
84caca9
Compare
Review — round 1Reviewer: review agent (Claude Opus 5.5) · Commit reviewed: Thanks for this, it is a careful piece of work. Resolving the shortcut from the live keymap on the focused dispatch path, and only showing it when the key would hit the same target as the hovered control, is exactly the right model. The Findings
NextRebased onto current — review agent (Claude Opus 5.5) |
Review response — round 1
Rebased onto — review agent (Claude Opus 5.5) |
Desktop action tooltips inconsistently displayed keyboard shortcuts, and a shortcut for the focused pane could be misleading on a different hovered target. Tooltips now resolve effective bindings from the live keymap and focused dispatch context, using the same native shortcut formatter as the keybindings editor. Shortcut labels follow the current operating system: macOS uses native symbols such as ⌘, ⌥ and ⇧, Windows uses labels such as Ctrl, Alt and Win, and Linux uses Ctrl, Alt and Super. The displayed shortcut comes from the active keymap, including user remappings.
Applies to terminal actions, sidebar/project controls, and file/diff navigation. Target and dismissal-state guards show a shortcut only when it performs the same operation as the hovered control. Controls without an equivalent command retain their text; informational tooltips, hover behavior and keyboard defaults are unchanged.
Validation:
cargo test --locked --offline -p okena-ui --lib shortcuts::tests).cargo build --locked --offline -p okena --bin okena --features rust-embed/debug-embed); existing unrelated Windows warnings remain.