record-browser-gif
Record Browser GIF
Produce a short, truthful UI demonstration as a local GIF, and — only when the task includes attaching it to a pull request — publish it through the attach workflow at the end of this skill. The available browser-control workflow remains preferred. Use Playwright Videos when that workflow supports continuous capture at higher frame rates; use the bundled encoder for trimming, playback speed, final hold, dimensions, and size.
The archived evidence-chain decision records why one storyboard comes from one isolated run and why publication revalidates both the artifact and the demonstrated pull-request head.
Every GUI pull request includes a GIF
A pull request that changes product-user-visible GUI behavior MUST include a demonstration GIF recorded with this skill and embedded in the pull request body via the attach workflow.
The recording itself is part of the evidence: use a real server booted from that pull request's branch tree, a real API key, and real model rounds. Never substitute fixture queries, mock transports, synthetic event injection, or test-only hooks unless the user explicitly asked for a fixture recording. Next to the embed, state the exact demonstrated commit SHA, the tree and origin that served it, any mode flags or browser-state exceptions, and whether a real model round ran, so reviewers know exactly what the recording proves.
Keep recording separate from publication
- Recording produces local video or screenshots; encoding produces one
.gifartifact, or its numbered parts when it exceeds the 5 MiB limit. Neither mutates remote state. - Publication — attaching the GIF to a pull request body with
gh --attach— is the separate final step, performed only when the task includes attaching the GIF to a pull request. It never commits to any branch. - Preserve the requested recording conditions. A real-server or real-API demo must not use fixture queries, mock transports, synthetic event injection, or test-only hooks. If credentials or the server are unavailable, report that limitation instead of substituting a fixture.
- Never read or expose credential values. Use the application's normal configuration path and a benign demonstration prompt.
Stage the application
A GIF for a specific pull request demonstrates that pull request's tree, so stage per pull request:
- Require a clean worktree, record its exact commit with
git rev-parse HEAD, then build that recorded tree — here,pnpm run build && pnpm run build:web. A GIF recorded against another commit's build misattributes the evidence. - Boot one server per port from that tree with fresh scratch
DSH_HOME,DSH_AGENTS_HOME, workspace, and session state. Give the browser a fresh isolated context or profile as well; if the browser workflow cannot create one, clear that origin's cookies and site storage before navigation so persisted client state cannot affect the evidence. Real API credentials can be available in~/.dsh/.credentials.yamleven whenDEEPSEEK_API_KEYand the root.envare absent. With a scratchDSH_HOME, use a recording overlay to set thedsh-credentials-localprovider'spathto that existing file's absolute path. Let the application's normal credential provider resolve the key; never echo it. - Treat one storyboard as one evidence run: every published frame comes from that server and those state roots, workspace, session, and model-backed scenario run. If capture automation fails, discard its frames and rerun from fresh roots; never splice frames from separate runs.
- When switching between pull requests, stop the old server by PID or an exact match on its command line. A broad
pkill -fpattern can match and kill the shell that launched it — including your own.
Record the flow
Follow the available browser-control workflow's setup, interaction, and cleanup instructions. When it exposes recordVideo, enable video on the same controlled context to capture more intermediate frames. Otherwise use screenshot capture within that workflow; video availability does not determine which browser-control workflow to use. Existing user browser state remains an explicit isolation exception.
Only when browser control is unavailable, use the repository-declared Playwright dependency in an isolated headless browser and state that fallback in the capture notes. In this repository it resolves from apps/web/package.json; do not install another driver or open the user's browser.
Before recording, identify the origin, built or development server, transport, and any mode overrides. When a production default opens a native surface that automation cannot drive, select an official browser-operable production backend through normal application configuration and disclose the override.
Store the script, raw video, timing notes, QA frames, and GIF under the repository's gitignored .playwright-mcp/ directory. Create the run directory first.
Capture video
Match viewport and recordVideo.size explicitly: Playwright otherwise scales the video down to fit 800×800, which can make UI text unreadable.
Configure video through the chosen browser-control workflow. The standalone Pla
