# Moonlight tasks

# Run all e2e tests
test:
  pnpm test

# Run probabilistic smoke tests (vrt-style)
smoke:
  npx playwright test e2e/smoke.test.ts --reporter=list

# Run smoke tests with a specific seed for reproducibility
smoke-seed seed="":
  VRT_SEED={{seed}} npx playwright test e2e/smoke.test.ts --reporter=list

# Run visual regression tests
vrt:
  npx playwright test e2e/visual-regression.test.ts --reporter=list

# Update VRT baselines (run after intentional visual changes)
vrt-update:
  UPDATE_BASELINES=true npx playwright test e2e/visual-regression.test.ts --reporter=list

# Run unit tests
test-unit:
  pnpm test:unit

# Type check (MoonBit)
check:
  moon check

# Type check (TypeScript: entry points, e2e tests, config)
check-ts:
  pnpm typecheck

# Format
fmt:
  moon fmt

# Build all
build:
  pnpm build:all

# Build the GitHub Pages site under the repository path
build-pages:
  pnpm moon:build:compat
  pnpm exec vite build --base /moonlight/
  pnpm exec rolldown -c rolldown.config.mjs

# Dev server
dev:
  pnpm dev

# Run the visual model tests (semantic model vs. real DnD)
visual-model:
  pnpm test:visual-model

# vlmkit: reference-free integrity gate over 3 viewports (needs `just dev` running)
vlm-integrity:
  pnpm vlm:integrity

# vlmkit: capture / diff visual snapshots (needs `just dev` running)
vlm-snapshot:
  pnpm vlm:snapshot
