mirror of https://github.com/garrytan/gstack.git
A screenshot proves what a page looked like; it cannot show what a page
did. Timing bugs — double-submit, loading flicker, focus jumping, a drag
that lands wrong — are the ones a developer most needs to see happen,
and they are exactly the ones a still frame loses.
Playwright records at the context level and flushes each page's .webm on
context close, so start and stop both route through recreateContext(),
which already preserves cookies, storage, and open tabs. Refs do not
survive that rebuild, so stop says so rather than leaving the caller to
find out on the next click.
Three things the reporting has to get right, because each one silently
costs the caller evidence they think they have:
- recreateContext() reports a degraded rebuild by return value, not by
throwing, and that rebuild is the flush. Dropping it would print
"Recording stopped" over a list of files while the caller's tabs had
just been reset, so start and stop both carry it out.
- stop reads the recording directory rather than the live pages. A tab
closed mid-recording still produced a video; enumerating open pages
would miss it. Files present before the recording began are excluded
so a reused directory does not re-report an earlier take.
- starting over an active recording reports the take it superseded.
That video is already on disk, and a caller who is not handed its
path has lost it.
handoff and connect leave the manager headed with the recording still
flagged, where recreateContext() refuses to run. The videos have already
flushed by then, so stop skips the rebuild there and hands them back
instead of raising.
record is control-scoped: it rebuilds the context out from under every
open tab, and it writes whatever is on screen — including anything typed
into a login form — to disk.
|
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| test | ||
| PLAN-snapshot-dropdown-interactive.md | ||
| SKILL.md | ||
| SKILL.md.tmpl | ||