Skip to content

test: run the two margin-draft journeys 33px taller, after #7442's taller card - #7535

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7528-margin-drafts
Nov 28, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7528-margin-drafts

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

Two margin-draft journeys from #7528 fail because #7442 made every margin card 33px taller, which moved them into the short-window case #7511 already tracks. This PR changes only the tests. Each journey runs 33px taller, which gives it back the room it had before #7442. Its old window height stays as a strict xfail on #7511, as #7512 did for test_a_growing_draft_under_its_words_holds_the_editor_s_top.

  • test_continued_margin_draft_grows_below_its_first_line_after_agent_reply now runs at 633px. At 600px, the keystroke that brings the card's foot to the window's foot moves the reply's first line from 426px to 419.3px.
  • test_a_second_margin_reply_grows_below_the_first_line now runs at 673px. At 640px, the first Shift+Enter already caps the card and moves the editor's top from 514px to 509px.

In both, the card's grid splits the cap's shortfall between the transcript and the reply, which is the mechanism #7511 describes. It shows at shorter windows before #7442 too. When I swept the window height on current main, the continued draft passed at 620px and above, and the second reply at 660px and above. Each xfail is strict, so it fails once a fix for #7511 holds the reply at the old height.

Verification by node id on Linux Chromium: both journeys fail on main at 6313a6f59. On this branch the 633px and 673px cases pass, and the 600px and 640px cases xfail with the same AssertionError.

The rest of #7528 is not covered here: card placement, the responsive-layout draft, the thread walk and the long text document.

Part of #7528 — automated triage

…ow height

#7442 made every margin card 33px taller. The windows these two journeys
used (640px and 600px) now put the card's foot at the window's foot on
the keystroke the test reads, and the card's grid then shares the cap's
shortfall between transcript and reply, moving the reply's first line
5-7px. That shift predates #7442 at shorter windows and is #7511's.

Each journey now runs 33px taller (673px, 633px), which keeps the room it
had before #7442, and keeps its old window as a strict xfail on #7511, as
#7512 did for test_a_growing_draft_under_its_words_holds_the_editor_s_top.

Refs #7528
@leaf-agent
leaf-agent merged commit 2464127 into main Nov 28, 2026
8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7528-margin-drafts branch November 28, 2026 17:35
leaf-agent added a commit that referenced this pull request Nov 29, 2026
… its line (#7601)

A thread walk opens its card before its landing scrolls the card's words
into view. `commentPlacement`'s `choose` reopened the card only for
moves Leaf started in the boundary's scroller, which is the page. In a
long text document the walk scrolls the document's own `<pre>`, so the
card never reopened. It kept the spot it took while line 840 was clipped
(`held.top = -35438` from the line), and limitShift stood it at −35,067
px. A second `t` in the same frame found focus out of sight, and the
walk returned to line 840 instead of moving on to 880. #7442's taller
card exposed the defect: with the card 20 px shorter, limitShift's lower
bound happened to win, so the card landed in view by luck.

`choose` now counts moves Leaf started in every box that carries the
subject, out to the boundary's scroller (`startsUnder`, built on
`scrollersOf`). When the walk's landing reopens the card, the card drops
its held spot and is placed again where the landing left its words. It
keeps the side it chose, as the module header already said it should. A
scroll from `makeRoom` still resets the count through `scrolled()`, so
the card's own room-making never reopens it.

Verification, by node id on Linux:
-
`tests/journeys/widgets/test_code_and_documents.py::test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole[browser]`
and `[firefox_browser]` fail on `6e1977ac0` (`assert 1 == 2` on `steps`)
and pass on this branch.
- The placement sweep `tests/journeys/margin/test_card_placement.py`,
the thread-walk and pane-walk browser tests,
`test_a_thread_walk_card_leaves_and_returns_with_its_anchor`, and
`tests/runtime/{comment,floating,margin,scroll}-placement.test.mjs`
pass.
- The `browser/types` type check and eslint are clean.

This was the last of the eight journeys #7528 tracks. #7535, #7536 and
#7537 fixed the other seven.

Closes #7528 — automated triage

Co-authored-by: leaf-agent <[email protected]>
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