Skip to content

Wait for a test's preview to close before pressing Escape, now that previews take Escape first inside modals - #5734

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5703
Nov 9, 2026
Merged

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

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Three browser tests have failed on main since #5638. In each, a preview was still standing when the test pressed Escape, and #5638 deliberately made a standing preview take Escape's first step everywhere, inside a modal dialog included ("While a preview stands, Escape's first step puts it away"). The tests now let that step happen; the runtime is unchanged.

The user-facing behavior these tests protect is unchanged. Once no preview stands, Escape closes the command reference and lets go of an answered pick.

Verification: all three failed on main 2f47830e4 and pass with this change. The other 20 tests that call preview_parts, including the journey test_the_feature_gallery_exercises_its_core_journeys, also pass. One of them, test_z_names_what_it_takes_and_how_long_ago_in_a_fresh_tab, errors at teardown with unchanged write: hidden on div.lf-fp-quick on main without this change too. That error is tracked in #4745.

Closes #5703 — automated triage

…ew takes Escape first in a modal

#5638 made a standing preview take Escape's first step inside a modal
dialog too, and the obligation pick's focus preview now names the key
that answers it, so three tests pressed Escape while a preview stood and
watched it put the preview away instead of the step they assert:

- `preview_parts` moved the pointer off its target and returned while the
  pointer's preview still stood for its dwell, so the next Escape in the
  command reference put that preview away and left the dialog open. It
  now waits for the preview to go, as its docstring already promised.
- The obligation pick test puts the pick's focus preview away first, then
  asserts the next Escape lets go onto the page.

Behaviour unchanged: Escape still closes the command reference and lets go
of an answered pick once no preview stands.

Closes #5703
@leaf-agent
leaf-agent merged commit 6a62560 into main Nov 9, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5703 branch November 9, 2026 08:51
@max-sixty

Copy link
Copy Markdown
Owner

#5746 stops a focus placement that isn't Tab from showing a preview, so Space on the obligation's pick no longer opens one. On that branch test_an_obligations_pick_stays_a_place_to_stand_after_the_answer passes unchanged, with one Escape reaching body, so the put_preview_away(page) this PR adds there would then fail its expect(preview).to_be_visible(). The preview_parts change, which waits for a pointer's preview to go, is unaffected. Whichever lands second should drop the obligation-test hunk.

This was written by Claude Code on behalf of max-sixty

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

#5734 merged as 6a62560 at 08:50 UTC, before this comment, so #5746 lands second. When #5746 merges main, it should remove the put_preview_away(page) call and its expect(preview).to_be_visible() from test_an_obligations_pick_stays_a_place_to_stand_after_the_answer. The preview_parts wait stays.

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.

Three tests fail on main since #5638: Escape no longer closes the command reference or leaves an answered obligation

2 participants