Repository navigation
Adapt the browser tests to a document's end room, and keep the room off the root headers' observer - #7244
Merged
Conversation
…ff the root headers' observer #7188 gave a column or sidebar page room below its body for its last line to rise to the window's top. About 35 browser tests failed after it. Each was weighed against that intent (tests/AGENTS.md, "Failing tests"). The room keeps reading the CSS head room but no longer `--lf-top-covered`. That variable adds `--lf-root-headers`, which dom/root-headers.js writes from a ResizeObserver, so a package header changing height resized the body inside that observer's pass. The browser reported "ResizeObserver loop completed with undelivered notifications", which fails a page's render check (test_public_api). A page with a marked header can now lift its last line under that header, by the header's height. Tests whose subject is the page's foot (a destination no scroll lifts clear of an open view, content leaving below that clamps the page, a card or box that only fits over its words) now take the room away through one harness helper, `without_end_room`. The two inline copies #7188 added are replaced by it. With the room, the runtime lands those destinations above the view and keeps the view open, which is #7188's intent. Tests that only read a coordinate the room moved now read the behaviour they protect: the chrome room past the body's end room, the body filling at least the window, the contents lens's place on its own map, the tally's place on the page, a draft line scrolled to the window's middle, and the draft's following paragraph at the window's foot. The comment-note test scrolls back to the top when it resets its margin, rather than relying on the page clamping there. Left failing: test_a_stuck_sidebar_track_keeps_its_place_to_the_page_end. A sticky track can't stick past its aside's end, so at the page's end the track now leaves the window. That is a conflict between the room and the track's behaviour, for the maintainer to settle. Refs #7240
…op shows test_an_arrival_the_opening_view_will_cover_puts_it_away read `seenRect` once the animations playing at the read had finished. The panel's box starts to shrink only after the leaving view's fade ends (panel/floating-panel.js), so that motion isn't among them, and on CI's runner (run 45768589374) the read landed while the box still covered the stop; the failure picture shows the stop in sight at rest. The test now waits with `panel_settled(page, open=False)`, so the stop is read where the panel comes to rest, which is what the test protects.
This was referenced Nov 26, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 26, 2026
…ew, and adapt two journeys to the end room (#7288) All three nightly journeys that #7188's end room turned red now pass. One of them caught a real defect: a thread card could stay unread after the user opened it. **Product fix: a card the placement brings into view is read.** `records/thread/read.js` ran an exposure pass on scrolls, room changes (`watchRoom`) and body resizes, but not when a body moved without any of those. With the end room, pressing `t` on a page scrolled below its top scrolls the page, which is instant under reduced motion. The card's floating placement then moves the card from its anchor to the window's foot. Its message goes from 818–997 px (24 px seen) to 504 px and up, wholly in view, and no pass runs after that move. So the message, its thread's "1 unread" and On Me's "1 thread with news" stayed until the next scroll, and the render gate saw the second open mark it read. Each observed body now also has an IntersectionObserver at thresholds 0 and 1, so a pass runs when a body enters the window or comes wholly into it. This is the same primitive `whenChanges` in `dom/geometry.js` uses for layout moves. `test_a_card_its_placement_brings_into_view_is_read` (browser tier) fails on `main` (the news dot stays shown) and passes here. The render gate's `thread-choice-hints` case fails before and passes after. **Two journeys read a place the room moved.** #7188 meant the room for these column pages, so both tests keep what they protect: - `test_the_page_end_clears_the_bottom_chrome_around_a_workspace`: its first page is a column document with a pane, not a workspace. Its assertion that the body keeps no *panel* room read the end room's 584.8 px. It now reads the page through `without_end_room`, the helper #7244 introduced. The workspace pages in the test are unchanged and still pass. - `test_hiding_annotations_gives_marked_words_their_own_colours_back`: `t` walks from the reader's place. Before the room, centring the document's last line clamped at the page's end. Now it centres exactly, and `t` reached the document's `"resend now"` thread instead of the link's. The test now scrolls to the top before `t`. It passes in Chromium, Firefox and WebKit. Checked: each of the three tests run alone with `--run-nightly` (failing on `ab811b350`, passing here), the neighbouring read-state browser tests, `pnpm run test:runtime`, `pnpm run check` and pre-commit. #7245, the sidebar track's end-of-scroll decision, is separate and untouched. Closes #7282 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 26, 2026
…nd the contents map still from the page's top (#7308) Keeps a sidebar's sticky track, and so the contents map, where it sticks through the end room #7188 put on `body`, and stands the contents map at its sticking line from the page's top. The body's room becomes a token, `--lf-end-room`, and the track's end margin hangs through it as it already hung through the sidebar's own end padding, where the sidebar is the page's Layout box. Under the narrowed contents map with no header, the track's start margin hangs through the sidebar's top padding. On the maintainer's README page at 1728×999 the map's top went from 64px at the top and −816px at the end to 24px throughout, in Firefox and Chromium. To weigh: only a `footer` after the sidebar or its `main` stops the end hang, since browser extensions append elements to `body` (all four in the maintainer's Firefox do). Each hang comes off the height the aside asks of the row, so a sticky track taller than the body no longer stretches it: on the triage board with its activity open, the lanes end below their cards. Max asked on his review page for lf-toc not to scroll; he hasn't read the diff. Codex reviewed it twice; its findings on nested sidebars, a layoutless `main`'s child and a site footer are folded in. Tests: the track test that #7244 left red passes in both engines with new cases; a new test keeps a sidebar among a column's blocks off what follows it; the lens test checks the map stands still; the rule-cost tests pass. Closes #7245 > _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.
#7188 gave a column or sidebar page room below its body, so its last line can rise to the window's top. About 35 browser tests failed after it. This repairs all of them but one, which needs a decision (below). Every repaired test failed on
mainand passes on this branch, locally in Chromium, Firefox and WebKit where the test runs them: 69 passed, includingtest_deck.py, which exercises the room itself.One product fix. The room subtracted
--lf-top-covered, which includes--lf-root-headers.dom/root-headers.jswrites that variable from a ResizeObserver, so a package header changing height resized the body inside the observer's pass. The browser then reportedResizeObserver loop completed with undelivered notifications, which fails a page's render check (test_a_package_reads_the_public_api_and_nothing_behind_it). The room now subtracts the CSS-only--lf-head-room. The error went away in 2 of 2 runs, and putting the variable back brought it back in 2 of 2. What changes on screen: a page with a marked root header, such as a page tab strip, can scroll its last line up under that header, by the header's height. Pages without one draw as before.Tests about the page's foot now take the room away through one harness helper,
without_end_room, which replaces the two inline copies #7188 added. These tests set up a destination that no scroll lifts clear of an open view, content leaving below that clamps the page, or a card or comment box that fits only over its words. With the room, the runtime correctly lands those destinations above the view and leaves the view open; I checked themtravel case directly. So the room removes the tests' premise rather than breaking their behaviour. Affected tests: the on-panel travel, On Me, idlemclamp and obligation-walk tests, the panes wheel, thread back/forward (2 files), the drawn and pasted media cases, the drafting-card helper behind the card-reply tests, render-aim above, the send-placement reopening and the floating-panel arrival.The floating-panel arrival test also now waits for the panel to stand closed before it checks that the foot stop shows. The box starts shrinking only after the leaving view's fade ends, so waiting on the motions playing at the time could read the box mid-shrink. That happened once on CI, and the failure picture shows the stop in sight at rest. It passed 18 of 18 copies under load locally before the change and 8 of 8 after it, so the race didn't reproduce locally.
Tests that read a coordinate the room moved now read the behaviour they protect:
Left red:
test_a_stuck_sidebar_track_keeps_its_place_to_the_page_end. A sticky track can't stick past its aside's end, so at the end of a page with the room the track leaves the window. That conflicts with #7188's intent, and #7245 asks the maintainer to decide.Effects of the room seen while diagnosing, not changed here
test_a_box_held_at_the_window_s_top_hangs_its_pictures_inside_the_windowkeeps testing the top-held case, with the room taken away.body. Only an artificial layout change reached this state in the test.Closes #7240 — automated triage