Repository navigation
test: widen the live sample in the host view change test so its page surface stays a margin card - #5200
Merged
Conversation
…ce is a card #5039 opens every thread in the panel on a window narrower than --lf-rail-room (958px). This test's child page ran 691px wide inside a 1000px host, so showThread('question', {surface: 'page'}) now opens the panel by design and the expected margin preview never appeared. The test now sizes the host at 1400px and the sample at 1100px, so the child holds a rail and the page branch still covers a host-driven margin card arriving without moving the host's scroll or focus. Behavior is unchanged. Closes #5156
This was referenced Nov 3, 2026
test: widen the sample in the saved-state startup test so its page surface stays a margin card
#5203
Merged
leaf-agent
added a commit
that referenced
this pull request
Nov 3, 2026
…rface stays a margin card (#5203) #5039 sends every thread to the floating panel when the window is narrower than `--lf-rail-room` (958px with Leaf's theme). That makes `test_sample_upgrade_does_not_wait_for_child_saved_state[False-page]` fail on main. The sample's child page has no room for a rail, so the host's `showThread('saved-thread', {surface: 'page'})` opens the thread in the child's panel instead of a margin card. The panel's thread view then takes the comment field that holds "Child draft". The test's field locator finds nothing, and the browser watch reports `typed words left the screen without a key or press`. The scheduled run [41432142330](https://github.com/max-sixty/leaf/actions/runs/41432142330) shows this on both Linux and macOS. The test now opens a 1400px host and gives the sample an authored width of 1100px. That is the same repair #5200 made to `test_sample_host_view_changes_leave_its_scroll_and_keyboard_position` for the same cause. The page case once again covers what the test exists for: a margin card that a host opens once history loads, leaving the child's draft in place. The panel cases don't depend on width. No runtime behavior changes. Locally on main `4a7adaf63`, `[False-page]` fails with the scheduled run's assertion and watch error. With this change all four parametrizations pass. This leaves the narrow-window path, which #5039 introduced and which this test used to reach, untested and unchanged. There, a host's page-surface request replaces the panel field's draft without the yield that `{surface: 'panel'}` applies. #5202 tracks that defect and where its fix belongs. Closes #5158 — automated triage Refs #5202 Co-authored-by: leaf-agent <[email protected]>
This was referenced Nov 4, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 4, 2026
…5354) #5039 made every thread open in the floating panel on a window narrower than `--lf-rail-room` (958px with Leaf's theme), Send from a new comment included. The 760px case of `test_a_new_anchored_comment_keeps_the_users_thread_view` still expected a margin card, so it failed in the scheduled run on Linux and macOS (#5139). The test lives in `tests/browser/`, which a PR's CI doesn't run unless the PR edits it, so #5039 didn't run it. The 760px case now expects what #5039 intended: the sent thread is in the panel and focused, no card opens, and the passage stays where it was. The 1000px and 1440px cases keep the card expectations unchanged. No product behavior changes. Verification: on current `main` the 760px case fails as in the report (`.lf-margin-preview` stays `hidden`), and with this change all three cases pass locally. The other consumer reported on #5139, `test_sample_host_view_changes_leave_its_scroll_and_keyboard_position`, had the same cause and was already fixed by #5200. It passes on current `main`. Closes #5139 — 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.
#5039 made every thread open in the floating panel when the window is narrower than
--lf-rail-room(958px with Leaf's theme). Intest_sample_host_view_changes_leave_its_scroll_and_keyboard_positionthe live sample's child page is 691px wide inside its 1000px host, so the host'sshowThread('question', {surface: 'page'})now opens the child's panel, as #5039 intends, and the test's expected.lf-margin-previewnever appears. The failure's snapshot shows exactly that: the thread is open in the child's panel with "Show on page".The test now sizes the host at 1400px and gives the sample an authored width of 1100px, so the child's window holds a rail. The page branch still covers what the test is for: a host-driven margin card arriving in the child without moving the host's scroll or focus. No runtime behavior changes. The journey
test_sample_child_passage_and_reply_gestures_scroll_only_the_child, which uses the same fixture at the narrow width, is left as it is.The test fails on current main (reproduced locally with the same error as the scheduled run 41432142330) and passes with this change. The scheduled runs' junit results show it passing at
cc5df725(Nov 1) and failing from72afa89(Nov 2), and #5039 is in that range.Closes #5156 — automated triage