Repository navigation
fix(app): reset screencast recordings when a new run starts - #580
hoanle0126 wants to merge 2 commits into
Conversation
|
@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. |
[Medium impact] The PR appears safe to merge; the blank-preview finding is fixed. SummaryClears old screencast recordings when execution data resets or a 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 |
| #handleScreencastReset = () => { | ||
| if (this.#recordings.reset()) { | ||
| this.requestUpdate() | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
What & why
wdio-devtools-browseronly appended to its screencast list onscreencast-readyand 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, dispatchesscreencast-resetfromDataManagerControllerwhenever execution data resets for a new run orloadTraceFile()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
Packages touched
app(UI)Capability matrix
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.