Repository navigation
Repair response option ownership - #404
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
The ? reference now lists two of the five rows under With other responses open: the reaction digits, the arrow walk, and Enter/Space are gone from it. scopes.js reserves a scope's when for the capability question — "whether the page has this scope at all" — precisely because that is what gates the reference, and declareResponseOptionKeys passes the transient responseOptionsAreOpen there instead. declaredStack skips a contributor whose when() is false, so while the choices are closed — which is the state a reader opens the reference in — only the RESPONSE_OPTIONS entry contributes, and that entry is now [RESPONSE_TAB, RESPONSE_CLOSE].
skills/leaf/assets/CLAUDE.md, under Page scope rows (keyboard/page.js), states the consequence: the reference is a projection of the register, and a capability it never lists is one "a reader working from the keyboard never finds". Nothing asserts that section's contents, so the suite does not see it — tests/test_render_controls.py and tests/test_render_reactions.py are 134 passed on this head.
What the section reads, on main and on this head
Render PANEL_PAGE, press ? twice, read .lf-help's text content.
main:
With other responses open
1 Put a reaction on the response target: 1 👍 keep, 2 ❌ change, …
⇥ / Shift+⇥ Move between the comment and other responses
← / → / ↑ / ↓ Move through other responses
⏎ / space Use the focused response
esc Close other responses
this head:
With other responses open
⇥ / Shift+⇥ Move between the comment and other responses
esc Close other responses
Keeping the whole row set on the RESPONSE_OPTIONS entry restores it: the section merges by title, so the element scope still supplies these rows for dispatch while the choices are open, and the narrowed at keeps this contributor off the key line in every state but the field. The two suggestions below go together — RESPONSE_MOVE and RESPONSE_ACTIVATE stay dead in the field on their own row when, but RESPONSE_REACTION needs its takesLetters guard back or the digits are claimed again while the reader types into the comment. I ran that pair locally: the section lists all five rows again, and tests/test_render_reactions.py is 50 passed.
…undations # Conflicts: # skills/leaf/assets/runtime/composing/selection.js
…ruled out (#768) The cutover list scored its candidates from a survey's estimates. Six of the rows ranked next were measured against the code, and every one was stale or overstated; an independent review then confirmed the six verdicts and corrected three of the reasons behind them. The rows now carry what was measured, and the ones the measurements ruled out have moved to the survey note, whose table is now named Rejected. What the measurements found: - **`html` as the page scroller** was already done: `26feec8b` made the switch on 2026-08-29, `theme.css` holds the rule, and the runtime reads `document.scrollingElement`. The row is gone. - **Same-document View Transitions** claimed ~150 lines against a `motion.js` of 87. The update applies after the old state is captured, later than the gesture's own turn; pointer input misses the page while it animates; a fold collapses height so later content slides, which a root cross-fade does not draw; and board cards move inside their own scroller, whose clip a snapshot escapes under the Chrome 125 floor. #666 removed the paint-boundary transition version travel used, which also leaves `theme.css`'s `lf-versioning` rule dead — deleted here. - **idiomorph for the version patch**: a live-tree diff keeps only the reader state an exclusion names, while `dom-children.js` compares authored source with authored source and keeps all of it. It has needed no fix since #514 split it out. - **`tsc --checkJs`** runs in under a second, but a bug-back over six runtime fixes (#404, #448, #625, #660, #676, #757) found no error that the fix removed from the files it touched, and the errors it does report are inference artifacts. - **Browser-owned anchoring** was spiked on `agent-a4111d25e33d466d2`. All three capture paths cut over and the anchors matched the Python capture exactly, but Python grew by 168 lines, a quoted `leaf comment` went from 0.2 s to 1.3 s and now needs Chrome, and the anchor tests went from 8 s to 37 s: the refusals and the diagnostics for a quote the page does not show read authored source the rendered page no longer holds. - **The user-level daemon** nets roughly zero lines. The browser already receives pushes over `EventSource`, the 70 µs stat loop serves CLI writers in other processes, pid probing and most locks stay, Windows is not a goal, and a user-level database stops the page directory being the deployment unit. Two rows are new. A size-first sweep of the largest hand-written mechanisms found one candidate the defect-led survey missed: serving each page through starlette and uvicorn, which `mcp` already installs, keeping one process per page. And the keyboard system becomes item #24 under architecture simplification: the reader keeps every key, sequence, hint, and the one-press-per-layer Escape, while the code that infers which surfaces are open — where ten of the last 24 keyboard fixes landed — gives way to a layer stack that openers push and closes pop. No library owns that; the ones that came closest are in Rejected. The preamble now says effort and confidence are estimates unless a row cites a measurement. Checks: the everyday suite (1,135) and `test_a_revision_navigates_without_the_view_transition_api`, which exercises activation with the View Transition API switched off, both pass; pre-commit is green on the changed files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Opening Comment's More menu should extend the available responses without moving the field. This change keeps horizontal placement inside the floating-surface owner, treats Suggest and Comment as actions, and scopes choice commands to the response options while preserving native text entry and submit shortcuts.
It also makes each open and close repaint the command registry, so dispatch, the visible keyline, and
aria-keyshortcutsstay synchronized. The?reference retains the complete response-command set even while the choices are closed.Tested with
uv run pytest testsanduv run pre-commit run --all-files.