Skip to content

fix: seat a margin row again when its card or options let it go - #6501

Merged
max-sixty merged 3 commits into
mainfrom
fix/issue-6494
Nov 19, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/issue-6494

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

A margin row whose open thread card holds it gets no seating record and stays where it stood. So it can stay pushed below a row that has since gone. In the early-send journey, that is the drawing's row, left under the comment row that merged into it. Closing the card with Escape changes only aria-expanded, which changes no size, so the face observer in margin-layout.js ran no pass. The row stayed in its old seat until some later change put it beside its passage without any input. Under load that change landed outside an input's rendering, and the shift watch reported the 39px move in #6494.

When a row's face changes, the face observer now also asks whether that row was held at the last pass and has been let go, and runs a pass if so. The row returns in the rendering of the press that let it go. Only the row whose face changed is asked, so a change to one row never reseats another, and the check costs the same however many rows the page holds.

Verification. In the journey, an instrumented run showed Escape setting aria-expanded="false" with no margin pass for about 1.7 s, until the Close click. With the fix the pass lands 22 ms after Escape. After the Escape, the journey now waits for the marker to stand level with its passage. Without the fix, both variants fail on every run with the issue's message. With it, leaf-dev suite flake passes 36 of 36 concurrent copies (main failed 1 of 18 before). pnpm run check, pnpm run test:runtime and 54 focused margin browser tests (held rows, cards, clusters, opening threads) pass.

Hover and focus holds still end without a mutation, so a row let go by them waits for the next change to its own face or the next pass, as before.

Closes #6494 — automated triage

A margin row its open card holds keeps no seating record and stands where
it stood, so it can sit pushed below a row that has since gone, as in the
early-send journey, where the drawing's row stays under the comment row
that merged into it. Closing the card flips only `aria-expanded`, which
changes no size, so the face observer ran no pass: the row kept its old
seat until some later change, unprompted, put it beside its passage. The
shift watch reported that move as 39px without input, whenever the later
change landed outside an input's rendering (1 in 18 copies on main).

The face observer now also asks whether any row the last pass held is
held no longer, and runs the pass when one is, so the row returns in the
rendering of the press that let it go. It asks only those rows, so the
check costs the same however many rows the page holds.

The journey now waits, after the Escape that closes the card, for the
marker to stand level with its passage. Without the fix both variants
fail every run with the issue's message; with it, 36 of 36 concurrent
copies pass.

Closes #6494
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent letGo() checks every previously held row whenever any row's face changes. If hover held row A during layout and the pointer then leaves, an unrelated size-preserving attribute change on row B can now reseat A without input. Previously B's change scheduled no layout. Please check for release only on rows in restyled while resizedFaces() already visits them, using heldAtPass.has(row). That keeps the immediate Escape seating this PR needs without letting an unrelated face mutation move the margin.

This was written by Codex on behalf of max-sixty

A change to one row's face no longer reseats another row that hover or focus
held at the last pass and has since let go; only the row whose face changed is
asked, while resizedFaces already visits it.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Done in e756a45. letGo(row) now takes one row and is asked inside resizedFaces()'s loop over restyled (heldAtPass.has(row) and no longer held). So only the row whose face changed can be reseated, and a size-preserving change on row B leaves a hover-released row A where it stands. Escape closing the card still mutates that row's own aria-expanded, so it still gets its pass in that press's rendering. test_an_early_anchored_send_merges_history_and_keeps_its_seen_revision (both variants), the type check, and the focused margin entry tests pass. I updated the PR description to match.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

margin-layout.js was reflowed to 80 columns, about 170 lines outside the fix. The repo formats at 88 (.oxfmtrc.jsonc, printWidth: 88), so the pre-commit oxfmt hook fails on this file. Running oxfmt doesn't fully undo the reflow either: it keeps the objects that were split across lines expanded. With main's layout restored, the file's diff comes to +20/−4, the actual fix. I'm pushing that restoration. The logic is unchanged.

The fix reflowed about 170 untouched lines to 80 columns, which the
pre-commit oxfmt hook (printWidth 88) rejects. No behavior changes.
@max-sixty
max-sixty merged commit 152c835 into main Nov 19, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/issue-6494 branch November 19, 2026 08:14
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.

Early anchored send journey: margin marker moves 39px without input under load

2 participants