Repository navigation
Know today's layout shifts by test and region - #1460
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # tests/shift_watch.js
# Conflicts: # tests/conftest.py # tests/render_harness.py
#1451 took the nightly-marked tests off the shift watch because `EXPECTED`'s region patterns could not hold what their pages do: hundreds of distinct moved elements, and Chrome names only the five a frame moved most, differently between runs and machines. A region broad enough to hold them would mask the runtime's own pieces on every page. `tests/known_shifts.py` now names the tests whose pages still shift without input (`KNOWN_UNASKED`, 287 tests by file and function, each with what a survey saw move) and whose typing carries its field (`KNOWN_CARRIES`, 2), and `clean_browser` keeps exactly those reports for exactly those tests. Every test watches shifts again, so a new test, or a known test's typing, still fails on any shift. The lists come from a complete `--run-nightly` run with them empty. One defect is every page's, so `shift_watch.js` knows it by when it happens instead: a shift before a page with the runtime is presented, or in the frame that presents it, which carries every box the widgets' upgrade reshaped. A keystroke's rendering also ends at a window resize, which lays the field out anew: a test that resized right after typing read as typing's carry. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The nested-frame input window kept only the last press, so a key that arrived before the observer judged an earlier key's frame un-credited it: in the clipped-sample test, Enter opened the child's panel, the frame at 400ms moved its status, and `u` at 404ms left that frame without input. Every recent press is kept now. A trusted key or press in a same-origin page holding the frame counts too, as when the page around a sample drives it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # tests/shift_watch.js
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A nightly run on Linux CI (36659812215) found 58 tests the local survey had not, most of them a margin cluster placed after presentation. So the nightly-marked tests stay off the watch, as #1451 had them, now decided beside the lists (`known_shifts.watches_shifts`); the lists hold what the surveys and that run saw, for whoever takes up each defect, and the reports #1446 and #1444 fixed are out of them. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Sep 30, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The per-test allowance hides new layout shifts in tests already listed for a known one; see the inline finding. The PR description also leaves the startup cover decision open with the user, so I am withholding approval pending that decision.
…hed tests The review on #1460 showed the per-test allowance keeping any report "moved without input" from a listed test, so a new shift anywhere in it went unseen. Each entry now holds a pattern for the region its known shift moves, and a report naming a node outside it fails the test. The nightly-marked tests do not watch shifts, so their entries were inert, and a fresh survey will find what they do once the upgrade that causes most of it is fixed: only the four watched tests the surveys found remain. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 30, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 30, 2026
…omment box in place (#1453) Typing into a comment box that stands left of its passage (`left-start`) carried the box sideways, which the shift watch reported on two nightly tests (`test_the_catalog_sidenote_can_be_aimed_whole` and `test_a_side_comment_grows_down_from_the_line_it_was_opened_on[250-left-start]`). **Cause, measured frame by frame.** `floatingPlacement` (`runtime/floating.js`) wrote every box's spot as `left` and `top` insets. A `left-start` box is held by its right edge, so when a keystroke widened it, the browser grew it rightward, past the passage, in the frame the key painted. The placement that follows the resize ran a frame later and moved it back left. In the side-comment test the box painted at x=348 with its right edge at 667, then at x=285 with its right edge at 604, where it belonged: the whole box moved 63px under the user's keys. With this change the right edge stays at 604 in every frame and only the left edge moves. **Fix.** A floating box now stands by the edges that hold it, one per axis (`held` middleware in `floating.js`): on the axis its placement stands it beside something, the edge facing it; on the other axis, the edge its alignment names; and on an axis where the boundary shifted it in, the edge against that boundary. `stand` writes those insets (`right`, `bottom`, or `left`, `top`), in the page's plane as offsets from the anchor and in the window's plane from the containing block, so content growth moves only the free edges in the same layout pass, and the next placement finds the same insets and writes nothing. The inline thread card places itself with its own middleware under the default `bottom` placement, so it still stands by `left` and `top`. The comment box's placements above and below a passage were named `top-end` and `bottom-end`, although its offset kept the box's start edge fixed. They are now `top-start` and `bottom-start`, with the same offset expressed from the start, so the placement names the edge that holds the box and `held` can read it from there. The tests that read `data-lf-placement` follow the rename. **Evidence.** Before #1460, `tests/test_render_aim.py` with `--run-nightly` watched shifts: against the merge base, the side-comment carry error was the only change, and the 27 remaining errors were the same "moved without input" reports main had, none from typing. Since #1460 the nightly-marked tests no longer watch shifts, so that run is the carry evidence. `npm run test:runtime` and `uv run pytest tests` pass on the merged tree. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[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.
The shift watch from #1432 now knows the shifts pages make today by test and region. Before,
EXPECTEDintests/shift_watch.jsheld one set of region patterns for every page. Chrome names only the five nodes a frame moved most, which differ between runs and between macOS and Linux, so each run turned up names the patterns missed. The only patterns broad enough to catch them would have masked the runtime's own pieces, such as margin entries and the comment box, on every page.tests/known_shifts.pynames each test whose page still shifts without input, by file and function, with a pattern for the region its known shift moves.clean_browserkeeps a report from that test only when the node it names is in that region. Any other shift fails, as does typing that carries its field. Four watched tests are listed today. Fixing a defect deletes its entry.shift_watch.jsdoesn't report a shift before a page with the runtime is presented, or in the frame that presents it. The rule is deleted when the upgrade is fixed, however that is done.known_shifts.watches_shifts). Their pages make hundreds of shifts, mostly that same upgrade: 781 reports across 321 test runs locally, and a nightly run on Linux CI (36659812215) found 58 tests the local run had not. They watch again, with the entries a fresh survey finds, once the upgrade is fixed.The sensor also changed in three places:
test_render_shift_watch.pygains a press in the page holding a frame, which fails without the change.The everyday selection passes locally.
🤖 Generated with Claude Code