Skip to content

T-YHMF-sdf-storybook-screenshots

State: planning/draft · Impact: medium · Complexity: small

Give every story a repeatable light and dark screenshot at tauriMedium, as a moon task outside check, so PRs can embed screenshots and review is visual.

There is no tooling to capture Storybook stories; screenshots have been taken by hand. The playwright dependency is not installed in src-nuxt.

scripts/story-shot.ts drives Playwright against iframe.html?id=<story>&viewMode=story&globals=theme:dark at the tauriMedium viewport, waits for the story to settle, and writes docs/screenshots/<slug>/{light,dark}.png. A moon task sdf:story-shots runs it and is not part of check.

  1. Confirm the theme global’s key and values in .storybook/preview.ts (gotcha: the URL global must match it).
  2. Add playwright as the only dependency change.
  3. Write scripts/story-shot.ts: argument is a story id or slug; sets viewport tauriMedium; renders light and dark; waits for settle.
  4. Add the sdf:story-shots moon task, excluded from sdf:check.
  5. Document usage in a header comment of the script.
AreaNote
solutions/ontological/desktop/src-nuxt/scripts/story-shot.tsPlaywright capture script
solutions/ontological/desktop/src-nuxt/moon.ymlthe sdf:story-shots task
solutions/ontological/desktop/src-nuxt/package.jsonplaywright dependency only; this task is the one allowed to edit it
solutions/ontological/desktop/src-nuxt/.storybook/preview.tsread only; theme global key
  • AC-1: moon run sdf:story-shots -- <story> writes both light.png and dark.png under docs/screenshots/<slug>/.
  • AC-2: Running it twice on an unchanged story produces identical images.
  • AC-3: sdf:check does not run the task and stays green.
  • AC-4: moon run sdf:check and moon run sdf:test pass, run detached one at a time; nuxi typecheck and vue-tsc are never run locally (CI typechecks).
  • Embedding screenshots in PRs (done by the reviewer) and CI integration.
  • none
  • Plan: /Users/sksizer/.claude/plans/toasty-soaring-ullman.md (the adoption wizard and operator screens, built in SDF) and N-6DUQ.
  • Control spec: docs/planning/strategy/wizard-prototype.html; strategy: N-HETB-adopting-a-project.
  • Rules every agent follows are in the plan and the shared acceptance criteria above; the derive step later replaces fixtures with generated transport.

← Back to Tasks