Repository navigation
test: size five thread-card tests to the wider card gap from #5853 - #5928
Merged
Merged
Conversation
…s subject #5853 stood a thread card a mark's room plus COMMENT_GAP clear of its subject, so a card beside its words is 8px narrower and needs 8px more room to stand beside. Four tests were sized to the old 8px gap. Each now gets that room back (a wider window, or a bound that reads --focus-region-room), and the placement they protect is unchanged. Closes #5917
…elow its subject A card below its subject now starts 16px under it, not 8px, so in a 1000x600 window the grown draft hits the window's foot and its transcript gives up the 8px. At 608px the card grows downward as it did before, and then the long draft bounds it as before. Closes #5917
leaf-agent
commented
Nov 13, 2026
leaf-agent
left a comment
Collaborator
Author
There was a problem hiding this comment.
The new bound works subjectGap() out again: the literal 8 is COMMENT_GAP, plus the CSS variable. That copy of the placement rule is what broke these tests when #5853 changed the gap, and a future change to COMMENT_GAP would break this bound the same way. subjectGap is already exported through window.__lfOverlayApi() (annotation-overlay/check-api.js), and test_render_send_placement.py reads it that way, so the test can ask the owner for the gap.
…ting COMMENT_GAP The reopened-card bound in test_a_source_replacement_preserves_the_focused_draft_and_its_original_anchor now asks the overlay's subjectGap() for the gap, so a later change to COMMENT_GAP or --focus-region-room moves the bound with the placement rule.
This was referenced Nov 14, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 27, 2026
…#7415) #7329 opens every comment card slim (320 px) instead of the 592 px a card under its words used to take. In this test the first message now wraps, so the card stands 21 px taller. At the 1000×608 window the draft's second line then already reaches the window's foot (542 px): the card stops there and the transcript scrolls 4 px, which lifts the editor from 481 to 477. The card's top and width hold throughout, so the box isn't re-standing or widening. This is the test's own later "bounded" phase, arriving one line early. The repair gives the test a 640 px window. The second line grows below the first again, and the long draft still reaches the foot and shares the card with its transcript, so both behaviors the test protects are still checked. #7329's slim card stays, and no runtime code changes. This follows the precedent of #5928, which resized thread-card tests after a placement change. Verification: the test fails on `main` at 608 px (`assert 477 == 481 ± 0.5`) and passes at 640 px on this branch (Linux, run by node id). A probe at #7329's parent (`a5d8c24ec`) confirmed the cause: there the card was 592 px wide and the message 64 px tall, and with the slim card it is 85 px. The test failed on macOS in scheduled run 45985529285. Mac fonts can wrap differently, and 640 px leaves about 30 px more room than Linux needs. Closes #7408 — 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.
#5853 made a thread card stand clear of its subject by
subjectGap(the mark's room,--focus-region-room, plusCOMMENT_GAP) instead ofCOMMENT_GAPalone. As that PR said, a card beside its words now narrows by 8px and needs 8px more room before it gives up standing beside. Five tests were sized to the old gap and have failed on main since, four in everycipush run and one in the nightly tier: each passes at #5853's parent7c2112135and fails ata298398f6. This change keeps #5853's placement and gives each test back the room the new gap takes; no runtime code changes.test_a_card_s_head_stands_whole_beside_news[True]: at 1400px the touch card no longer fits beside its words, so it went under, grew wider and kept its time whole. At 1408px it stands beside again, and the docstring names the new width.test_a_head_s_words_take_its_controls_room_while_they_hide: at 1440px the card is now 336px, which cuts the queued receipt (118px of words in 111px). At 1456px the card is 344px again, the width the base drew at 1440px. A margin card grows 0.5px for each 1px of window, which is why this takes 16px.test_one_unchanged_rewrite_stands_open_in_a_thread_across_its_readers: at 1400px the card no longer fits beside the Feed reader, so it stands over the Feed message and blocks its double-click (Playwright: ".lf-msg-head… intercepts pointer events"). That test checks that only one rewrite stays open at a time, not where the card stands, so it now opens at 1408px.test_a_source_replacement_preserves_the_focused_draft_and_its_original_anchor[whole-datum]: the reopened card stands under the document 15px down. The old bound,+ 10, held only the old 8px gap. The bound now asks the overlay forsubjectGap(), so the test follows theplace-clearrule from its owner.tests/journeys/test_render_margin.py::test_a_second_margin_reply_grows_below_the_first_line(nightly): the card under its subject now starts 8px lower, so in a 1000×600 window the grown draft reaches the window's foot and its transcript gives up 8px, which moves the reply box's top up 8px. At 608px tall the card grows downward as it did before, and the long draft that follows still bounds it.The four push-tier tests pass on this PR's CI and fail on main without it. The journey's placement assertions now pass, but the journey still errors at teardown with
ResizeObserver loop completed with undelivered notifications. That error comes from #5811 (f58c2cac7), not from #5853 or this change: bisected locally, it's absent at #5811's parent and present at every commit since, including #5853's parent. On main it's hidden behind the placement failure this PR fixes. #5933 tracks it, so the journey stays red until that's fixed.Closes #5917 — automated triage