Skip to content

Wheel return never attaches the pane-selection comment box in a visible frame #4469

Closed

Description

@leaf-agent

Scheduled CI run 40492069054, on 7cbf67854494bde6f7245fff62a3b1861d1cd661, records this failure.

The pane-selection compositor probe finds no qualifying attached frame and reports a 27.1875 reference height. Inspect the captured frame/history evidence before deciding whether the attachment or the probe is wrong.

Affected cases (JUnit names):

  • tests.browser.test_render_send_placement::test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame[pane-selection]
Deciding CI diagnostics
macOS:
AssertionError: (27.1875, [(263.13253012048193, 289.1566265060241), (263.13253012048193, 289.1566265060241), (263.13253012048193, 289.1566265060241), (263.13253012048193, 289.1566265060241), (263.13253012048193, 289.1566265060241), (263.13253012048193, 289.1566265060241), ...])
assert (None is not None)
Original compositor frames and raw history: /Users/runner/work/leaf/leaf/.tmp/test-results/wheel-return-pane-selection

This report session read the failed run and JUnit diagnostics; it did not reproduce locally or establish the introducing change. Reproduce on current main, inspect prior CI results and the introducing change, and distinguish an obsolete assertion from a product regression before choosing a repair. A passing rerun alone does not clear an intermittent defect.

Cause of a failure tracked in #4225.

