Pictuary: 'Mine' filter now simply filters dex entries where
discoverer_username matches the signed-in user's preferred_username.
No myUser.discoveries dependency — works immediately, no hack.
Scanner: replaced file upload with CameraCapture component using
getUserMedia({ facingMode: 'environment' }). Live camera view with
a capture button and framing reticle. No arbitrary image upload.
Camera stream cleaned up on unmount.
Reverted the optimisticInsert myUser-creation hack.
Fix Mine tab: create myUser on first scan if null
optimisticInsert now creates a minimal UserRecord from the auth store
when myUser is null (e.g. getUser returned 404 or refreshAll hasn't
completed). Previously, if myUser was null, the discovery was added
to the dex but never to the user's discoveries list, so the Mine
filter showed nothing.
Also added console.error logging to the getUser catch block so 404s
and other failures are visible in the browser console.
- Rework App.svelte: lazy Gradio connection, no boot-time AI clients
- New Scanner: upload → downscale → /scan → render result
- New services: dataset.ts (CDN reads), scan.ts (lazy backend client + 90s timeout)
- New stores/data.ts: shared reactive cache + optimistic insert (no refetch)
- New utils: image.ts (downscale), rarity.ts (rarity→tier)
- New types for Monster, ScanResult, LeaderboardEntry, UserRecord, Stats
- EXPLANATION.md: full codebase architecture doc
- SIMPLIFICATION_PLAN.md: remove/keep/add plan for the gut