Skip to content

Side-comment rail rechoice and diagram-scroller follow tests fail since #7363 keyed the fresh choice on the target's width #7380

Done

Description

@leaf-agent

Two browser tests about a comment box beside words that move sideways have failed on every run since #7363:

  • tests/browser/test_render_aim.py::test_a_side_comment_rechooses_its_rail_after_horizontal_target_motion[inline] and [ancestor]: after translateX(600px) on the paragraph (or on its parent), the box keeps data-lf-placement="right-start", and the test expects left-start.
  • tests/browser/test_render_reactions.py::test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gone: after the diagram scrolls 24 px sideways in its own box, the diagram part moves 17 px and the box moves 11 px. The test allows a difference of 2 px, and this one is 6 (abs((123 - 134) - (17 - 34))).

First failing run: run 45961543011 on 6999c938f. Both passed in run 45948475842 on 37e0cb217.

Bisect: run together with uv run pytest -n0 -q, all three cases pass on 5ce72be74^ and fail on 5ce72be74 (#7363) and on current main (b008b0d73).

Diagnosis so far: #7363 changed commentPlacement's choose (browser/runtime/annotations/annotation-overlay/comment-placement.js). The input that makes it choose a side afresh used to be keyed on the target's left and right edges, and is now keyed on its width (key = {unanchored, boundary, width}). That stops a sideways scroll of a box around the log from choosing afresh, which is what #7363 intended. It also stops the choice when a transform carries the paragraph 600 px toward the right rail, so the box stays on a side that no longer has room. That case is the one the aim test protects ("Reference geometry, not content size, invalidates the chosen margin rail"). #7363 also removed the separate inline offset, so every landing keeps its held edge's offset from the column. The reactions test's 6 px lag, in a box beside a part of a scrolled diagram, follows that change, though I haven't traced the exact path. A repair that keeps #7363's intent would keep the side through motion the words and their box share, and choose afresh when the held side's room no longer fits the box. Whether that is the rule is the question the fix settles.

Cause of a failure tracked in #7376.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    #7383 fixes both failures. The rule is the one the diagnosis proposed: keep the side through shared motion, and choose afresh when the held side's room no longer fits the box.

    All three cases fail on main and pass on the branch. The runtime suite and the focused placement browser tests pass too. The PR's CI and landing are with the tend-land workflow.

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