Skip to content

fix(trace-viewer): remove speculative 1s isUnderTest startup delay - #42071

Open
Skn0tt wants to merge 2 commits into
microsoft:mainfrom
Skn0tt:remove-trace-viewer-test-startup-delay
Open

fix(trace-viewer): remove speculative 1s isUnderTest startup delay#42071
Skn0tt wants to merge 2 commits into
microsoft:mainfrom
Skn0tt:remove-trace-viewer-test-startup-delay

Conversation

@Skn0tt

@Skn0tt Skn0tt commented Jul 31, 2026

Copy link
Copy Markdown
Member

Removes the 1s isUnderTest sleep before service-worker registration in Trace Viewer and UI Mode.

It was added in 2022 as a speculative flake fix while SW registration was landing (#15330, then #15342), and later copied into UI Mode. It only runs under test, so every TV / UI Mode test was paying ~1s on first interaction. Looking at the history, there isn't a clear remaining reason for it.

Locally, full Trace Viewer and UI Mode suites pass without the delay. Opening as draft so CI can soak whether any of the original flakeiness comes back.

The delay was added in 2022 (microsoft#15330 / microsoft#15342) as a speculative flake fix
while service-worker registration was being introduced, then copied into
UI Mode. It only runs under test, so every Trace Viewer / UI Mode test
paid ~1s on first interaction for no clear remaining reason.

Local TV + UI mode suites pass without it; opening as draft so CI can
soak any flake return.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 30f3e9be-1f15-4e5c-9972-5f0253070639
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 30f3e9be-1f15-4e5c-9972-5f0253070639
@Skn0tt

Skn0tt commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

The one "should indicate current test status" flaky test looks related, but actually also flakes on other PRs, so it seems this is safe. I kicked off another CI run just to double-check.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

7 flaky ⚠️ [installation tests] › playwright-cli-install-should-work.spec.ts:143 › install command should work with HTTPS proxy for HTTP downloads `@package-installations-ubuntu-latest`
⚠️ [chromium-library] › library/video.spec.ts:294 › screencast › should capture navigation `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-page] › page/page-event-request.spec.ts:181 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:388 › should reveal errors in the sourcetab `@windows-latest-node22`

51112 passed, 1188 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [chrome] › mcp/cli-core.spec.ts:57 › click link @mcp-windows-latest-chrome
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox

7261 passed, 1173 skipped


Merge workflow run.

@Skn0tt
Skn0tt marked this pull request as ready for review July 31, 2026 15:38
@Skn0tt
Skn0tt requested a review from pavelfeldman July 31, 2026 15:39
@github-actions

Copy link
Copy Markdown
Contributor

🟢 CI is clear — both failures are pre-existing flakes

Hi, I'm the Playwright bot and I took a look at the failing CI on this PR.

The two real failures are both in the MCP suite on the Windows bots, and both are the same tests that flake regularly on unrelated SHAs and PRs. This PR only removes a 1s startup delay in the Trace Viewer / UI Mode web frontends (index.tsx, uiMode.tsx), which the MCP CLI tests don't exercise. Nothing here looks caused by the change.

Details

Pre-existing flake / infra

Not triaged (flaky, passed on retry)

  • The "tests 1" report lists only flaky results (video screencast, popup, page-event-request, and two ui-mode-trace.spec.ts cases). They passed on retry, so there's nothing failing to explain. The ui-mode-trace ones are the closest to this PR's area, worth a glance if they get worse, but they're green after retry here.

Triaged by the Playwright bot - agent run

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.

1 participant