Files
initiative/specs/030-bulk-import-sources/quickstart.md
Lukas c323adc343 Add spec, plan, and tasks for 030-bulk-import-sources feature
Defines the "Bulk Import All Sources" feature for the on-demand bestiary
system: one-click loading of all ~104 bestiary sources with concurrent
fetching, progress feedback, toast notifications, and completion reporting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 22:46:24 +01:00

1.4 KiB

Quickstart: Bulk Import All Sources

Prerequisites

  • Node.js 20+, pnpm
  • Feature 029 (on-demand bestiary) merged and working

Setup

git checkout 030-bulk-import-sources
pnpm install
pnpm --filter web dev

Key Files

File Role
apps/web/src/hooks/use-bulk-import.ts NEW — bulk import state + logic
apps/web/src/components/bulk-import-prompt.tsx NEW — side panel bulk import UI
apps/web/src/components/toast.tsx NEW — lightweight toast notification
apps/web/src/components/action-bar.tsx MODIFIED — Import button added
apps/web/src/components/stat-block-panel.tsx MODIFIED — bulk import mode
apps/web/src/App.tsx MODIFIED — wiring
apps/web/src/hooks/use-bestiary.ts MODIFIED — expose fetchAndCacheSource for bulk use

Testing

pnpm test                    # All tests
pnpm vitest run apps/web/src # Web app tests only
pnpm check                   # Full merge gate

Manual Verification

  1. Open app at localhost:5173
  2. Click Import button (top bar) — side panel opens with bulk import prompt
  3. Verify base URL is pre-filled, editable
  4. Click "Load All" — observe progress counter and bar
  5. Close side panel mid-import — toast appears at bottom-center
  6. Wait for completion — toast shows success/failure message
  7. Search for any creature — stat block displays without fetch prompt