Activity

  1. added
    tend-ci-cause
    on Oct 27, 2026
  2. leaf-agent commented on Oct 28, 2026

    @leaf-agent
    CollaboratorAuthor

    Reproduced on current main; this is a transient missing frame, not a comment box that never attaches. The original macOS capture shows the passage partly painted without the box in frame 010, then both correctly attached in frames 011–012. The next scheduled run, 40675368197, records the same pane-selection failure and a document-target variant. #4601 preserves the full compositor trace on failure without changing either attachment assertion. This collects missing evidence; it does not fix the attachment failure.

    The evidence points toward native anchor/compositor behavior, but the exact returning-frame mechanism is not yet isolated. A plain HTML reduction without Leaf reproduces a related mismatch on departure: the passage remains painted for a frame after its CSS-anchored box disappears. That establishes a browser-level mismatch, not that it is the cause of this returning-frame failure. Giving the passage will-change: opacity removes that mismatch in the reduction, but creates an authored stacking context; promoting only the floating box and using absolute rather than fixed positioning did not remove it. Those are diagnostic experiments, not verified repairs.

    Reproduction and remaining boundary

    The affected test failed locally on unmodified main with a returned passage at approximately 260.24px and no box marker in the final recorded frame:

    uv run pytest 'tests/browser/test_render_send_placement.py::test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame[pane-selection]' -q -n0

    Later identical runs passed, so those passes do not establish resolution. The local engine is Playwright Chromium 156.0.8078.4, build 1248. The original capture's positioning history contains the initial native position-anchor and inset declarations and the outgoing/returning scroll events, with no accompanying positioning-attribute changes.

    A minimal native page for the related departure mismatch:

    <style>
    body { margin: 0 }
    #scroll { position: absolute; left: 27px; top: 80px; width: 664px; height: 500px; overflow: auto }
    p { margin: 180px 0 0; height: 27px; background: #ff0044; anchor-name: --target }
    #box { position: fixed; position-anchor: --target; left: anchor(left); top: calc(anchor(top) + 35px); width: 592px; height: 169px; outline: 8px solid #00cc44; background: white }
    </style>
    <div id="scroll"><p>The export keeps each tenant in an archive.</p><div style="height:1600px"></div></div>
    <div id="box"><textarea>Keep these words while the page leaves.</textarea></div>

    Record it with render_harness.compositor_trace, move the pointer to (120, 220), wheel by 1200px, wait for scroll_settled(page, '#scroll'), take the outgoing screenshot, then wheel by −1200px. In the captured departure sequence, marker tops in downsampled image pixels were (90, 100), (90, None), then (None, None); return was correctly attached in this reduction. Using a 6× CPU throttle also reproduced the departure mismatch.

    The next diagnostic step is to join a failing screenshot’s frame ID with its PipelineReporter records, then reduce the rendering transition those records identify. The existing macOS artifacts omitted those records and cannot recover them retrospectively; #4601 preserves them for the next failure. Its queued review and tend-land own that diagnostic change’s CI and landing because review waiting is disabled. This issue remains the owner of the attachment repair pending that evidence. Disabling JavaScript during one exact-page scroll experiment did not reproduce it; waiting for comment-box motion also produced a pass, but neither result settles an intermittent failure. The focused test also passed on #4379’s parent under 6× CPU throttling and on current main with reduced motion; those passes do not establish which change introduced the intermittent failure. There is not enough evidence to attribute this to #4379 or to change this test to wait away the failing condition.

  3. leaf-agent commented on Oct 29, 2026

    @leaf-agent
    CollaboratorAuthor

    #4601 has merged, so the diagnostic change no longer needs review or landing. The attachment defect remains unresolved; this issue retains ownership of its diagnosis and repair.

    I checked the five latest completed failing main-push runs (40793933941, 40800885346, 40813169083, 40824435984 and 40833812834): their logs record passes for every wheel-return variant, so those runs provide no failing compositor capture. The latest scheduled run is still 40675368197, from before the diagnostic change merged.

    On current main (a2befc2da0c53a23100d6d4f00e6cd2865313499), the pane-selection case passed at normal speed and with 6× and 20× CPU throttling; document-target also passed at 20×. These are unsuccessful reproduction attempts, not evidence of a repair. I made no code or assertion changes.

    The next diagnostic action remains to correlate the first incorrectly attached screenshot's frame ID with its PipelineReporter records in the saved compositor.json. A failing capture with those records is still missing; the next scheduled macOS run can now preserve it. There is no verified mechanism yet to justify changing attachment behavior or relaxing the assertion.

  4. leaf-agent commented on Oct 30, 2026

    @leaf-agent
    CollaboratorAuthor

    Push run 41014020492 now provides failing Linux captures after #4601: both [pane-selection] and [content-selection] in test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame fail with missing attachment markers. Their reference heights are 27.1875 and 69.0 respectively; both histories include (None, None) and fail None is not None.

    The log names .tmp/test-results/wheel-return-pane-selection and .tmp/test-results/wheel-return-content-selection as the saved original compositor trace, frames and raw history. These are new failing captures for the pending frame-ID/PipelineReporter investigation. I have read the assertion evidence, but have not inspected those captures or established the compositor mechanism.

  5. leaf-agent commented on Oct 31, 2026

    @leaf-agent
    CollaboratorAuthor

    The saved captures now narrow the failure to a returning frame that Chrome reports as missing raster content. This remains unresolved; I made no code or assertion changes.

    I inspected both original frame-006.jpg images from run 41014020492: each shows the returned passage without its comment box. In frame-007.jpg, the box's marker is present at the expected offset. Joining each screenshot's source_id and frame_sequence to PipelineReporter.args.frame_reporter gives:

    Case Missing-box frame Matching compositor report
    pane-selection source 4294968126, sequence 121 STATE_PRESENTED_ALL, has_missing_content: true, checkerboarded_needs_raster: true, checkerboarded_needs_record: false
    content-selection source 4294968127, sequence 113 Same flags

    This establishes that the failing captures coincide with missing raster content; it does not establish which missing tile contains the box or prove an anchor-positioning defect. The pane's next, correctly attached frame (sequence 123) still carries the missing-content flags, so filtering frames by those flags would also discard valid evidence. The content case's next frame (sequence 115) clears them. Neither history records a positioning-style change during the returning scroll.

    On current main, the pane-selection case passed normally, and both cases passed with 6× CPU throttling. Those passes do not settle the intermittent failure. The next diagnostic step owned here is to reproduce the returning-frame raster gap in the plain HTML reduction, retaining frame IDs and compositor records, then distinguish delayed rasterization from an incorrect anchor position. The existing artifact supplies the missing frame/report correlation; waiting for another capture alone is no longer the next step.

    Evidence and reproduction

    Artifact pytest-results-test-41014020492-1 (artifact ID 12961328602) contains test-results/wheel-return-{pane,content}-selection/{trace.json,compositor.json,frame-006.jpg,frame-007.jpg}. Pane frame timestamps are 2789435961 and 2789461790 μs; content timestamps are 2792488716 and 2792515768 μs. Their sampled marker pairs are respectively (260.24, null) → (260.24, 289.16) and (124.8, null) → (124.8, 192.0) CSS pixels.

    Focused local command:

    uv run pytest 'tests/browser/test_render_send_placement.py::test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame[pane-selection]' 'tests/browser/test_render_send_placement.py::test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame[content-selection]' --cpu-throttle 6 -q -n0
  6. leaf-agent commented on Nov 2, 2026

    @leaf-agent
    CollaboratorAuthor

    The plain HTML reduction still does not reproduce the returning-frame failure. I tested the reduction from the earlier comment at 1440×600 in Chromium 156.0.8078.4 with 6× CPU throttling: three trials each of the fixed CSS-anchored box, the same box with will-change: opacity on the passage, and an unanchored absolute box inside the scroller. Each recorded return showed both markers together. This supplies no basis for choosing an anchor workaround or treating the defect as repaired. The two original Leaf cases also passed on this session's checkout at 6× throttling; I changed no code or assertions.

    I inspected the animation records in the original Linux artifact as a separate lead. In pane-selection, the last recorded Animation notification precedes the missing-box frame by 251.494 ms; in content-selection, by 224.915 ms. Those notifications end in state: idle. Therefore the has_main_animation flag on a failing PipelineReporter is not, by itself, evidence that the box's entrance animation was still running when that frame was captured.

    Experiment and remaining diagnostic boundary

    The reduction used the HTML already recorded above, with render_harness.compositor_trace(page, ['benchmark', 'blink.user_timing']), page.mouse.move(120, 220), wheel +1200, scroll_settled(page, '#scroll'), an outgoing screenshot, wheel −1200 and another scroll_settled. The unanchored control moved the box into #scroll with position:absolute; left:0; top:215px. All nine trials produced a returned red/green marker pair (90, 100) in the downsampled screenshots. These are negative reproduction results, not proof that any variant fixes the intermittent defect.

    The source remains artifact pytest-results-test-41014020492-1 from run 41014020492, wheel-return-{pane,content}-selection/compositor.json. Its categories expose frame reports and lifecycle events, but do not supply a per-tile raster history identifying the missing box. The remaining engineering step is to capture the exact Leaf failure with raster/tile and layer diagnostics, then map the absent box to its layer before reducing that layer's return transition. The small HTML example has not crossed that boundary; neither a CSS change nor a relaxed assertion is justified yet. This issue remains open for that diagnosis and repair.

    Focused check in this session: both affected cases in tests/browser/test_render_send_placement.py::test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame, with --cpu-throttle 6 -q -n0: 2 passed.

  7. leaf-agent commented on Nov 16, 2026

    @leaf-agent
    CollaboratorAuthor

    Closing: this failure has not recurred in any completed ci run on main since Oct 31. Its last occurrence was push run 41180538374 on a65d679fd (Linux, [document-target], the same None is not None missing-box signature). No single repair is identified, so this closes on absence of the failure, not on a verified mechanism.

    Before that, the missing-box failure showed up in about 2 of the roughly 49 completed main runs from Oct 28 to Oct 31. Since then, the JUnit results of 172 completed runs that ran the test show no pane-selection, content-selection, document-target or code-target failure on Linux or macOS. Those runs are every failing push run on main from Oct 30 to Nov 16, plus the scheduled runs from Nov 1 to Nov 15. A passing run reports no failures at all, so the remaining main runs passed this test too. At the earlier rate, 172 clean runs in a row would happen by chance about once in a thousand tries. On current main (a09135969), all five variants also pass locally with 6× CPU throttling. In the same window the floating comment box's placement and motion were reworked several times (for example #5054, #5242 and #5580). Those changes plausibly removed the frame where the passage painted without its box, but I haven't shown which one did.

    The test and its assertion are unchanged apart from the card gap in #5853. The trace capture from #4601 still runs on failure, so if this comes back, the CI report will include the compositor trace and frames needed to resume the frame-ID/raster diagnosis recorded above.

    [combined-selection] failed in almost every run from Nov 2 to Nov 14 with a different message: "Resume writing did not reveal its original passage" (y=−3.05). That is the geometry failure #5182 tracked, not this one. It passed in the Nov 15 scheduled run and in the push runs since Nov 14 17:00.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions