feat(hub): Select collects option picks, rules and red-gate reviews too

In Select mode every grant button and every option pick toggles its item into the selection (operator 2026-11-20): a decision or decision row keeps the option picked for it and picking it again takes it out; a rule request or red-gate review joins the selection as a solo item. Grant n signs every batchable item under one passkey signature, then asks one more signature per rule and red-gate review, one after the other, since the server accepts neither inside a batch; the sheet's note counts them. Requirement 020 decision 3 and its acceptance criteria follow.

Stacked on allow (aa4a337). The one conflict in page-inbox.js keeps the ux reason chips in the deny sheet next to the new solo note. node --check and ruff pass.

Tests: test_hub_grant_mode (pick collects with its label, rule and red-gate review get their own signature after the batch). Written, not run: the full suite runs once on master after all bundles (operator order).

Security: MEDUSA over the staged tree on master: 100, no findings, all 5 files covered. The server checks are unchanged.

🎯 Fix: 90 %
💥 Break: 5 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 86
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-22 15:55:43 +00:00
1 parent aa4a337c9a
commit 14bb4f38df
5 files changed
+191 -66

No files matched your search

+22 -12
View File
@@ -19,14 +19,18 @@ pass.
2. **Mode switch**: a segmented control "Direct | Select" in the header
tools at the top right; Direct keeps today's behaviour. Rejected: a
switch per view.
3. **What collects**: in Select, every grant button toggles its item into
one shared selection (pressed state): inbox rows, Home, stream rows, the
review sheet and the key `a`. A grant of an item `selectable()` refuses
(red-gate review, rule request, decision without a recommendation,
operator row without a command) stays direct and its title says why.
Deny always acts at once with its reason; the Match deck and the palette
keep their own confirmed release. Rejected: a unified tray where denials
collect too.
3. **What collects** (operator 2026-11-20): in Select, every grant button
and every option pick toggles its item into one shared selection
(pressed state): inbox rows, Home, stream rows, the review sheet and the
key `a`. A decision or decision row keeps the option picked for it;
picking the same option again takes it out. Grant n signs every
batchable item under one passkey signature, then asks one more
signature per rule request and per red-gate review, one after the
other, since the server accepts neither inside a batch. Deny always
acts at once with its reason; the Match deck and the palette keep their
own confirmed release. Rejected: a unified tray where denials collect
too; rules, red-gate reviews and option picks acting directly in Select
(operator 2026-11-20: Select applies to every item).
4. **Tray**: in Select, beside the switch: `n selected` with Grant n,
Deny n, Grant all green and Clear. Grant and Deny open the existing
selection sheet that lists every entry and full command; one passkey
@@ -85,15 +89,21 @@ flowchart TD
- [ ] Tray "Grant n" opens the selection sheet with exactly the selected
entries; one passkey signature covers them all, and after the undo time
each is granted.
- [ ] In Select, the grant of a red-gate review and Accept on a rule request
act directly as in Direct; Deny acts at once in both modes.
- [ ] In Select, an option pick on a decision or decision row, the grant of
a red-gate review and Accept on a rule request add the item to the
selection; Grant n posts the batchable items under one signature, then
each rule and red-gate review under its own; Deny acts at once in both
modes.
- [ ] A grant, option pick or checkbox in Waits on Operator never scrolls
the page; only `j` and `k` move the view to the cursor.
- [ ] In Direct, every grant button acts as today and the tray is hidden.
### Tests
- [ ] Unit: view store validation of `approval.mode`; page vm: a grant in
Select toggles `ui.selected` without a post, a grant in Direct posts, a
grant of a non-selectable item stays direct, the tray counts.
Select toggles `ui.selected` without a post, a grant in Direct posts,
an option pick collects with its label, a rule and a red-gate review
collect and get their own signature after the batch, the tray counts.
- [ ] Integration: n/a: the server and the signing path stay unchanged
(decision 6).
- [ ] E2E: Chromium and Firefox at 1920, 1366 and 390: the continuous diff