Skip to content

fix(app): reset screencast recordings when a new run starts - #580

Open
hoanle0126 wants to merge 2 commits into
webdriverio:mainfrom
hoanle0126:fix/reset-screencast-videos-on-new-run
Open

hoanle0126 wants to merge 2 commits into
webdriverio:mainfrom
hoanle0126:fix/reset-screencast-videos-on-new-run

Conversation

@hoanle0126

Copy link
Copy Markdown
Contributor

What & why

wdio-devtools-browser only appended to its screencast list on screencast-ready and never cleared recordings when execution data reset. Across repeated runs in the same tab, the "Recording N" selector accumulated sessions from every prior run and kept showing stale video entries.

This extracts screencast recording state into screencast-recordings.ts, dispatches screencast-reset from DataManagerController whenever execution data resets for a new run or loadTraceFile() loads a trace (while skipping mid-run child scenario clears inside an active feature rerun), and resets the browser panel back to snapshot mode until the new run's recording arrives.

Type of change

  • Bugfix (non-breaking change which fixes an issue)

Packages touched

  • app (UI)

Capability matrix

  • Not applicable (fixes stale UI state across reruns without changing adapter capabilities)

Notes for reviewers

Verified locally with pnpm lint, pnpm typecheck, full workspace build, Vitest unit suite, and headless Chrome component tests (snapshot and screencast-player specs).

Screenshots / recordings

N/A - no visual layout or styling changes; resets stale recording entries when a new run starts.

@vercel

vercel Bot commented Nov 15, 2026

Copy link
Copy Markdown

@hoanle0126 is attempting to deploy a commit to the WebdriverIO's projects Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the blank-preview finding is fixed.

Summary

Clears old screencast recordings when execution data resets or a trace loads.

  • The browser panel clears old recordings when a fresh run or trace loads.

The previous finding is fixed. No new actionable issues were found. Tests were not run during this review.

Reviews (2) · Last reviewed commit: "fix(app): clear active replay URL on scr..." · Reviewed by Greptile

Comment on lines +429 to +432
#handleScreencastReset = () => {
if (this.#recordings.reset()) {
this.requestUpdate()
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Preview stays blank after reset

After a run has shown a DOM snapshot and then a screencast, this reset switches back to snapshot mode but leaves #activeUrl set. The video replaced the old iframe, so the reset creates an empty one. New mutations cannot fill it because render() only starts replay when #activeUrl is empty.

The preview stays blank until the user selects a command or mutation. Clear the cached snapshot state on reset so the next run can start replay.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit 7270816: #handleScreencastReset now clears #activeUrl and #screenshotData and triggers an update when resetting active state, so returning to the recreated snapshot iframe repopulates the DOM replay. Added a snapshot UI regression test covering this flow.

This branch has not been deployed

No deployments
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