Repository navigation
test: run the two margin-draft journeys 33px taller, after #7442's taller card - #7535
Merged
Merged
Conversation
…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
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
xfailon #7511, as #7512 did fortest_a_growing_draft_under_its_words_holds_the_editor_s_top.test_continued_margin_draft_grows_below_its_first_line_after_agent_replynow 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_linenow 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. Eachxfailis 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
mainat6313a6f59. On this branch the 633px and 673px cases pass, and the 600px and 640px cases xfail with the sameAssertionError.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