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.
Allow anonymous scanning, simplify top bar, key display
- Drop the anonymous warning banner; scanning now works without sign-in
(backend falls back to its own token for AI quota + attribution)
- Scanner auth gate removed; token passed as empty string when anon
- Top bar: drop progress bar, just show ⭐ rarity 🔍 count (or global
stats for anonymous)
- PicletDetail: display key with spaces instead of underscores
- 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