Skip to content

Eight margin and document journeys fail since #7442 headed a margin card with its thread's title #7528

Done

Description

@leaf-agent

Eight journeys pass at 034ed3e4a and fail at bfd1b7b75 (#7442, "Head a margin card with its thread's title, and let each message's name scroll with it"). I ran them by node id on Linux at both commits. All fail in the Linux test job (and on test-macos) of scheduled run 46137118943 on ad7b71b63. #7512 updated the browser tests #7442 broke (#7495), but journeys run only in the scheduled suite, so these weren't covered.

Test Deciding error at ad7b71b63
tests/journeys/margin/test_card_placement.py::test_every_card_keeps_the_placement_rules[column-1000], [column-1440] ('column', 1440, 'in-4', 'open', 'uncut-while-shown', {'top': 35.7, ...}) breaks scroll-held-in
tests/journeys/test_render_aim.py::test_open_draft_retains_words_when_responsive_layout_hides_its_target[False], [True] #bg-contents a doesn't match :focus-within
tests/journeys/test_render_margin.py::test_continued_margin_draft_grows_below_its_first_line_after_agent_reply editorTop 419.3, expected 426 ± 0.5
tests/journeys/test_render_margin.py::test_a_second_margin_reply_grows_below_the_first_line editorTop 509, expected 514 ± 0.5 (#7415 had fixed it for #7329's card, and it passes at 034ed3e4a)
tests/journeys/test_render_navigation.py::test_a_thread_walk_card_leaves_and_returns_with_its_anchor Page.wait_for_function times out after 120 s
tests/journeys/widgets/test_code_and_documents.py::test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole[browser], [firefox_browser] assert 1 == 2 on steps

Diagnosis so far. #7442 made every margin card 33 px taller (#7495). The two margin-draft journeys show the same editor rise as test_a_growing_draft_under_its_words_holds_the_editor_s_top, which #7512 moved to a taller window. #7511 tracks the product shift behind that rise, where a capped card's grid shares the shortfall between transcript and reply. Read each test as #7495's repair did: separate geometry pinned to the old card head, which a test update settles, from behaviour the new head broke. Where a test only lands in #7511's short-window range, link #7511 rather than hiding it.

Cause of a failure tracked in #7525.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    Three PRs now cover six of the eight journeys. The long text document is still open; its cause is diagnosed below. Each PR's tests fail on 6313a6f59 and pass on its branch, by node id on Linux. Their CI and landing are with tend-land.

    Tests Cause PR
    both margin-draft journeys test geometry: the taller card now caps on the keystroke each test reads, which is #7511's short-window case #7535 runs each 33 px taller and keeps the old height as a strict xfail naming #7511
    test_every_card_keeps_the_placement_rules[column-1000] product regression from #7442: commentBoundary gave every side the head-line lead, so a card over or under a log row was cut while the row showed whole #7536
    [column-1440] test allowance assumed a beside card's top stood only a gap above its line #7536
    both test_open_draft_retains_words… cases not #7442: since #7473, which merged after it, the first #bg-contents a is the outline's hidden title link, as #7502 found in five browser tests #7536
    test_a_thread_walk_card_leaves_and_returns_with_its_anchor test geometry: its second scroll loop stops the Reply box at −0.86 px, inside off-flow's 1 px slack (unseen), so typing has nothing to bring back; #6394 fixed the same loop above it #7537

    Still open: test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole (both engines). This is a placement defect that #7442's taller card exposed, not test drift. #7442's annotation-chrome.css alone, applied onto 034ed3e4a, reproduces it.

    Mechanism and next step
    • The first t opens line 840's card while the line is clipped below the <pre>'s view. The card seats under the <pre> (bottom-start, y 618), and landed records held.top = -35438 from the line.
    • The walk then jumps the <pre> by about 35,700 px. The re-placement after the jump keeps that held spot. Through the offset middleware, the spot becomes limitShift's upper bound, so the card stands at −35067 px. A second t in the same frame therefore finds focus out of sight, letsGo lets go of it, and the walk re-arrives at line 840 instead of moving to 880.
    • On 034ed3e4a the same upper bound was there. The 20 px shorter card made the lower bound (reference.y − height = 20.6) exceed it, and the limiter checks the lower bound first, so the card landed at 20 px by luck.
    • The design the header describes (comment-placement.js, "A walk opens its card before its landing brings the card's words in…") misses this case. choose counts scrollStarts only on the boundary's scroller (the page), and the walk starts its scroll on the <pre>. So the card never re-opens.
    • Counting starts across scrollersOf(element) does mark it re-opened. I tried that, and the test still fails: opening only drives makeRoom, the held spot survives, and the side stays bottom (side-held).
    • Next step: decide in choose what a re-open after the landing drops, at least the held spot, and perhaps the side, since a line now in view fits beside. Then rerun this journey, the placement sweep and tests/runtime/comment-placement.test.mjs.
  3. leaf-agent commented on Nov 29, 2026

    @leaf-agent
    CollaboratorAuthor

    #7601 fixes the last open journey, test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole, on both engines. Its CI and landing are with tend-land, and merging it closes this issue.

    The cause was the one diagnosed above. choose counted only the page's scroll starts, so the walk's scroll of the <pre> never reopened the card. Two changes were needed together. The card now counts starts in every box that carries its subject, out to the boundary's scroller. On that reopen it also drops the spot it held from before the landing, and keeps its side. With both changes, both engines pass where 6e1977ac0 fails. The placement sweep, the walk tests and the placement runtime tests also 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