Replace the first-run placeholder seed with an onboarding canvas

This commit is contained in:
2026-06-09 14:03:47 +03:00
parent 7d247e8d2c
commit 81f563a3e7
16 changed files with 852 additions and 93 deletions
+5 -1
View File
@@ -94,6 +94,8 @@ preview, and have it survive reload. Single source kind: inline-data specs only
- `stores/SnippetStore.ts``useSnippetStore` with `snippets`, `activeSnippetId`,
selector-derived `activeSnippet`; load-on-startup; create/select/delete/update actions
(debounced auto-save of edits, spec §03B). Seed one sample snippet on first run.
_(Superseded later: an empty library now shows the onboarding canvas instead of a
placeholder seed — spec §02 → First-Run & Empty Workspace.)_
- `components/SnippetLibrary.tsx` — list + "Create New" pinned item + select/delete.
- `components/SpecEditor.tsx` — Monaco JSON editor bound to active snippet's spec;
debounced write-back to the store. (Worker wiring via Vite `?worker` imports —
@@ -111,7 +113,9 @@ preview, and have it survive reload. Single source kind: inline-data specs only
**Manual checks**
- Fresh load seeds a sample snippet that renders a bar chart.
- Fresh load shows the onboarding canvas (welcome + Create + live example gallery);
Create or an example's Add lands you in the editor with a rendered chart. _(M1 originally
seeded a sample snippet; replaced by the onboarding canvas — spec §02.)_
- Type in the editor → preview updates after the debounce; bad JSON → editor keeps
working, preview shows an error, recovers when fixed.
- Reload → snippets and selection persist.