Repository navigation
Start a walk from a stop in view, and say an obligation's place by the walk's own list - #6327
Merged
Merged
Conversation
… obligation's place by the walk's list With nothing focused, every page walk (`m`, `t`, `h`, a tally's Next On Me) started from the first text block on screen (`pageReadingBlock`) and compared each stop with it by page order. A stop holding no text block, such as a question of options alone, a figure or a widget drawing its own words, stood ahead of that block and was passed: `m` at the top of a page opening with such a question went to the second, `t` opened the thread on the next paragraph, and with a question's options at the window's top and its heading scrolled away, `m` skipped it for the heading below. #6315's drawn group title had hit the same skip; its fix made the title a block, one more member of the reading's block list. Behavior change: a walk read from the viewport is a `view` origin, and `stepFrom` arrives at the first stop ahead of the read block that the reader sees where they read it (`seenBeside`, reading-place.js: same reading region, on screen where glides leave it, outside a stuck box, across the pointer's or focus's column), before the thread walk's own at-target, which now passes into `stepFrom` as `at`. The column test keeps a question in view in the column beside the one read from pulling the walk there. Behavior change: a press naming one obligation (a Page Map row, `obligationActions.open`, so a deck's arrival) said its position in the list its caller passed: `obligationActions.open` counted every obligation, answered ones and updates included ("Options 3 of 4 waiting on me" for the second of two open questions, which `m` calls "2 of 2"), and the Page Map counted the placed ones in server order. It now arrives through the queue walk and says the walk's position; one On Me doesn't hold says its word and how it ended. The obligation view's `goToObligation` and its `announce` dependency are gone. Measured on a 400-question page scrolled near its foot: the `m` keydown takes 18-28 ms on both base and head.
…unce only the obligation's own position
From review of the previous commit:
- `seenBeside` compared reading regions by object, and `readingRegionFor`
returns a fresh record each call, so no stop in a workspace pane counted as
seen and a pane opening with options alone was still skipped. It compares
region ids now (`seenWhereRead`).
- A stop now passes each test `readingBlock` chose the block by, with its
fallbacks: a stuck box counts where the block itself is stuck, as when every
block rides a fixed shell, and the column test applies only where the block
stands across the reader's column. The block's readings are taken once per
press rather than per stop.
- `goToObligation` announced whatever stop the user stood on after arriving,
so an answered question inside an open proposal said the proposal's place
("3 of 3 waiting on me · Rewrite"). It says the walk's position only when
that stop is the obligation's own, and otherwise its word and how it ended.
… position on a direct arrival From the second review round: - `seenWhereRead` measured the read block's column by its own rect, which a `display: contents` block lacks, so the column test fell away and a stop in the other column counted. Both the block and each stop are measured by `shownBox`, the box an element shows as. - A direct arrival at an obligation On Me doesn't hold skipped `beginWalk` and left an earlier declaration standing, so after going to an open proposal and then to an answered question inside it, the walk position still read the proposal's. The arrival now declares a reader that answers only on the obligation's own stop, which ends the earlier one.
leaf-agent
approved these changes
Nov 18, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 18, 2026
…sts a lookup (#6342) Each press of `m` rebuilt On Me's groups from every item twice, once to step and once to announce the position, so on a page of 400 questions a press cost 7.6 ms in its handler and 16 ms more after arrival. The queue walk now keeps that reading (each item's stop, place and heading, and the walk's stops) until something it reads changes: the server's queues and obligations, the plan, the grouping, the page's reading, or where threads are placed. A warm press takes 2.4 ms and its position 0.3 ms. Two of those inputs needed work. Anchor placement gains `placementVersion`, which moves in the task a placement changes. And `pageReadingVersion` now moves with ids and part names (`label`, `aria-label`, `alt`, `for`, `type`) as well as words, since `obligationPlace` finds a question by id and `partOver` names a part by those attributes; the watcher hears them apart from the words, so the outline, passage index and `keptWithReading` stay keyed on words. Four readings already kept against the page's version went stale the same way and now follow too: the conversations each part holds, the visual actions plan, a draft's place and a comment's point. A walk from what the window shows (#6327) measured every stop above the read block, and counted a stop a glide carried past the window as seen. A stop a window or more away is now judged by its box, and every stop where the glide lands (`seenLanded`), as the read block is. `lf-tabs` and `lf-deck` each repeated `tally()`'s split by `status` and `next_actor`; both now read `tally()`, showing the same. Ownership: the server decides which obligations exist, their status, next actor and On Me membership; the browser decides where each stands in the rendered page, which the server's copy of the document doesn't hold, so On Me's order and grouping stay in the browser, kept against their inputs. To weigh: `reading()` in `queue-walk.js` lists what On Me's reading depends on, so a new input must join it. `leaf-dev bench` gains a `walk` input; per press, base 21/25/33/43/63 ms at 8 to 512 questions, head 18/23/29/27/36 ms. Max asked for this after #6327. Codex reviewed it three times; its findings (stale ids and names, the glide case, label `type`, an id change discarding layout) are fixed, each with a test that fails without it. `pnpm run check:browser`, the runtime suite and 59 On Me, walk, tab, deck, preview and visual-action browser tests pass. > _This was written by Claude Code on behalf of max-sixty_
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.
With nothing focused, every page walk (
m,t,h, a tally's Next On Me) started from the first text block on screen and passed any stop standing ahead of it that holds no text block, such as a question of options alone, a figure or a widget drawing its own words. Somat the top of a page opening with such a question went to the second one,topened the next paragraph's thread, and with a question's options at the window's top and its heading scrolled away,mskipped it. #6315 hit the same skip with its drawn group title and patched it by making the title one more kind of reading block. Here the walk decides with its own stops instead: a viewport origin is aview, andstepFromarrives at the first stop ahead of the read block that the reader sees where they read it (seenWhereRead: same reading region, on screen, and the stuck-box and reader-column testsreadingBlockchose the block by, with the same fallbacks).A press naming one obligation (a Page Map row,
obligationActions.open, which a deck's arrival uses) used to announce its position in a list its caller passed.obligationActions.opencounted every obligation, answered ones and updates included, so the second of two open questions read "Options 3 of 4 waiting on me" whilemsaid "2 of 2". It now arrives through the queue walk and says the walk's position, or, for one On Me doesn't hold, its word and how it ended. The obligation view'sgoToObligationis gone.To weigh: precedence in
stepFrom(current-target.js), where the thread walk's at-target now passes in asatso a stop in view ahead of the read block comes first. Themkeydown on a 400-question page takes 18–28 ms on both base and head. That cost already grows with the page, which is a separate follow-up.Max asked for this after #6315. Codex reviewed each commit; its six findings (pane regions compared by object, the stuck and column fallbacks, a boxless block, a nested answered question announcing its parent's place, a stale walk position) are fixed with tests where a browser case reaches them. Tests: new browser cases for
m(page top, scrolled, beside another column),t, a workspace pane, and the announced position, each failing on base or without its part of the fix;pnpm run check:browser, the runtime suite, and 106 walk and obligation browser tests pass.