test(desktop): fix Escape-before-mount race in channel browser e2e#2101
Merged
Conversation
"canceling section create does not affect the next global create" sends
Escape immediately after clicking quick-create. On a slow runner the
dialog hasn't mounted yet, so the keypress lands with no handler and is
dropped — and the follow-up not.toBeVisible() passes vacuously against a
dialog that hasn't rendered. The dialog then mounts *after* the
assertion and its overlay intercepts every subsequent click, timing out
the next quick-create at 30s.
Gate on the dialog being visible before dismissing it (the pattern this
file already uses further down), and wait for the overlay to detach so it
can't outlive the content by an exit animation and eat the next click.
Verified by A/B under 20x CDP CPU throttling: the old sequence reproduces
the exact CI error ("dialog-overlay ... intercepts pointer events",
data-state="open"), the new one passes. Full spec: 29/29.
Co-Authored-By: Claude <noreply@anthropic.com>
tlongwell-block
approved these changes
Jul 19, 2026
tlongwell-block
pushed a commit
that referenced
this pull request
Jul 19, 2026
Signed-off-by: Tyler Longwell <tlongwell@block.xyz> Co-authored-by: Tyler Longwell <tlongwell@block.xyz> * origin/main: test(desktop): fix Escape-before-mount race in channel browser e2e (#2101) style(desktop): match PendingInviteGate to startup interstitials (#2097) Remove additional agents gallery (#2098) fix(agents): stop the reply loop and the premature kickoff closer (#2094) chore(release): release Buzz Desktop version 0.4.18 (#2091) fix(desktop): recover first community joins (#2087) fix(chart): support CPU-only relay autoscaling (#2086) feat(chart): add relay horizontal autoscaling (#2077)
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.
Why
channel-browser.spec.ts:251 › canceling section create does not affect the next global createfails intermittently in CI — it's currently red on at least two unrelated branches (#2097 andcynthiac/profile-polish), and it never reproduces locally on a fast machine.Root cause
The test clicks quick-create and sends
Escapeon the very next line:On a slow runner the dialog hasn't mounted when
Escapelands, so the keypress hits no handler and is dropped.not.toBeVisible()then passes vacuously — the dialog isn't merely hidden, it doesn't exist yet. The dialog mounts after the assertion, and itsdata-state="open"overlay intercepts pointer events for the rest of the test, timing out the nextquick-createclick at 30s.That's why the CI log shows an overlay that is
openrather than animating closed:A probe confirmed the sequence directly — at the instant the spec asserts "not visible,"
dialog-overlaycount is0, and the overlay appears immediately afterward.Fix
Gate on the dialog actually being visible before dismissing it — the pattern this same file already uses at line ~498 — then wait for the overlay to detach so it can't outlive the content by one exit animation and swallow the next click.
Testing
A/B under 20× CDP CPU throttling (imitating the CI runner):
dialog-overlay ... intercepts pointer eventsFull spec
channel-browser.spec.ts: 29/29 serial. Test-only change — no product code touched.