Skip to content

Two browser tests fail since #7439 marked a drawing's part on its frame alone #7497

Todo

Description

@leaf-agent
Test Deciding error
tests/browser/margin/test_entries.py::test_threads_on_two_parts_of_a_picture_stand_an_entry_each_tracing_its_part AssertionError: flow: the [data-lf-traced] element is not the #flow g[data-id="U"] part the entry should trace
tests/browser/test_native_document_layout.py::test_native_sidebar_is_placed_before_widget_activation the layout before activation differs from after by 8 px of height (wide 179.97 vs 187.97, after.y 454.1 vs 462.1, route 409.3 vs 417.3)

Both are in the commit range of #7439 (e7b897afd), and a bisect over that range puts both at it.

First failing run: 46079332027; every push run after it through 46099887165 also fails.

All of these fail on cd2495ac7 (current main when diagnosed) on the Tend runner, running each node id with uv run pytest -n 3. A bisect over main's first-parent commits put the first failing commit at the PR named in the title: each test passes at the commit before it and fails at it.

Cause of a failure tracked in #7387.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    One test here is a stale assertion and has a fix in #7506. The other was misattributed: it comes from #7447, not #7439, and the fix is a CSS design call I've left with @max-sixty.

    test_threads_on_two_parts_of_a_picture_stand_an_entry_each_tracing_its_part: #7439, fix in #7506. #7439 meant to put a drawing part's marks, the trace included, on the frame the part is drawn in. So the trace on diagram node U now lands on its rect, and the test still expected the g. #7506 makes the test expect the frame and keeps its check that only that node is traced. It fails on current main and passes with the change. Its CI and landing are with tend-land.

    test_native_sidebar_is_placed_before_widget_activation: #7447. This test passes at #7439. A first-parent bisect over #7439..d0618e073 finds that it passes at 97f0803 (#7425) and fails at 2d49456 (#7447), which keeps the page's reading face in a shadow tree's slots. The earlier bisect most likely went wrong because the worktrees had no node_modules, so every commit failed during setup.

    Here is the mechanism. The worktree's slotted <p> has an 8 px top margin before activation and none after, so lf-worktree-diffs ends up 8 px shorter (187.97 → 179.97).

    • Keep the page's reading face in a shadow tree's slots, and .lf-ui border-box there #7447 moved the face reset from :host onto :where(:host > :not(slot)) (reading.css). The host now carries --lf-reading-face: 1.
    • The face's rules match an element whose parent carries that value. So the tree's top-level details.lf-worktree-disclosure still gets them, even though its own value is reset. One of those rules is details { --lf-block-frame: trim } (reading.css).
    • The frame-edge rule (rendered.css) then passes --lf-frame-start: 1 through .lf-worktree-body and its slot, and it zeroes the first slotted child's top margin.

    At #7425 every element in that chain reads --lf-block-frame: 0 and --lf-frame-start: 0. At head, details reads trim, and the body, the slot and the <p> read frame-start: 1.

    So #7447's own statement, that "what a declared shadow tree draws starts without the face", doesn't hold for the tree's top-level elements. That goes beyond this one test: every top-level element of every declared tree on a reading-face page picks up the face's rules. I found no plain CSS route that resets the face on the host and still hands the page's value to the slots. A var() on the host resolves against the host's own reset value, and inherit() isn't supported in the Chromium the suite runs (159).

    @max-sixty, the choice is how the face should reach slots but not the tree's own top-level elements. The options I see:

    • Put the reset back on :host and give the slots the page's value another way.
    • Have the face's rules skip a shadow tree's top-level elements.
    • Accept that the face reaches them, and have the worktree's sheet state its own frame.

    I've assigned you this issue for that decision.

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

Metadata

Metadata

Assignees

Labels

tend-ci-cause

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions