Repository navigation
feat(ui): keyboard shortcuts panel from one binding table (ADR 0073) - #204
Merged
Merged
Conversation
tebriz91
added a commit
that referenced
this pull request
Oct 28, 2026
…ers PDF and dialog keys From the Codex review of #204: - A command that moves focus (New, Ctrl+Tab, Find) closes the sheet instead of acting behind it; the palette, Settings and Open Case, which would capture focus the closed sheet cannot give back, do nothing while it is open. Switching apps keeps it open. - ShowShortcuts is also an app action, so Mod+/ and Help > Keyboard Shortcuts work from a model comparison window. - The PDF view's Page Up / Down, Home, End and Go to Page (Cmd+Alt+G / Ctrl+Alt+G) are bound actions listed in the table rather than raw key handling; the confirm dialog's Discard (Cmd+D / Alt+D) likewise. - The filter field shows the list's focus ring when it has focus (from the headless renders' Tab walk). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/shortcuts.rs holds every user-facing key binding: label, context group, keys per platform, and per binding the action, key context and the bind_keys that registers it, so every module keeps its place in the keymap. Each bind_keys, the editor and PDF crates' keymaps (through bind_crate), the palette's shortcut labels and the sidebar and Home key hints read it. Plumbing (Tab inside groups, menu and list moves, caret basics) stays in its module. The sheet is a read-only modal with a filter, grouped by context, this platform's keys only; ? outside text fields, Mod+/ everywhere, the palette and Help > Keyboard Shortcuts open it; Esc closes it. Headless renders include it in both themes. An invariant test fails on a bound action that is neither in the table nor plumbing, on a table row nothing registers, or on a crate keymap that disagrees with the table on either platform. The bound set is unchanged apart from the sheet's three bindings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ers PDF and dialog keys From the Codex review of #204: - A command that moves focus (New, Ctrl+Tab, Find) closes the sheet instead of acting behind it; the palette, Settings and Open Case, which would capture focus the closed sheet cannot give back, do nothing while it is open. Switching apps keeps it open. - ShowShortcuts is also an app action, so Mod+/ and Help > Keyboard Shortcuts work from a model comparison window. - The PDF view's Page Up / Down, Home, End and Go to Page (Cmd+Alt+G / Ctrl+Alt+G) are bound actions listed in the table rather than raw key handling; the confirm dialog's Discard (Cmd+D / Alt+D) likewise. - The filter field shows the list's focus ring when it has focus (from the headless renders' Tab walk). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tebriz91
force-pushed
the
windows/shortcuts-panel
branch
from
October 28, 2026 03:18
9752ace to
94fde9a
Compare
tebriz91
marked this pull request as ready for review
October 28, 2026 03:18
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
0.3.0 item 3 (ADR 0073).
What changes
src/shortcuts.rs: every user-facing binding as a row (label, context group Everywhere / Editor / Popup / Panel), each binding with its action, key context, keys per platform (mod-= ⌘ or Ctrl) and thebind_keysthat registers it. Everybind_keysregisters its rows from there, so each module keeps its place in the keymap (GPUI breaks a tie between equally deep bindings by registration order). Themdoc_editorandgpui_pdfcrates keep their own keymaps for their tests and other hosts; the app registers their rows from the table (shortcuts::bind_crate).src/workspace/shortcuts_ui.rs): read-only modal like the confirm dialog: filter field, rows grouped by context, this platform's keys only, list scrolls with arrows / Page Up/Down / Home / End, Tab stays inside, F6 blocked, Esc or click outside closes, focus returns. Opens with?outside text fields, ⌘/ (Ctrl+/) everywhere (toggles), the palette, and Help → Keyboard Shortcuts on macOS.keyboard-shortcutsscreen in light and dark.main.rs::bind_all_keysis the one registration order, shared by launch and the headless renders.Keymap unchanged
I dumped the full keymap before and after on Windows: the same 216 bindings plus the sheet's three (
?,ctrl-/, Esc in the sheet). A few same-key pairs changed relative order inside pii, ui and shell; each is between contexts that never sit on the same element, so neither can win a tie. The ties that exist (Enter in the chooser, which is alsoPseudonymReview; Esc in the Replacements panel, which is alsoUiMenu) keep their order.Tests
src/shortcuts/tests.rs: a bound action that's neither in the table nor named plumbing fails; a table row nothing registers fails; the editor and PDF crates' keymaps must match the table on both platforms. Checked that a strayctrl-jbinding fails it.src/workspace/tests/shortcuts_sheet.rs:?on Home opens it and every table row is drawn;?types in the editor and the filter; ⌘/ toggles from the editor and focus returns; filter by word and by key; F6 stays inside; the palette opens it, and every key the palette shows is in the table.just lint,just test,just fmt-checkandgit diff --checkpass. Full workspace: 820 passed, 20 ignored, zero failures; includes 433 app tests, the isolated headless-render contract (light/dark shortcuts sheet), DOCX worker checks and release-script regressions. Native macOS/Windows keyboard, accessibility and presentation acceptance was not run in this takeover.🤖 Generated with Claude Code
Codex review
Round 1 — gpt-6.1-sol, high
The first review reported three P2 findings; all were accepted and fixed in the review-fix commit:
a_command_that_moves_focus_closes_the_sheetchecks New, typing into the resulting editor, palette blocking and window deactivation.the_sheet_opens_from_another_windowchecks dispatch from another window; comparison-window availability includes ShowShortcuts. Native macOS Help-menu acceptance remains pending.The minor missing changelog fragment is fixed by
changes/shortcuts-panel.md. A separate render check found no focus ring on the filter; the filter now has an accent border while focused.Integration and documentation
Rebased onto origin/main
6a6267f, preserving #201 restore wording, #202 save retry, #203 tab numbering and #205 fleet documentation. ROADMAP items 1, 2, 3 and 6 are absent. The former WIP is now a proper finishing commit: ADR 0073 is Accepted in ADR 0052 current-rules style, with the changelog fragment and acceptance row H23.Round 2
Independent second round: provider
codex, modelgpt-6.1-sol,reasoningEffort: high, reviewing the rebased diff againstorigin/mainand the earlier replies. One initial attempt failed at model capacity; the retry completed.settings_ui::block_document_commandsand applying the same helper to the shortcuts sheet while Settings is open. The regressionshortcuts_over_settings_keep_document_commands_blockedfailed before the fix (two tabs rather than one), then passed. It checks unchanged document text, no new tab, sheet focus retained, and focus returned inside the still-open Settings on Esc. ADR 0073 states this rule.This is static review plus Windows headless tests. Native macOS Help/keyboard and native accessibility/presentation acceptance remain unverified. Final validation at head
94fde9a:just lint,just test,just fmt-checkandgit diff --checkpass. Workspace: 820 passed, 20 ignored, zero failures (433 app tests passed); isolated headless renders and release-script regressions passed. All four P2 findings across both rounds are fixed; no finding was deferred. Hosted checks for this pushed head are separate from these local results.