Skip to content

feat(trace-viewer): show screencast frames during playback - #42751

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:playback-screencast
Sep 18, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:playback-screencast

Conversation

@pavelfeldman

@pavelfeldman Pavel Feldman (pavelfeldman) commented Sep 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Show the screencast in the snapshot area while playing and while dragging the scrubber, so that animations are visible.
  • Snap back to the action snapshot when the playback stops, the scrubber is released, an action is selected or hovered, or a locator is picked.
  • Traces with a video play the video itself, the thumbnails only index the film strip lanes.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@pavelfeldman
Pavel Feldman (pavelfeldman) force-pushed the playback-screencast branch 2 times, most recently from 467a8ea to 7290921 Compare September 18, 2026 00:13
@pavelfeldman
Pavel Feldman (pavelfeldman) marked this pull request as ready for review September 18, 2026 00:13
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Playback and dragging the scrubber show the screencast at the current
time. Stopping, releasing the scrubber, hovering an action or picking a
locator snap back to the action snapshot.

Traces with a video play the video itself, the thumbnails only index
the film strip lanes.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

target={ariaModeTargets[snapshotTab]}
point={snapshotTab === 'action' ? action?.point : undefined}
box={snapshotTab === 'action' ? action?.box : undefined}
screencastFrame={screencastFrame}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if video drifts away from the action and the image is different from the snapshot? may be confusing for the user that stopped on an action

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 failed
❌ [installation tests] › playwright-cdn.spec.ts:43 › playwright cdn failover should work (https://cdn.playwright.dev/dbazure/download/playwright) @package-installations-macos-latest
❌ [installation tests] › playwright-cdn.spec.ts:43 › playwright cdn failover should work (https://playwright.download.prss.microsoft.com/dbazure/download/playwright) @package-installations-macos-latest

11 flaky ⚠️ [chromium-library] › library/video.spec.ts:690 › screencast › should capture full viewport `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:521 › screencast › should capture static page in persistent context Radoslav Kirilov (@smoke) `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/screencast.spec.ts:28 › screencast.start delivers frames via onFrame callback `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/video.spec.ts:725 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/trace-viewer-scrub.spec.ts:226 › should reveal snapshot when hovering an action or picking a locator during playback `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [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`

52012 passed, 1250 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a look at the CI failures here.

🟢 CI is clear — both failures are a macOS installation-bot outage

playwright-cdn.spec.ts:43 › playwright cdn failover should work has been failing on
package-installations-macos-latest for every run since ~2026-09-17 21:00 UTC — including plain
main (shas d16ccf0c, da3a50aa, 464318b1, 3cd10253) and PRs #42758, #42764, #42765,
#42761, #42766. This PR only touches trace-viewer UI code, which never reaches npx playwright install.

Details

Overall: 2 failed, 11 flaky in the latest report. Neither failure is attributable to this PR — the
diff is confined to packages/trace-viewer/src/ui/* (playbackControl.tsx, snapshotTab.tsx,
videoFrame.tsx, videoThumbnails.ts, filmStrip.tsx, ariaModeView.tsx, workbench.tsx, plus CSS)
and a new tests/library/trace-viewer-scrub.spec.ts.

Pre-existing flake / infra

  • [installation tests] › playwright-cdn.spec.ts:43 › playwright cdn failover should work (https://cdn.playwright.dev/dbazure/download/playwright) and the https://playwright.download.prss.microsoft.com/... variant @package-installations-macos-latest — not a flake, an ongoing break on that bot. Both titles are 29 failed / 611 passed over 640 runs, and every failure is macOS-only (0/626 on Windows, 0/629 on Linux). All four attempts fail in every failing run, so retries never rescue it. Run history for the first title (oldest first, one square per run attempt):

    🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟥🟥🟥🟥🟥🟥🟩🟩🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

    The green-to-red flip lands at run 35238682839, before this PR's latest push, and it's solidly red on main since. The error is identical every time: npx playwright install exits 1 on mac-arm64 after the Chrome for Testing 154.0.8037.0 (playwright chromium v1246) zip finishes downloading — so it's the post-download step on the macOS bot, not the CDN failover logic under test. Worth a separate look, but it isn't this PR.

  • The 11 flaky tests all passed on retry. The video/screencast ones (library/video.spec.ts, library/screencast.spec.ts) are recorder-side, not trace-viewer rendering, so the diff doesn't reach them; the rest (third-party cookies, page-emulate-media, page-event-request, beforeunload) sit in areas the diff doesn't touch.

Worth a glance, not a failure

  • [firefox-library] › library/trace-viewer-scrub.spec.ts:226 › should reveal snapshot when hovering an action or picking a locator during playback flaked on firefox-ubuntu-22.04-node20 and passed on retry. That's this PR's own new test, and it has no final failures across its runs so far — but it's new, so there isn't much history to lean on yet. Might be worth a look at the hover/playback race before this lands.

Triaged by the Playwright bot - agent run

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

5 failed
❌ [chromium] › mcp/network.spec.ts:210 › browser_network_requests lists a failed request once @mcp-macos-latest-chromium
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-core.spec.ts:140 › uncheck @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-drag.spec.ts:19 › drag between elements @mcp-windows-latest-firefox
❌ [msedge] › mcp/http.spec.ts:528 › http transport shared context: one idle timer across clients @mcp-windows-latest-msedge

8624 passed, 1446 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a look at the CI failures here.

🟡 Six of the seven failures are provable noise — one I can't clear

The two playwright-cdn failures are a macOS installation-bot outage, and four of the five MCP
failures are bimodal tests with a failure history on main. The odd one out is
[msedge] › mcp/http.spec.ts:528 › http transport shared context: one idle timer across clients,
which has only ever failed on this PR — I can't prove it's a flake, though I also can't find a path
from a trace-viewer UI diff to the MCP HTTP transport.

Details

Overall: 2 failed in "tests 1", 5 failed in "MCP". The diff is confined to
packages/trace-viewer/src/ui/* (playbackControl.tsx, snapshotTab.tsx, videoFrame.tsx,
videoThumbnails.ts, filmStrip.tsx, ariaModeView.tsx, workbench.tsx, plus CSS) and the new
tests/library/trace-viewer-scrub.spec.ts. None of the failing tests load trace-viewer UI code.

Pre-existing flake / infra

Uncertain

  • [msedge] › mcp/http.spec.ts:528 › http transport shared context: one idle timer across clients
    @mcp-windows-latest-msedge1 failure in 108 runs on this bot, and it's this run. The same
    test on the firefox project failed once on feat(screencast): style action decorations, keep cursor visible #42758, but that's a different project with a
    different error, so it doesn't clear this one under my own bar. What it looks like is a timing
    race rather than a logic break — the assertion picked up two extra events, close browser: 1 and
    disconnect from shared browser: 1, i.e. the idle timer fired while the events were still being
    collected. Zero failures on the other 11 MCP bots (~1200 runs). A re-run is the cheapest way to
    settle it.

Also worth knowing: the PR's own new test
[firefox-library] › library/trace-viewer-scrub.spec.ts:226 › should reveal snapshot when hovering an action or picking a locator during playback
was flaky on firefox-ubuntu-22.04-node20 — it passed on retry, so it isn't a failure, but it's a
brand-new test with no history and it's the one piece of this report the diff does reach.

Triaged by the Playwright bot - agent run

@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit 0ee695b into microsoft:main Sep 18, 2026
41 of 45 checks passed
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.

2 participants