Add demo video recording skill and Playwright infrastructure#12345
Merged
Add demo video recording skill and Playwright infrastructure#12345
Conversation
|
E2E Tests 🚀 |
02c9b79 to
e812e78
Compare
Add DEMO_RECORD_VIDEO env var to enable video capture during e2e tests. Passes recordVideo config through launch options to Playwright Electron. Includes demo-utils helper and gitignores the demo-videos output dir.
Skill for creating demo videos of Positron features using the e2e test infrastructure. Includes reference docs for demo patterns and infrastructure setup.
e812e78 to
c67f245
Compare
seeM
previously approved these changes
Mar 16, 2026
Contributor
seeM
left a comment
There was a problem hiding this comment.
This is really great, ty! I used it to create a simple test demo and it worked well. Definitely looking forward to using it more.
The changes to existing files look really low risk so think it's good to go.
Comment on lines
+149
to
+163
| ### Demo Utilities (`test/e2e/demos/demo-utils.ts`) | ||
|
|
||
| | Function | Purpose | | ||
| |----------|---------| | ||
| | `setupDemoLayout(app, page)` | Collapse sidebars/panels, enable screencast mode | | ||
| | `DEMO_SCREENCAST_SETTINGS` | Settings object to spread into `settingsFile.append()` | | ||
| | `pause(page, ms)` | Wait between actions | | ||
| | `narrate(page, text, holdMs)` | Show overlay + wait for viewer to read | | ||
| | `showOverlay(page, text)` | Set overlay text (persists until changed) | | ||
| | `humanType(page, locator, text)` | Type at 80ms/keystroke | | ||
| | `humanClick(page, locator)` | Click with 250ms hold (visible in screencast mode) | | ||
| | `humanHover(page, locator)` | Hover with pauses | | ||
| | `zoomTo(page, locator, opts?)` | Smoothly zoom into an element (CSS transform, text stays sharp) | | ||
| | `zoomReset(page, opts?)` | Smoothly zoom back to normal | | ||
|
|
Contributor
There was a problem hiding this comment.
Nit: probably enough to reference the test/e2e/demos folder
| @@ -0,0 +1,85 @@ | |||
| # Infrastructure Setup (One-Time) | |||
Contributor
There was a problem hiding this comment.
Do you still need this file? It looks like most of it is implemented and committed in this PR.
It also wasted a bit of time in my testing:
⏺ Let me start by researching what's available, then I'll propose a
script for your approval.
⏺ Let me research the existing infrastructure and notebook tests to
build a good demo script.
⏺ Bash(git -C /Users/seem/posit/positron log --oneline main..HEAD |
head -20)
⎿ c67f24527f1 feat: add positron-demo-video Claude skill
bb6d884a74c feat: add video recording support to e2e test inf
rastructure
… +20 lines (ctrl+o to expand)
⏺ Searched for 2 patterns, read 3 files (ctrl+o to expand)
⎿ Loaded test/e2e/CLAUDE.md
⏺ Good, the infrastructure is already in place. Now let me quickly
check what notebook page objects are available so I can write a
realistic script.
midleman
previously approved these changes
Mar 16, 2026
Contributor
midleman
left a comment
There was a problem hiding this comment.
This looks OK from infra stand point as video recording is disabled by default. 👍
- Remove redundant infrastructure-setup.md reference (already committed) - Replace detailed utility table with pointer to test/e2e/demos/ folder - Remove infrastructure check step from Phase 4 workflow - Fix numbered list after step removal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
positron-demo-video) for creating polished demo videos of Positron features through a collaborative script-then-record workflowpause,narrate,humanType,humanClick,humanHover,showOverlay,setupDemoLayout) for natural-pacing in Playwright testsDEMO_RECORD_VIDEOenv var to enable Playwright video capture for Electron viarecordVideolaunch optionDetails
The skill guides Claude through a multi-phase workflow: research the feature, propose a plain-text script, iterate with the user, then record using Playwright. Videos are captured as WebM and optionally converted to MP4 via ffmpeg.
Infrastructure changes are minimal and backwards-compatible -- existing tests are unaffected. Video recording only activates when
DEMO_RECORD_VIDEO=1is set.Files added
.claude/skills/positron-demo-video/-- skill definition and reference docstest/e2e/demos/demo-utils.ts-- human-pacing utility functionstest/e2e/demos/nb-drag-reorder.demo.test.ts-- example demo testFiles modified
test/e2e/infra/code.ts-- addedrecordVideotoLaunchOptionstest/e2e/infra/playwrightElectron.ts-- passrecordVideothrough to Electron launchtest/e2e/fixtures/test-setup/options.fixtures.ts-- readDEMO_RECORD_VIDEOenv var.gitignore-- ignoredemo-videos/output directoryTest plan
DEMO_RECORD_VIDEO=1to confirm video files are produced indemo-videos//positron-demo-videoand confirm the collaborative workflow triggers