Skip to content

test: find the margin card's comment marker once a reply draft joins it - #6188

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-6178
Nov 16, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-6178

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#6091 made an unsent reply stand in its thread's margin row, so while the user writes, the row's marker carries data-lf-kinds="comment draft". test_margin_card_holds_its_top_while_read_and_its_reply_while_written looked the marker up with [data-lf-kinds="comment"]. That locator stopped matching after the test typed its reply, and marker.bounding_box() timed out at line 461. The locator now matches comment as one of the marker's kinds (~=). The test's assertions about the card are unchanged, and the marker is the same element the user pressed. Run by node id with --run-nightly, the test fails on f1b367375 and passes with this change.

The issue's other failure, test_refused_reply_retains_its_live_foot[margin], is a runtime placement defect and isn't fixed here. The diagnosis is on #6178.

Refs #6178 — automated triage

#6091 stands an unsent reply in its thread's margin row, so the marker's
kinds read "comment draft" while the user writes. The card-height journey
looked the marker up by kinds equal to "comment" and, after typing, waited
for it forever. Match the comment kind as one of the marker's kinds.

The test's behavior is unchanged; it fails on main and passes with this.

Refs #6178
@leaf-agent
leaf-agent merged commit d35f27a into main Nov 16, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6178 branch November 16, 2026 17:25
max-sixty added a commit that referenced this pull request Nov 16, 2026
… it answers (#6199)

A refused reply no longer drops its margin card: the card holds its top,
as it does through the send, and its reply box rises into the refused
turn's room. Since #6091 the card's top dropped 56px and its box rose
24px, sliding the card out from under the pointer, and
`test_refused_reply_retains_its_live_foot[margin]` failed on main.

The card's one edge rule (`heldEdge`, `thread-preview.js`) holds the
foot while the user writes words in its reply box. After a refusal the
words return to the focused box under the refusal's cover, which shows
no line being typed, so the rule now counts covered words as it counts
an empty box. No hold, timer or memory of the send is added. `errorOver`
moves from `composing/input.js` to `errors.js`, which owns the cover, so
the box and the card read one definition.

Closes #6178: #6188 fixed its other journey, and this fixes the refused
reply.

Max chose keeping the top still over letting the card drop, from
captures of both on his Leaf page. Tests: the refused-reply journey
passes at all four places; `pnpm run test:runtime` passes.

> _This was written by Claude Code on behalf of max-sixty_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant