Skip to content

test_a_patch_resumes_preparation_on_return_and_keeps_its_finished_rows: lf-diff redraws unchanged rows at teardown since #7542 #7555

Done

Description

@leaf-agent

test_a_patch_resumes_preparation_on_return_and_keeps_its_finished_rows[inline] and [bound] (tests/browser/test_render_diff_controls.py) pass their body but error at teardown since #7542 (b70d27a, "Rebuild defineWidget thin"). The browser watch reports a redraw of the lf-diff shadow root that writes what was already there:

unchanged write: children of div.lf-diff-file-actions.lf-ui.lf-ui-face in #shadow-root in lf-diff#patch.lf-rendered
unchanged write: children of div.lf-diff-line in #shadow-root in lf-diff#patch.lf-rendered

The test removes a patch lf-diff and reinserts it in a later task, both while its parser is held and after it has finished, so the writes come from the widget's draw on departure and return.

  • Runs: 46180228111 on 74dd35c38 (first failing push run that completed; the push runs between were cancelled).
  • Reproduces locally on every commit from b70d27a through 25f9d33f9 (current main). Its parent 46f9bec91 passes: uv run pytest -q "tests/browser/test_render_diff_controls.py::test_a_patch_resumes_preparation_on_return_and_keeps_its_finished_rows" gives 2 passed there and 2 passed, 2 errors from b70d27a on.

test_a_sample_in_a_reply_is_quoted_there_too also first fails at b70d27a, through a different widget and symptom: #7556.

Cause of a failure tracked in #7554.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    Fix is up in #7558. Its review, CI and landing are still to come.

    The cause: since #7542 the host sets state again when an element returns. On lf-diff that set starts a Lit update before the arrivals batch has registered the diff's thread surface again. With no opener at that moment, reconcileEntryComments takes away each file's Comment control and each line's comment gutter, and the registration a moment later puts them back. The write watch flags that round trip at teardown. Reverting the return's state set alone makes both parametrizations pass, and logging the order showed the set, then an update with no opener, then the registration.

    #7558 has the thread-surface watch register a widget as the widget says lf-connect, before the host's sets for that connection. The return still sets state as #7542 intended. Both parametrizations go from 2 passed, 2 errors on main to 2 passed, and the runtime suite and the thread-surface browser tests pass.

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