Grapevine_Disease_Detection/VinEye
Yanis 59d4ae8ee4 fix(state): refresh history + game progress + profile on screen focus
useHistory and useGameProgress each instantiate a private state per
consumer (no global store), so an addScan from Scanner did NOT appear
in Home's RecentScans nor bump Profile stats until the app was killed
and relaunched.

- RecentScans now reload()s its history from AsyncStorage on
  useFocusEffect — covers the post-scan return to Home.
- ProfileScreen reload()s both useGameProgress and useUserProfile on
  useFocusEffect so the Bento stats and avatar are fresh after edits.
- useGameProgress wraps loadProgress in useCallback and exposes it,
  enabling external triggers (used by the two screens above).
- ProfileScreen also fixes a brittle stat lookup: the BENTO_STATS keys
  ("scans"/"grapes"/"streak"/"xp") didn't match the GameProgress shape
  ("totalScans"/"uniqueGrapes.length"/"bestStreak"/"xp"). Now an
  explicit statValues map drives the render.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 14:03:28 +02:00
..
.claude chore(ml,android): retire react-native-fast-tflite + nitro, mock JS only 2026-04-30 21:14:38 +02:00
assets feat(mobile): UI overhaul + ML pipeline + Android build fixes 2026-04-30 21:00:03 +02:00
plugins chore(android): propagate CMake fix to native subprojects 2026-05-01 11:30:55 +02:00
src fix(state): refresh history + game progress + profile on screen focus 2026-05-01 14:03:28 +02:00
.gitignore add VinEye frontend app + fix hardcoded paths + gitignore 2026-04-02 10:30:05 +02:00
.npmrc chore(deps,infra): pnpm hoisted mode + dependency cleanup for Map rebuild 2026-04-30 12:31:39 +02:00
app.json feat(scanner,ml): real TFLite inference + preload + flip camera + analyzing skeleton 2026-05-01 11:31:17 +02:00
App.tsx feat(auth): onboarding flow + local auth (no backend) 2026-05-01 09:33:27 +02:00
babel.config.js add VinEye frontend app + fix hardcoded paths + gitignore 2026-04-02 10:30:05 +02:00
CLAUDE.md chore(android): propagate CMake fix to native subprojects 2026-05-01 11:30:55 +02:00
components.json add VinEye frontend app + fix hardcoded paths + gitignore 2026-04-02 10:30:05 +02:00
global.css add VinEye frontend app + fix hardcoded paths + gitignore 2026-04-02 10:30:05 +02:00
index.ts add VinEye frontend app + fix hardcoded paths + gitignore 2026-04-02 10:30:05 +02:00
metro.config.js feat(mobile): UI overhaul + ML pipeline + Android build fixes 2026-04-30 21:00:03 +02:00
nativewind-env.d.ts add VinEye frontend app + fix hardcoded paths + gitignore 2026-04-02 10:30:05 +02:00
package.json feat(mobile): backend sync auth + ban handling + scan push 2026-05-01 12:11:11 +02:00
pnpm-lock.yaml feat(mobile): backend sync auth + ban handling + scan push 2026-05-01 12:11:11 +02:00
tailwind.config.js add VinEye frontend app + fix hardcoded paths + gitignore 2026-04-02 10:30:05 +02:00
tsconfig.json add VinEye frontend app + fix hardcoded paths + gitignore 2026-04-02 10:30:05 +02:00