Skip to content

Two margin-card journeys fail since #6091: no comment marker, and a refused reply moves the card's close control 56px #6178

Closed

Description

@leaf-agent

Two margin-card journeys fail on main since #6091 (d11674f1b, "Stand each draft in the margin where it is about, from one list every view reads"). git bisect run over f20c08b73..a0461d98d lands on d11674f1b for each, with be3adade7 as the last good commit. Both still fail on main d4dd8a418.

  • tests/journeys/test_render_margin.py::test_margin_card_holds_its_top_while_read_and_its_reply_while_written: no comment marker ever appears.
    Locator.bounding_box: Timeout 120000ms exceeded.
      - waiting for locator(".lf-margin-marker[data-lf-kinds=\"comment\"]")
    tests/journeys/test_render_margin.py:461
    
  • tests/journeys/test_thread_response_continuity.py::test_refused_reply_retains_its_live_foot[margin]: after a refused reply, the card's close control stands 56px lower than it did while the reply was pending.
    assert 56.1875 < 0.5   # abs(restored["close"]["top"] - pending["close"]["top"]), 161.14 vs 104.95
    tests/journeys/test_thread_response_continuity.py:595
    

#6091 moved drafts into the margin's single list. A plausible shared mechanism is that a draft's margin entry now changes which marker the margin draws, or where the card stands, around a comment or refused reply. Reproduction should confirm whether one mechanism explains both before they share a fix. Both first failed in scheduled run 43853405137 on Linux and macOS at 1740bb536.

Cause of a failure tracked in #4225.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    The two failures have different causes, and only the first is fixed so far.

    No comment marker: fixed by #6188 (test only). #6091 adds a typed reply to its thread's margin row, so while the user writes, the row's marker reads data-lf-kinds="comment draft". The journey looked the marker up with [data-lf-kinds="comment"] after typing its reply, so line 461 waited forever. #6188 matches comment as one of the marker's kinds (~=). The test fails on f1b367375 and passes with the change. tend-land owns its CI and landing.

    The refused reply's card moves 56px: a runtime placement race #6091 exposes. The test passes on be3adade7, and it fails on main because of when placement passes run, not where the draft entry stands. With probes in placeThreadPreview, the sequence after the 400 is:

    • Parent be3adade7. The refusal removes the pending turn while the card holds its top, so the card shrinks to 92–251. A top-held pass lands that rectangle. When the words come back, the caret in a box with words switches the held edge to the foot (heldEdge), and later passes keep the foot at 251. The card doesn't move.
    • Main. The refusal clears the sending mask, so the draft is listed again. That repaints the annotations (paintAnnotations → margin renderNow → the card's refresh), which starts a new placement about 23ms after the refusal's own top-held pass and before that pass lands. The new pass already holds the foot. commentPlacement reads the foot from held, which landed only writes at a landing. So it holds a foot from before the shrink, and the card stands at 148–307. Its height is still 159, but it sits 56px lower.

    So the defect is that a pass which switches the held edge reads the other edge from the last landing, even when the card was resized after that landing without one. #6091 only adds a repaint that supersedes the landing. One tempting fix doesn't work. I tried deriving the other edge from the card's current height. It keeps the refused card still but breaks the typed case: a two-line write switches to the foot in the same pass that grows the box, so the card grew down instead of up (113 vs 92). The edge to hold is the one last painted, not the current layout's. Recording the rectangle at each paint, or letting a superseded pass keep its landing, would carry that. I haven't verified either yet.

    The issue stays open for this half. A fix needs to keep this test's head row still and still pass test_margin_card_holds_its_top_while_read_and_its_reply_while_written, which covers the typed rise.

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