Skip to content

test: widen the live sample in the host view change test so its page surface stays a margin card - #5200

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5156
Nov 3, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5156

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

#5039 made every thread open in the floating panel when the window is narrower than --lf-rail-room (958px with Leaf's theme). In test_sample_host_view_changes_leave_its_scroll_and_keyboard_position the live sample's child page is 691px wide inside its 1000px host, so the host's showThread('question', {surface: 'page'}) now opens the child's panel, as #5039 intends, and the test's expected .lf-margin-preview never 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 from 72afa89 (Nov 2), and #5039 is in that range.

Closes #5156 — automated triage

…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
@leaf-agent
leaf-agent merged commit f6e5ff4 into main Nov 3, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5156 branch November 3, 2026 09:02
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]>
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]>
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.

Sample host view change loses the expected margin discussion

1 participant