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>
This commit is contained in:
44
specs/030-bulk-import-sources/quickstart.md
Normal file
44
specs/030-bulk-import-sources/quickstart.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Quickstart: Bulk Import All Sources
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Node.js 20+, pnpm
|
||||
- Feature 029 (on-demand bestiary) merged and working
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
```bash
|
||||
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
|
||||
Reference in New Issue
Block a user