- useDetection.analyze() now awaits a requestAnimationFrame before
calling runInference. Without it React commits isAnalyzing=true and
immediately hits the synchronous TFLite runSync that blocks the JS
thread for 500-1500ms — the analyzing skeleton overlay appears AFTER
the inference, defeating its purpose.
- Same hook enforces a minimum 600ms total before resolving so a
cached/fast inference doesn't show a skeleton flicker that reads as
a glitch.
- ScannerScreen.handleCapture is split: capture stays inline,
processImage(uri) is now its own async function. Cleaner control
flow when a take succeeds but analysis is delegated.
- The previously dead "image gallery" icon next to the shutter is now
a real TouchableOpacity that fires a "coming soon" toast (we'll wire
it to expo-image-picker once we add the lib + native rebuild).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>