docs(product): design scope-aware tier-3 command dispatch (RIG-2529) - #508
Draft
rigel-mintaka wants to merge 1 commit into
Draft
docs(product): design scope-aware tier-3 command dispatch (RIG-2529)#508rigel-mintaka wants to merge 1 commit into
rigel-mintaka wants to merge 1 commit into
Conversation
Design record for making the keyboard dispatcher's tier 3 (window-global) scope-aware, closing the tier-3 focus-exclusivity hole RIG-2130 ratified as DEFER (RD-4/OQ-6). ## What Tier 3 today runs any registered command whose keymap entry has no `when`, regardless of the command's declared `scope` or where focus is (`dispatch.ts:120-129`). This record adds one conjunct — run the matched global entry only if `command.scope === "global"` or `command.scope` equals the active zone — reusing tier 2's already-computed `zone` (`dispatch.ts:107`). It turns the long-authored-but-unread `Command.scope` field (`commands.ts:18,40`) into the load-bearing gate. ## Why now This is the shared substrate for the RIG-2482 keyboard-shortcuts overlay and the RIG-2483 command palette: the discoverability net needs the eight group-relative `list.*` commands registered so they earn overlay/palette rows. Under today's tier 3, registering them would open eight new copies of the RD-4 leak. The scope gate is what makes *register = safe*. ## Contract note The safety proof rests on `activeZone` being derived from `activeGroup` (`spine.ts:95-97`), an invariant the codebase itself declares temporary. D5 names it as a contract: any future independent zone controller inherits the obligation to re-establish tier-3 safety. This closes RD-4/OQ-6 and flips the regression guard `Bridge.test.tsx:537-572` that today asserts the hole stays open. Design-critic verdict: GO (0 blockers). Ledger rows DL-227..229. Spec-impact: none. Ledger-impact: adds DL-227 (scope-gate predicate), DL-228 (RD-4/OQ-6 closure), DL-229 (shared commands-as-inventory rule). Refs RIG-2529. Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
Compass engineering docs preview: https://compass-ux-rig-2529-tier3-sc.compass-eng-docs.pages.dev Deployed from Changed pages: |
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.
Design record for making the keyboard dispatcher's tier 3 (window-global) scope-aware, closing the tier-3 focus-exclusivity hole RIG-2130 ratified as DEFER (RD-4/OQ-6).
What
Tier 3 today runs any registered command whose keymap entry has no
when, regardless of the command's declaredscopeor where focus is (dispatch.ts:120-129). This record adds one conjunct — run the matched global entry only ifcommand.scope === "global"orcommand.scopeequals the active zone — reusing tier 2's already-computedzone(dispatch.ts:107). It turns the long-authored-but-unreadCommand.scopefield (commands.ts:18,40) into the load-bearing gate.Why now
This is the shared substrate for the RIG-2482 keyboard-shortcuts overlay and the RIG-2483 command palette: the discoverability net needs the eight group-relative
list.*commands registered so they earn overlay/palette rows. Under today's tier 3, registering them would open eight new copies of the RD-4 leak. The scope gate is what makes register = safe.Contract note
The safety proof rests on
activeZonebeing derived fromactiveGroup(spine.ts:95-97), an invariant the codebase itself declares temporary. D5 names it as a contract: any future independent zone controller inherits the obligation to re-establish tier-3 safety. This closes RD-4/OQ-6 and flips the regression guardBridge.test.tsx:537-572that today asserts the hole stays open.Design-critic verdict: GO (0 blockers). Ledger rows DL-227..229.
Spec-impact: none.
Ledger-impact: adds DL-227 (scope-gate predicate), DL-228 (RD-4/OQ-6 closure), DL-229 (shared commands-as-inventory rule).
Refs RIG-2529.
Co-authored-by: Matt Wilkinson matt@rigel.build