fix(desktop): stop the subframe navigation e2e racing a fixed timer - #97145
Merged
Conversation
The main-process listener started a 5s clock before the renderer setup ran. Under Rosetta on the x64 release leg that setup takes tens of seconds, so the clock expired before the iframe existed and every x64 release failed. The listener now records the event and the test polls for it after the click, bounded by the test timeout instead of a fixed constant. Generated-By: PostHog Desktop Task-Id: 97a9058d-24d1-43d4-8df5-b976709b5233
|
😎 Merged successfully - details. |
Contributor
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
🤖 CI report✅ Trunk lane — non-backend lane (
|
HostHog preview —
|
puemos
marked this pull request as ready for review
September 9, 2026 06:59
The event fires as soon as the click lands, so a wait tied to the test budget only delays the report. A fixed bound placed after the setup measures delivery alone and fails fast with the last polled value. Generated-By: PostHog Desktop Task-Id: 97a9058d-24d1-43d4-8df5-b976709b5233
Contributor
adamleithp
approved these changes
Sep 9, 2026
Contributor
Author
|
/trunk merge |
There was a problem hiding this comment.
Approved.
Test-only fix replacing a flaky fixed-timer wait with an event-record-and-poll pattern in an e2e spec; no production code touched, diff matches description, single owning-team author.
- 1 of the 1 changed files are governed by
products/desktop/AGENT_APPROVALS.md.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 0L, 0F substantive, 70L/1F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T0 auto-approve: T0-deterministic (70L, 1F, single-area, fix) |
| stamphog 2.0.0b4 | .stamphog/policy.yml @ 1c8ecf1 · reviewed head 1c8ecf1 |
1 task
1 task
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.

Problem
finalize-releaseskips.main-process.spec.ts › blocks external protocol navigation from a renderer subframe(run 34298858904).will-frame-navigatelistener behind a fixed 5 s timer, then builds an iframe in the renderer, then clicks. The timer measures the setup, not the behavior.Changes
globalThisin the main process instead of rejecting after 5 s. The test polls for the record after the click withexpect.poll, bounded to 30 s. That bound starts after the setup, so it measures event delivery alone and cannot be beaten by slow setup.on/offpair rather thanonce. The app can emit unrelated subframe navigations during boot, so a match filter is required.setupExternalLinkHandlersinexternal-links.ts, is unchanged.Note
The release run cannot be re-run to green. The failure is deterministic, so this fix must ship in a new tag.
How did you test this code?
desktop-test.ymldoes. 15 of 15 pass, including the rewritten test.Automatic notifications
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
/writing-tests,/writing-pr-descriptions.Created with PostHog Desktop