Skip to content

test_back_returns_to_the_card_a_later_open_in_panel_left: Open in panel click lands while the margin card is still moving #7124

Done

Description

@leaf-agent

tests/browser/threads/test_navigation.py::test_back_returns_to_the_card_a_later_open_in_panel_left[wide-browser] failed once on main in run 45539313453 (a1ac633), at the click on the margin card's Open in panel after two t presses had stepped the card from the thread on p10 to the one on p40:

Locator.click: Timeout 120000ms exceeded.
  - waiting for locator(".lf-margin-preview").get_by_role("button", name="Open in panel", exact=True)
  - element is not stable
  - … performing click action
  - <p id="p41">Paragraph 41. …</p> from <body …> subtree intercepts pointer events
  - element is not stable
  - element is not visible

The failure screenshot shows the page scrolled to p40 with the card closed: only the passage's highlight and its margin marker remain. So the card was still moving when Playwright scrolled it into view, the click landed on p41, and the card then closed — consistent with that click on the page dismissing it.

Diagnosis so far: the click needs the card to be at rest after t scrolls to the second thread, and the test only waits for data-lf-thread to change. Whether the product lets a card keep moving after the step that placed it (which a user's click could also hit) or the test should wait for the step's scroll to settle (tests/AGENTS.md, Races) is not yet established. It passed 4 of 4 locally in Chromium and Firefox, wide and narrow, on an idle 4-core runner, and no other ci run in the last 40 failed on it.

Cause of a failure tracked in #7120.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    The click lands while the card is still gliding, and that glide is the designed motion of a card moving to its new passage. Nothing is left over from the step. After the second t, the document's scroll lands within a couple of frames, then .lf-margin-preview runs its box-motion animations for about a dozen more as it moves from the p10 seat to the p40 one. The test waited only for data-lf-thread, which changes before the glide begins. A probe in the original ordering found the card still animating when the click was issued.

    #7126 has this test and test_a_rewrite_written_in_a_card_back_returned_to_reopens_there, which repeats the same steps, wait for scroll_settled and CARD_AT_REST before clicking. Both pass in Chromium and Firefox, wide and narrow. The original failure never reproduced locally (12 of 12 passed under load with CPU throttling), so the evidence is the ordering, not a before-and-after run. Review and landing are pending on #7126.

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