Skip to content

test: widen the sample in the saved-state startup test so its page surface stays a margin card - #5203

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

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

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#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 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

…rface stays a margin card

#5039 opens every thread in the floating panel when the window is narrower
than `--lf-rail-room`. In
`test_sample_upgrade_does_not_wait_for_child_saved_state[False-page]` the
sample's child is too narrow for a rail, so the host's
`showThread('saved-thread', {surface: 'page'})` opens the child's panel. The
panel's thread view replaces the comment field holding "Child draft", so the
test's field locator finds nothing and the browser watch reports the words
leaving the screen.

The host is now 1400px and the sample has an authored width of 1100px, the
fix #5200 made for the same cause, so the page branch again covers the margin
card a host opens without taking the child's draft. No runtime behavior
changes. The narrow-window path, where a host's page request replaces the
panel field's draft without the yield the panel route applies, is #5202.

Closes #5158
Refs #5202
@leaf-agent
leaf-agent merged commit 09b33e2 into main Nov 3, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5158 branch November 3, 2026 09:56
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 upgrade loses the child comment draft

1 participant