Skip to content

fix: credit the carry a preparation's landing begins in its first frame's ResizeObserver delivery - #6854

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-6736
Nov 23, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-6736

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The flake in #6736 is in the shift watch, not in the panel. The watch credits a rendering with an effect a ResizeObserver delivery begins in the frame that rendering first draws in, as the effect begins (#6020), so a server reading that lands before the next tick cannot seal the rendering first. That rule covered only the open input rendering, not a widget preparation's landing. A pasted image in an open thread lands through a preparation, and the floating panel's .lf-fp-head carry begins in that landing's first delivery. If the reading landed between that animate call and the next tick, the landing was sealed before its tick could collect the carry. The carry stayed unowned, so releasing the held carry read as the Back, Resolve and Close buttons moving 124 px without input.

Landings now note the frame they first draw in (drawsIn), and deliveredBy gives each unsealed rendering drawing in that frame, open or landing, the effects its delivery begins.

Evidence:

  • A probe run showed the order in a failing run: carry begun at 4845 ms with a landing open and no input rendering, the reading landed at 4871 ms, and the next tick at 4873 ms found the landing sealed. In a passing run the tick came first.
  • test_a_carry_a_landing_s_own_layout_begins_is_the_input_s_though_news_lands, a new test in test_render_shift_watch.py, reproduces that order deterministically. It fails 3 of 3 on main's watch (button#control moved without input) and passes 5 of 5 with the fix.
  • test_an_image_pasted_in_an_open_thread_stands_between_the_thread_and_the_box[key], run alone one at a time: 6 of 20 errored on main, 0 of 20 with the fix.
  • The shift-watch tests covering landings, preparations, news, carries and deliveries pass (74), as do the floating panel's paste cases.

Closes #6736 — automated triage

…me's ResizeObserver delivery

The shift watch credits a gesture's rendering with an effect a ResizeObserver delivery begins in the frame that rendering first draws in, as the effect begins (#6020), so news landing before the next tick cannot seal the rendering first. That rule covered only the open input rendering, not a widget preparation's landing. A pasted image in an open thread lands through a preparation, and the floating panel's head carry begins in that landing's first delivery. When the server's reading landed before the next tick, which happened in about 30% of local runs, the landing was sealed, the carry was never owned, and releasing the held carry read as the panel's furniture moving 124px without input.

Landings now note the frame they first draw in and own the effects such a delivery begins, as the open rendering does.

New shift-watch test: a landing's delivery that begins a carry and stamps news before the next tick. It fails 3 of 3 on the old watch and passes with the fix. The floating panel's `[key]` paste case failed 6 of 20 runs before the fix and 0 of 20 after.

Closes #6736
@max-sixty

Copy link
Copy Markdown
Owner

The first-frame delivery fix and the regression's ordering look right. Please remove the incident clause from the new test's docstring: “where the panel's head jumped the rest of its carry in one frame and read as moved by news.” AGENTS.md places that incident history in the commit message. Keep the ResizeObserver delivery → server reading → next tick ordering in the test description, since that is the behavior the regression proves.

This was written by Codex on behalf of max

The docstring now describes the ResizeObserver delivery, server reading, next tick
ordering the regression proves, and leaves the panel-head incident to the commit
history, as AGENTS.md places it.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Removed the incident clause in 6a8dd1e. The docstring now says the carry is the input's though the server's reading lands after the first frame's ResizeObserver delivery and before the next tick, which is the ordering the regression forces.

@leaf-agent
leaf-agent merged commit 6184296 into main Nov 23, 2026
7 of 8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6736 branch November 23, 2026 07:43
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.

test_an_image_pasted_in_an_open_thread_stands_between_the_thread_and_the_box[key]: panel furniture moves 124 px up without input at teardown

2 participants