Skip to content

Add demo video recording skill and Playwright infrastructure#12345

Merged
nstrayer merged 3 commits intomainfrom
nick/demo-video-skill
Mar 16, 2026
Merged

Add demo video recording skill and Playwright infrastructure#12345
nstrayer merged 3 commits intomainfrom
nick/demo-video-skill

Conversation

@nstrayer
Copy link
Copy Markdown
Contributor

@nstrayer nstrayer commented Mar 6, 2026

Summary

  • Adds a Claude Code skill (positron-demo-video) for creating polished demo videos of Positron features through a collaborative script-then-record workflow
  • Includes demo utilities (pause, narrate, humanType, humanClick, humanHover, showOverlay, setupDemoLayout) for natural-pacing in Playwright tests
  • Wires up DEMO_RECORD_VIDEO env var to enable Playwright video capture for Electron via recordVideo launch option
  • Includes an example demo test for notebook cell drag-to-reorder as a reference

Details

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=1 is set.

Files added

  • .claude/skills/positron-demo-video/ -- skill definition and reference docs
  • test/e2e/demos/demo-utils.ts -- human-pacing utility functions
  • test/e2e/demos/nb-drag-reorder.demo.test.ts -- example demo test

Files modified

  • test/e2e/infra/code.ts -- added recordVideo to LaunchOptions
  • test/e2e/infra/playwrightElectron.ts -- pass recordVideo through to Electron launch
  • test/e2e/fixtures/test-setup/options.fixtures.ts -- read DEMO_RECORD_VIDEO env var
  • .gitignore -- ignore demo-videos/ output directory

Test plan

  • Verify existing e2e tests still pass (no changes to default behavior)
  • Run with DEMO_RECORD_VIDEO=1 to confirm video files are produced in demo-videos/
  • Invoke the skill via /positron-demo-video and confirm the collaborative workflow triggers

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@nstrayer nstrayer changed the title feat: add demo video recording skill and Playwright infrastructure Add demo video recording skill and Playwright infrastructure Mar 6, 2026
@nstrayer nstrayer force-pushed the nick/demo-video-skill branch from 02c9b79 to e812e78 Compare March 10, 2026 17:54
Copy link
Copy Markdown
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

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

I still need to test it out but the code changes look good to me! Are the e2e failures related by any chance?

I'd also want @midleman to approve before we merge this one

Comment thread test/e2e/infra/playwrightElectron.ts Outdated
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.
@nstrayer nstrayer force-pushed the nick/demo-video-skill branch from e812e78 to c67f245 Compare March 13, 2026 15:48
@nstrayer nstrayer requested a review from seeM March 13, 2026 15:49
seeM
seeM previously approved these changes Mar 16, 2026
Copy link
Copy Markdown
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

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

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 |

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.

Nit: probably enough to reference the test/e2e/demos folder

@@ -0,0 +1,85 @@
# Infrastructure Setup (One-Time)
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.

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
midleman previously approved these changes Mar 16, 2026
Copy link
Copy Markdown
Contributor

@midleman midleman left a comment

Choose a reason for hiding this comment

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

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
@nstrayer nstrayer dismissed stale reviews from midleman and seeM via a090a04 March 16, 2026 17:53
@nstrayer nstrayer merged commit 3e7ab55 into main Mar 16, 2026
18 of 21 checks passed
@nstrayer nstrayer deleted the nick/demo-video-skill branch March 16, 2026 17:54
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants