Skip to content

fix: name margin markers against the same column box the layout pass reads - #5207

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5162
Nov 3, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5162

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

A render named each Page Map marker's position ("N percent down") against main's own box, while the margin's layout pass hands its lf-margin-layout listeners the prose box, proseRect(main) (the event detail #1425 added). Since #4724 a render and its layout pass run in one script, so on the feature gallery's embedded page the "On me" marker was named 7 percent down by the render, renamed 6 percent down by the layout listener, and back again on the next render — an A→B→A write the suite's write watch reports as unchanged write: aria-label on span.lf-margin-marker. The render now measures the same prose box, so both readings agree and the listener's same-basis early return actually fires. The event's declared type said DOMRect; it now names the ProseBox the pass sends. The kernel is rebuilt.

On screen, a marker's spoken position may differ by a percent or so from before on pages whose prose box is narrower or offset from main; nothing visible changes.

Verification: tests/journeys/test_render_startup.py::test_the_gallery_embeds_an_ordinary_stamped_page failed locally on main with the reported finding and passes with this change. A probe wrapping setAttribute captured the two writes and their callers (renderNow → nameMarkers and layoutMountedRows → lf-margin-layout → nameMarkers). The tests that read the spoken position (test_a_pointed_row_is_announced_where_it_stands_and_by_its_words, test_a_margin_entry_walk_position_stays_out_of_its_visible_word) and pnpm run test:runtime pass.

Closes #5162 — automated triage

…reads

A render named each marker's position ("N percent down") against main's
own box, while the layout pass (#1425) hands `lf-margin-layout` listeners
the prose box (`proseRect(main)`). Since #4724 a render and its layout
pass share one script, so a marker whose target sat near a percent
boundary was named 7%, renamed 6% by the layout listener, and back, which
the suite's write watch reports as an unchanged write
(test_the_gallery_embeds_an_ordinary_stamped_page). The render now reads
the prose box as well, so both agree and the listener's same-basis early
return applies. The event's declared type said DOMRect; it now names the
ProseBox the pass sends.

Closes #5162
@leaf-agent
leaf-agent merged commit 083ee8e into main Nov 3, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5162 branch November 3, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embedded gallery repeats unchanged marker label writes

1 participant