Repository navigation
fix: Credit the carries of a growing thread view in the shift watch - #7257
Conversation
…ce news seals a landing, in the shift watch test_an_answer_the_user_waits_for_grows_the_view_up_to_its_cap failed 6 to 8 of 24 copies run four at a time on a 4-core runner, in two shapes, both from the shift watch misreading motion dom/box-motion.js draws correctly: - A news-begun ride moves each sticky box's inset against the carry, so a stuck New reply holds its line. The watch credited the outlet's translate to New reply but not the inset effect, which no rendering owned and which was no carry, and reported the difference as a move. It now credits an inset effect begun on a sticky box inside a running carry beside that carry, seeds its reading from before it began as a carry's is, and records `right` and `bottom` among the underlying insets. - A preparation's landing still open when news arrived blocked any later effect from counting as a carry, even once news had sealed the landing (`told`), as it already does the open input rendering. The head's carry of the 318 px growth went uncredited. A sealed landing no longer blocks a carry. Two new watch tests fail on the old watch and pass now; their fault arms (an uncountered stuck box, an inset moved with no carry) still fail. The journey passes 48 of 48 copies under the same load. Refs #7180
|
@leaf-agent The sticky inset accounting has a controlled test and looks sound. The whole-panel arm still needs correction: #7180's frame trace reports the panel head painted at y=146 before the carry starts and at y=464 after it starts, a 318 px jump. This PR changes only the shift watch, so accepting a carry that starts after that layout step would hide the observed motion. Please keep that arm detectable and fix the carry timing in
|
…ews sealed a landing The sealed-landing credit for a carry must not hide a carry that starts late. The new `a-frame-late` arm begins the carry two frames after the port grows, so a frame paints the head at its risen place and the carry draws it back down; the watch reports the head's move.
|
I went with the second option. A per-frame painted trace shows that the y=146 sample was never painted. The carry starts in the frame that first draws the grown layout, before that frame paints, so I left In one failing copy (times in ms), all of the following is one Chrome
So the frames painted show 464, then 464, then the slide. The 146 pose exists only between the layout and the observer delivery. No The full table and the method are in the description. The instrumentation was temporary and is not committed. At |
The thread view's "moved without input" teardown failures are false positives in the shift watch (
tests/shift_watch.js). In both shapes in #7180, the watch misreads motion thatdom/box-motion.jsdraws correctly, so the user sees nothing move. The change is to the watch and its tests. On a 4-core runner,test_an_answer_the_user_waits_for_grows_the_view_up_to_its_capfailed 14 of 48 copies run four at a time before this change, and passes 48 of 48 after it (and 24 of 24 again at this head).New reply shape (
lf-new-reply … moved without input by (0, 22–92)px). When news grows the view,streamContentcarries the outlet down 318 px and slides it back. It also moves each sticky box's inset against that carry on the same clock, so the stuck.lf-awaitedthat holds New reply stays at its line. A per-frame log showed New reply at y=798 throughout, withbottomanimating 308px → 0 beside the outlet's translate of 318px → 0. The watch credited the outlet's translate to New reply. It did not credit the inset effect, which no rendering owned and which is not a carry. So it reported the translate as a move. The watch now credits an inset effect on a sticky box inside a running carry, beside that carry (countersCarry). It seeds the effect's reading from before it began, as it already does for a carry, andunderlyingnow recordsrightandbottomwithleftandtop. The existingstickyInsetMotionstill bounds that credit.Whole-panel shape (
lf-fp-back … (0, 318)px; the same frame moved leaf-floating-panel). The watch's y=146 reading was never painted. The long answer is inserted in astate-feed.jstask. The next frame's rAF callbacks, the watch's tick among them, then read the grown layout before any carry exists. The same frame's ResizeObserver delivery (fit→followBox→follow) starts the head's carry from 318 px before that frame paints, so the head stays at y=464 on screen and slides up. The watch did not credit that carry: a widget preparation's landing was still open, which news had already sealed (told, set whendata-lf-readingchanges).beginsOwnedlets an effect count as a carry once news has sealed the open input rendering, but it refused while any landing was open, sealed or not. Sealed landings no longer block a carry, matching the rule for the open rendering. A carry that starts a frame after its step paints still fails (a-frame-latearm below).Verification
tests/browser/test_render_shift_watch.py:test_a_stuck_foot_holds_its_line_through_a_carry_of_what_holds_it: the countered arm fails onmain's watch and passes here. Its two fault arms still fail on both: a stuck box left to ride the carry, and an inset moved with no carry under it.test_a_carry_news_begins_after_it_seals_a_landing_carries_its_step[in-its-frame]: fails onmain's watch and passes here. It asserts that the landing was still open when news sealed it.…[a-frame-late]: begins the same carry two frames after the port grows, so a frame paints the head at its risen place before the carry draws it back down. The watch reports the head's move.pytest tests/browser/test_render_shift_watch.py -k "carry or carries or landing or preparation or sticky or news or rides or inset or animation or transition or translat". They includetest_a_carry_a_landing_s_own_layout_begins_is_the_input_s_though_news_lands, which covers a carry begun before news.-k "grow or answer or stream or new_reply or covers".uv run leaf-dev suite flake --copies 24 --workers 4 'tests/journeys/test_render_floating_panel.py::test_an_answer_the_user_waits_for_grows_the_view_up_to_its_cap'.Per-frame trace of the whole-panel failure
Recorded with temporary instrumentation in the journey (not committed): a rAF loop reading
.lf-fp-back's top, a wrapper onElement.prototype.animatelogging the head's carry with its stack anddocument.timeline.currentTime, a ResizeObserver on the panel created after the panel's own (so it delivers afterfollow's), and Chrome'slong-animation-frameandlayout-shiftentries. Undersuite flake --copies 24 --workers 4four copies failed with the 318 px shape. One failing copy, times in ms:Response.text.then(host/state-feed.js) inserts the answerResizeObserverCallback→fit→followBox→followstarts--lf-box-carry: 0px 318px → 0All of it is one long-animation-frame entry (7362.1–7511.9), so nothing paints between the insertion and the carry. No
errorevent fired, so no ResizeObserver delivery was skipped. All 32 copies of the earlier run, passing and failing, show the same order: the tick reads 146, and the same frame starts the carry and paints 464. So every copy has the unpainted 146 sample, and a copy fails where the watch denies the carry its credit.The issue's two macOS-only findings did not reproduce on Linux: 24 of 24 copies of each passed under the same load. The macOS
test_a_streaming_answer_grows_the_view_until_it_outgrows_its_capfinding has the same signature as the whole-panel shape, but nobody has shown it has the same cause. Nobody has reproduced theTypeErrorintest_an_open_view_covers_the_page_beneath_it, and its next failure in a scheduledtest-macosrun will bring it back to triage.Closes #7180 — automated triage