Repository navigation
Hold drag state in widget-elements.js, and give focus.js the one hand-back and Tab-stop reading - #1247
Merged
Conversation
`dragging` wrote an `lf-dragging` class and four modules read it back with `document.querySelector`: the projection presenter, the widget controller (twice), composing/engagement.js, and lf-board's grab row. widget-elements.js now holds the hands in a set; `dragHeld()` answers whether any widget holds one, and `watchDragRelease` tells the two deferral mechanisms (projection and widget controller) when the last one is put down, in the order they began watching, as the document event did. lf-board reads its own gesture instead of its class. Behaviour moved: nothing wears `lf-dragging` any more. The tests that observed the class now ask `dragHeld()` through the runtime import. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Closers each wrote their own return: the command reference retried its origin for a frame and then let go; the response bar focused its proxy and let go when that failed; the Page Map, the thread card, the options menu, the tray, the thread panel, the reaction palette, the media viewer and the target chooser each focused one control, some behind a visibility check, most with no fallback, so a gone destination left focus on the body. `handBack(...places)` in focus.js now lands the user on the first place that takes focus; a place still in the document gets one more look on the next frame unless focus was placed meanwhile; with nowhere left the user is let go on the page. The body is nowhere. The Map's own fallback chain becomes `mapControlPlaces`, one list the dialog, the thread card and navigation hand to `handBack`. Tab stops were spelled three ways: reach.js `FOCUSABLE`, the command reference's loop, and margin-layout.js `CONTROLS`. focus.js now owns `TAB_STOP` (which adds `summary` and editable regions to `FOCUSABLE`) and `tabStops(root)`, the filtered walk the reference and the auxiliary surfaces share. Behaviour moved: a scrolling box whose only control is a disclosure no longer gets a second tab stop from the reach sweep; a closer whose destination is gone lets the user go on the page rather than dropping focus to the body; the target chooser restored with no opener lands on the reading block rather than the top of the document. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 26, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 27, 2026
The concept survey's drifted duplicates now each have one owner (#1214–#1221, #1223, #1228, #1231, #1235, #1244, #1245, #1247, #1250, #1251, #1254, #1260), so the survey note never lands. What it found and nobody has taken becomes `TODO.md` entries: - **Shared definitions** (new section under Next): re-addressing resource references in one pass instead of `http.py`'s regex scopers and three head composers; `tests/render_harness.py` `told()` beside `pageReadiness`'s `data` and `log` stages (#1250), which answer the same question; Python still naming a thread's identity a root (`thread_roots`, `FrozenThreadReading.roots`) now that the runtime keys threads on the served `id` (#1260). - **Requests**: the existing "Decide whether requests earn their weight" entry now says kept requests need one owner for seat availability, which four runtime modules restate. - **Implementation candidates**: the unresolved-gesture ledger as one state machine, deferred until a change has to touch it, since nothing there has drifted and it is the hottest race path. The survey's small undrifted items and its list of deliberate splits are dropped: none has drifted, and the splits are intended. 🤖 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.5 (1M context) <[email protected]>
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.
Two consolidations from the concept survey's markdown-composer group, one commit each. They touch different files and can be reviewed separately.
Whether a drag is in progress
dragging(el, on)wrote anlf-draggingclass, and four modules read it back withdocument.querySelector: the projection presenter, the widget controller (twice),composing/engagement.js, and lf-board's grab row.widget-elements.jsnow keeps the hands in a set.dragHeld()says whether any widget holds one, andwatchDragRelease(fn)tells the two deferral mechanisms (projection and widget controller) when the last one is put down. They are told in the order they started watching, which is the order the document event reached them before. lf-board reads its own gesture state instead of its class.Behaviour that moved: nothing wears
lf-draggingany more, since no stylesheet or package read it. The tests that watched the class now calldragHeld()through the runtime import.Returning focus when a layer closes, and what a Tab stop is
Each closer wrote its own return. The command reference retried its origin for one frame, then let go. The response bar focused its proxy and let go if that failed. The Page Map, the thread card, the options menu, the tray, the thread panel, the reaction palette, the media viewer and the target chooser each focused one control, some after a visibility check and most with no fallback, so a destination that had gone left focus on the body.
handBack(...places)infocus.jsnow owns this:letGo. The body counts as no place.The Map's fallback chain is now
mapControlPlaces(entry), a list that the dialog, the thread card and Map navigation pass tohandBack.Tab stops were spelled three ways: reach.js
FOCUSABLE, the command reference's own selector, and margin-layout.jsCONTROLS.focus.jsnow ownsTAB_STOP, which addssummaryand editable regions toFOCUSABLE, andtabStops(root), the filtered list that the reference and the auxiliary surfaces both use.focus.jsstill imports nothing that imports it back, because several modules build selectors fromTEXT_BOXwhile they load. So the retry tells that the user moved fromfocusinevents rather than fromuser-intent.js.Behaviour that moved:
Tests
test_a_disclosure_is_a_scrolling_box_s_own_stopandtest_a_closing_layer_hands_the_user_back_to_the_first_place_that_takes_themare new, intests/test_render_controls.py. I broke each rule in turn (summary, the body rule, the fallback toletGo, the one-frame retry, and skipping the retry once focus has moved) and confirmed that one of the two tests fails for each.npm run test:runtimeand pre-commit.margin-layout.jsis also edited on the unmergedlayout-surveybranch. This change touches only its import line andcontrolsIn, andgit merge-treeagainst that branch reports no conflicts.🤖 Generated with Claude Code