Repository navigation
Note where a gesture's work still covers the whole page, and the cheaper pass for each - #6078
Merged
Merged
Conversation
…per pass for each Comments only. Each sits at the code that does the work, with its cost on the 1,024-section bench page and the change that would make it cost what the gesture changed: the annotation inventory's collection, the margin markers' names, the margin layout's seating, the snapshot's change list, admission's second fold, the log parse on every request, and position moves recording their container's whole order.
leaf-agent
approved these changes
Nov 15, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
…it (#6095) Each margin marker's accessible name said its place among the markers and how far down the page its target stands ("Thread, 3 of 17, 40 percent down, …"), so any marker joining or leaving, and any change in the page's height, read every target's box and renamed every marker, a cost that grew with the page (#6078 noted it at `markerName`). Now a marker says what it holds and its subject at rest, and says where it stands only while it holds focus: focus coming to or leaving a marker names it once the script ends, and the margin's layout pass names the focused marker again, since every change to where a marker stands comes with a pass. A render names only the markers it drew. What to weigh: this changes what a screen reader hears. A listener landing on a marker by any route (Tab into the rail, the walk's arrows, Page Map, a dialog handing focus back) hears its place and distance as before; one reading the margin in browse mode without moving focus hears each marker's subject without them. Max picked this over keeping every name whole from the layout pass's positions, which would have saved the reads but still renamed every marker. The distance now reads the target and the column as the window draws them, which also fixes it doubling under a zoom on the column (50 percent read as 100, on main too, found by a Codex review). `leaf-dev bench asks --input open --input comment --sizes 64,256,1024 --rounds 2 --base` at 1,024 sections, on a loaded Mac: sending a comment 191.9 → 170.9 ms of main-thread CPU; opening a comment box loses the 42 ms of forced style the names' `skipped` checks made. Tests: the Page Map walk, row-leaving and pointed-row tests now check the focused marker's name and that no marker says where it stands at rest or once focus leaves; switching off each rule fails one of them. Runtime tests and the focused margin browser tests pass. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude <[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.
Comments only. After #6052 and #6070, a click on the 1,024-section page
leaf-dev benchgenerates shows the server's reading within the 100 ms budget, but sending a comment (159 ms) and resolving a thread (129 ms) still don't. Each remaining whole-page cost now has a note at the code that pays it, saying what it costs there and what change would make it cost what the gesture changed:collectEntries(annotation-inventory.js): rebuilds and re-sorts every group each collection, about 10 ms, twice per send.markerName(margin-projection.js): every marker's name carries its place and distance down, so one new marker renames them all and reads every target's box, about 9 ms per send. Changing it changes what a screen reader hears, so it is the maintainer's call.layoutMountedRows(margin-layout.js): seats every row each pass, kept ones included, about 8 ms a pass.admitted_event(event_contracts.py):afterand the state read fold the whole log again.read_events(event_log.py): every request parses the whole log, a fifth to a quarter of a request on the cards page at 1,024 events.Asked for by max-sixty. Pre-commit passes on the changed files.