Skip to content

Take the page's last block as the reader's place below a page's end - #7209

Merged
max-sixty merged 2 commits into
mainfrom
choice-walk-fixes
Nov 26, 2026
Merged

max-sixty merged 2 commits into
mainfrom
choice-walk-fixes

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Fixes a regression from #7188: once a page's end can rise to the window's top, the reading line (a quarter of the way down the window) can fall in the blank room below everything the page draws. There readingAt met only main, so a walk took the reader to be at the page's start and a let-go landed on main. On a page whose tabs hold two questions, a wheel past the first and m went back to the first rather than on to the second. The page's fallback for a screen with no text block (shownAtLine, which a walk's origin and a let-go read) now takes the page's last drawn block when the line meets only body or the Layout's box below that block's foot, so a reader past the end counts as at the end.

To weigh: the last block is found by descending the page's last children that draw a box, skipping Leaf's chrome and what the page hides (a tab not chosen). It runs only on that fallback, not per frame, and readingAt itself is unchanged, so holds and other columns read as before.

Found while testing a follow-up to #7188 in this session; the maintainer hasn't read it. Tests: test_an_obligation_walk_glides_within_a_view_and_opens_other_tabs_at_the_question failed on main for its non-nested case and passes; 23 neighbouring let-go, hold, walk and page-tab browser tests and the runtime suite (1133) pass; check:browser is clean.

This was written by Claude Code on behalf of max-sixty

Since #7188 a column or sidebar page can scroll until its last line reaches
the window's top, so the reading line, a quarter of the way down the window,
can fall in the room below everything the page draws. There readingAt hit
only the page's own box, and the walk took the reader to be at the page's
start: after a wheel past the first of two tabbed questions, m went back to
it instead of on to the second, and a let-go landed on main.

readingAt now reads the line at the foot of the last box its column draws
when the line falls below it, so a reader past the end is at the end.
test_an_obligation_walk_glides_within_a_view_and_opens_other_tabs_at_the_question
failed on main for its non-nested case and passes again.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clamp to the last drawn box's foot changes the reading line for every readingAt caller, not just the page-end case this fixes. Details inline.

Comment thread browser/runtime/readings/user-place.js Resolved
The clamp in readingAt applied to every column it was given: with focus
scrolled above the window it pulled the line above the viewport, so the
reading-line hold held nothing, and it followed DOM order, so a short last
grid column or float could clamp the line off words being read. readingAt is
back as it was. The page's own fallback, shownAtLine, which a walk's origin
and a let-go read, now takes the page's last drawn block when the line meets
only body or the Layout's box below that block's foot.
@max-sixty max-sixty changed the title Read the reading line at a page's end where it falls below the last box Take the page's last block as the reader's place below a page's end Nov 26, 2026
@max-sixty
max-sixty merged commit c06f708 into main Nov 26, 2026
8 checks passed
@max-sixty
max-sixty deleted the choice-walk-fixes branch November 26, 2026 03:05
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.

2 participants