ML
- Reinstall react-native-fast-tflite + react-native-nitro-modules and
register the fast-tflite Expo plugin in app.json
- Wire model.ts to the real native module: dynamic require + lazy
loadTensorflowModel (cached), softmax/argmax on output, build Detection
with the project 0-100 confidence convention. Falls back to mockDetection
on any load/inference failure so the app never breaks.
- Align preprocessing input size to 256x256 to match the Python
MobileNetV2 export.
Scanner UX
- Preload the TFLite model on Scanner mount to avoid the ~1-2s decode hit
on first capture
- Add a flip-front/back camera control with a toast warning that the rear
camera gives better results
- Show a full-screen analyzing skeleton overlay while inference runs
- Memoize ConfidenceMeter color into a single computed value
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contexte
- Build Android C++ instable sur Windows (CMake/Ninja path too long, Nitro
headers manquants au clean). Modèle .tflite final pas encore prêt.
- Désinstall temporaire des deux libs natives, le mock JS dans model.ts
continue de servir les détections simulées pondérées.
Changements
- package.json : retire react-native-fast-tflite (3.0.1)
- pnpm-lock.yaml : régénéré, -72 packages dont nitro-modules
- src/services/tflite/model.ts : refactor pur mock, interface publique
inchangée (loadModel + runInference), procédure de réintégration
documentée en tête du fichier
- plugins/withCmakeFix.js : plugin Expo config qui injecte les flags
CMake (response files + ninja 1.12.1 + OBJECT_PATH_MAX) à chaque
prebuild — dormant tant que fast-tflite n'est pas réintégré
- app.json : référence le plugin
- CLAUDE.md + .claude/notes/android-build : doc de l'état actuel et
des étapes de réintégration (idéalement via EAS Build)
Reste
- src/assets/models/grapevine_v1.tflite conservé pour la réintégration
- metro.config.js continue de déclarer .tflite dans assetExts
- TypeScript check: 1 erreur préexistante (homeheader.tsx, palette[50]),
non liée à ce changement
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add VinEye/.npmrc with node-linker=hoisted to avoid Windows MAX_PATH
crashes with .pnpm/<hash>/ deep paths during native compilation
- Replace react-native-maps (Google Maps SDK requires API key) with
react-native-webview (renders Leaflet + OSM tiles, no key needed)
- Add expo-location for GPS capture during scans
- Add expo-dev-client for proper HMR + deep-link launch in dev builds
- Configure expo-location plugin in app.json with FR permission strings
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>