Skip to content

feat(keyboard): four G-leader sequence rows + display/aria hardening (RIG-2708) - #613

Open
rigel-mintaka wants to merge 1 commit into
compass-ux/rig-2707-chord-grammar-helpersfrom
compass-ux/rig-2708-leader-sequence-rows
Open

feat(keyboard): four G-leader sequence rows + display/aria hardening (RIG-2708)#613
rigel-mintaka wants to merge 1 commit into
compass-ux/rig-2707-chord-grammar-helpersfrom
compass-ux/rig-2708-leader-sequence-rows

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 4 PRs:

  1. main
  2. feat(keyboard): sequence-grammar chord helpers for leader chords (RIG-2707) #612
  3. "feat(keyboard): four G-leader sequence rows + display/aria hardening (RIG-2708)" (this PR)
  4. feat(keyboard): leader-sequence runtime in the keymap dispatcher (RIG-2709) #616
  5. docs(keyboard): document the leader-sequence runtime in the dispatch header (RIG-2710) #619

Adds the four Go-to leader sequences from the frozen leader-chords design (docs/designs/product/compass-leader-chords/design.md, T2 / §A4-A5) to DEFAULT_KEYMAP and hardens the two shipped chord scanners so a sequence renders correctly everywhere and never reaches aria-keyshortcuts.

  • DEFAULT_KEYMAP: a new // Go-to sequences (RIG-2484) block with G B → view.bridge, G L → view.backlog, G D → view.done, G S → view.settings, each placed after any existing modifier row for the same command so the modifier chord stays the first match.
  • shortcutForAria now skips sequence rows (chordSegments(entry.chord).length === 1): a sequence-only command returns undefined (its writer omits the attribute) and a dual-bound command returns its modifier chord. A press-then-press sequence has no valid WAI-ARIA representation, so the skip is mandatory and makes the result row-order-independent.
  • shortcutFor now returns formatChordForDisplay of the first matching row and does NOT skip sequences, so view.backlog/view.done display "G then L"/"G then D" and keep their point-of-use chip and title; a dual-bound command still shows its modifier chord because that row is first.
  • The ? overlay join formats via formatChordForDisplay, so a sequence row reads "G then B" instead of the misleading "G B".

Tests: keymap.test.ts moves view.backlog out of the shortcutFor miss group, adds a sequence-only-display case, a dual-bound modifier-wins case, and a DEFAULT_KEYMAP authoring-invariant block (every sequence is two modifier-less segments; no leader prefix is also a complete single chord); ShortcutsOverlay.test.tsx updates the bridge-filter row count 1→2 and asserts the formatted "G then B"; Palette.test.tsx asserts Backlog/Done carry no aria-keyshortcuts but a "Backlog (G then L)"/"Done (G then D)" title while Bridge keeps aria-keyshortcuts="Control+B".

Stacked on RIG-2707 (the sequence-grammar helpers). The dispatcher leader runtime that makes these chords fire is T3 (RIG-2709); until it lands the rows are advertised only through the discoverability net, which is why T2 and T3 ship in one stack.

Ledger-impact: none. DL-248..DL-252 for this record landed with the design PR (#544).

Refs RIG-2708

Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Aug 25, 2026

Copy link
Copy Markdown

RIG-2708

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-ux-rig-2708-leader-s.compass-eng-docs.pages.dev

Deployed from compass-ux/rig-2708-leader-sequence-rows at b10833f.

…(RIG-2708)

Adds the four Go-to leader sequences from the frozen leader-chords design (`docs/designs/product/compass-leader-chords/design.md`, T2 / §A4-A5) to `DEFAULT_KEYMAP` and hardens the two shipped chord scanners so a sequence renders correctly everywhere and never reaches `aria-keyshortcuts`.

- `DEFAULT_KEYMAP`: a new `// Go-to sequences (RIG-2484)` block with `G B → view.bridge`, `G L → view.backlog`, `G D → view.done`, `G S → view.settings`, each placed after any existing modifier row for the same command so the modifier chord stays the first match.
- `shortcutForAria` now skips sequence rows (`chordSegments(entry.chord).length === 1`): a sequence-only command returns `undefined` (its writer omits the attribute) and a dual-bound command returns its modifier chord. A press-then-press sequence has no valid WAI-ARIA representation, so the skip is mandatory and makes the result row-order-independent.
- `shortcutFor` now returns `formatChordForDisplay` of the first matching row and does NOT skip sequences, so `view.backlog`/`view.done` display `"G then L"`/`"G then D"` and keep their point-of-use chip and title; a dual-bound command still shows its modifier chord because that row is first.
- The `?` overlay join formats via `formatChordForDisplay`, so a sequence row reads `"G then B"` instead of the misleading `"G B"`.

Tests: `keymap.test.ts` moves `view.backlog` out of the `shortcutFor` miss group, adds a sequence-only-display case, a dual-bound modifier-wins case, and a `DEFAULT_KEYMAP` authoring-invariant block (every sequence is two modifier-less segments; no leader prefix is also a complete single chord); `ShortcutsOverlay.test.tsx` updates the bridge-filter row count 1→2 and asserts the formatted `"G then B"`; `Palette.test.tsx` asserts Backlog/Done carry no `aria-keyshortcuts` but a `"Backlog (G then L)"`/`"Done (G then D)"` title while Bridge keeps `aria-keyshortcuts="Control+B"`.

Stacked on RIG-2707 (the sequence-grammar helpers). The dispatcher leader runtime that makes these chords fire is T3 (RIG-2709); until it lands the rows are advertised only through the discoverability net, which is why T2 and T3 ship in one stack.

Ledger-impact: none. DL-248..DL-252 for this record landed with the design PR (#544).

Refs RIG-2708

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-ux/rig-2708-leader-sequence-rows branch from 21555fa to b10833f Compare August 26, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant