You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: attach video walkthrough of newly-added tests to PR comment (#14560)
<!-- ccr-slack-attribution -->
_Requested by **Christian Byrne** · [Slack
thread](https://comfy-organization.slack.com/archives/C090H3X4VBL/p1785633691296179?thread_ts=1785619438.875159&cid=C090H3X4VBL)_
## Summary
When a PR adds a **new** Playwright spec file, CI now records a video
walkthrough of just that new test and posts a link to it in the PR
comment, next to the existing trace-viewer link. The existing suite
keeps running without video, so CI cost/time doesn't grow.
## Changes
- **What**:
- `.github/workflows/ci-tests-e2e.yaml`: new
`playwright-video-new-tests` job diffs the PR against its base branch
(`git diff --diff-filter=A`) to find spec files added under
`browser_tests/tests/`. If (and only if) there are any, it re-runs just
those files with Playwright video recording turned on, then a new
`deploy-and-comment-video` job deploys the video(s) to Cloudflare Pages
(same mechanism as the existing trace/report deploy — `wrangler pages
deploy`) and extends the existing unified PR comment with a collapsed
`video` section, using the same `upsert-comment-section` action the
trace section already uses.
- `.github/workflows/ci-tests-e2e-forks.yaml`: mirrors the same
deploy+comment steps for forked PRs, following this repo's existing
fork-safe two-workflow split (`workflow_run` downloads the artifact and
posts the comment with write permissions, since fork PRs only get a
read-only token).
- `playwright.config.ts`: video is opt-in via a `RECORD_VIDEO=true` env
var (only set by the new CI job), slowed down via `SLOW_MO=1000` so the
recording is legible — no change to default behavior for local runs or
the rest of the suite.
- `scripts/cicd/extract-playwright-videos.ts` /
`scripts/cicd/pr-video-deploy-and-comment.sh`: new scripts mirroring the
existing `extract-playwright-counts.ts` /
`pr-playwright-deploy-and-comment.sh` pattern, but for video attachments
instead of trace/pass-fail counts.
- `browser_tests/fixtures/utils/litegraphUtils.ts`: fixes
`connectOutput`/`connectWidget` to route slot positions through
`toAbsolute()` before dragging (they were canvas-relative pixels being
fed to page-absolute drag coordinates).
- `browser_tests/README.md`: documents the new-test video workflow.
- **Breaking**: none — additive only; existing trace/report comment
behavior is untouched, and the new jobs are not part of the required
`e2e-status` gate check.
- **Dependencies**: none new (reuses `wrangler`, already used by the
existing trace deploy step).
## Review Focus
- The "which files are new" detection (`git diff --diff-filter=A ...HEAD
-- browser_tests/tests`) relies on `fetch-depth: 0` in the new job's
checkout step.
- The bash `pr-*-deploy-and-comment.sh` scripts each duplicate their own
Cloudflare deploy-retry logic rather than sharing a helper — matching
the existing convention between `pr-playwright-deploy-and-comment.sh`
and `pr-storybook-deploy-and-comment.sh`, so this follows suit rather
than introducing a new shared-module pattern.
## Screenshots (if applicable)
N/A — this PR changes CI plumbing; the effect is a collapsible "🎬
New-test video walkthrough" section in a PR's bot comment whenever that
PR adds a new spec file.
---
_Generated by [Claude
Code](https://claude.ai/code/session_019rbmF3UTtRDFYkWEDnhzVL)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments