xiaohongshu
xiaohongshu
canvas-filmstrip-testing
Visual regression for canvas-rendered matrix progressions. Tests filmstrip strips that show how 2D data evolves visually over time. Auto-apply when editing *Progressions.ts strip definitions or stories with filmstrip components.
Full skill instructions
Tests canvas-rendered filmstrips that visualize how matrix data (energy fields, foam grids, etc.) evolves over simulated time. Each strip shows multiple frames side-by-side.
This is about visual rendering of data progressions. It catches:
For the underlying data correctness, see matrix-data-model-progression-testing first.
Each layer tests a specific aspect of the wave physics simulation:
| Layer | Story | Progressions File |
|---|---|---|
| 1 | 01-bathymetry | src/render/bathymetryProgressions.ts |
| 2 | 02-energy-field | src/state/energyFieldProgressions.ts |
| 3 | 03-shoaling | src/render/shoalingProgressions.ts |
| 4 | 04-wave-breaking | src/render/waveBreakingProgressions.ts |
| 5 | 05-energy-transfer | src/render/energyTransferProgressions.ts |
| 6 | 06-foam-grid | src/render/foamGridProgressions.ts |
| 7 | 07-foam-dispersion | src/render/foamDispersionProgressions.ts |
| 8 | 08-foam-contours | src/render/foamContoursProgressions.ts |
stories/
01-bathymetry/
01-bathymetry.mdx → MDX story page
01-bathymetry.visual.spec.ts → Playwright visual test
strip-bathymetry-basic.png → Baseline screenshot (colocated)
strip-bathymetry-features.png
02-energy-field/
...
src/render/*Progressions.ts → Progression data + strip definitions
Each progression file exports strips for visual testing:
// src/render/bathymetryProgressions.ts
export const BATHYMETRY_STRIP_BASIC = {
testId: 'strip-bathymetry-basic',
pageId: '01-bathymetry',
snapshots: PROGRESSION_BATHYMETRY_BASIC.snapshots,
};
export const BATHYMETRY_STRIPS = [
BATHYMETRY_STRIP_BASIC,
BATHYMETRY_STRIP_FEATURES,
];
// stories/01-bathymetry/01-bathymetry.visual.spec.ts
import { BATHYMETRY_STRIPS } from '../../src/render/bathymetryProgressions';
import { defineStripVisualTests } from '../visual-test-helpers';
defineStripVisualTests(BATHYMETRY_STRIPS);
# Run visual tests
npm run test:visual:headless # CI/agents
npm run test:visual:headed # Debugging with browser UI
# Update baselines after intentional changes
npm run test:visual:update:headless
npm run test:visual:update:headed
# Clear test artifacts
npm run reset:visual # Clear results/reports only
npm run reset:visual:all # Clear results + colocated baselines
# Start dev server for interactive debugging
npm run stories # Starts on http://localhost:3001
CRITICAL: Always verify data before visual testing.
Wrong workflow:
Change coefficient → Update visual snapshot → "Looks the same, try higher"
Correct workflow:
Change coefficient → Run npx vitest run *Progressions.test.ts →
Verify matrix values changed → Then update visual if needed
*Progressions.test.tsnpm run test:visual:update:headlessWhen a visual test fails:
strip-bathymetry-basic → BATHYMETRY_STRIP_BASIC in progressions file01-bathymetry → stories/01-bathymetry/ folderstrip-{layer}-{variant} → *{layer}Progressions.ts// Start dev server
npm run stories
// Open specific story page
mcp__chrome-devtools__new_page({
url: "http://localhost:3001/?page=01-bathymetry"
})
// Take snapshot to find strip UIDs
mcp__chrome-devtools__take_snapshot()
// Screenshot the strip element
mcp__chrome-devtools__take_screenshot({ uid: "<strip-uid>" })
// After code changes, reload and compare
mcp__chrome-devtools__navigate_page({ type: "reload" })
mcp__chrome-devtools__take_screenshot({ uid: "<strip-uid>" })
Check:
The baseline may be incorrect. Manually verify:
npm run storiesnpm run test:visual:update:headlessxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience