The workbench card was read-only — users had to navigate to /nutriphi/add
to log anything. Now the card has a quick-add bar in the toolbar slot:
- Text input → Enter or send button → mealMutations.create() with
suggestMealType() (no AI round-trip; users get instant persistence
and can edit nutrition later from the detail page)
- 📷 button → file picker (capture=environment for mobile camera) →
photoMutations.uploadAndAnalyze → mealMutations.createFromPhoto with
the full Gemini result (foods + thumbnail + confidence)
- Toast on success ("📷 Mahlzeit hinzugefügt · KI 87%") and on error
Item rendering also got a small upgrade:
- Each row is now a link to /nutriphi/[id] (matches the rest of the
nutriphi pages now that the detail route exists)
- Thumbnail shown next to the row when present (uses photoThumbnailUrl
for bandwidth)
- 📷 indicator badge for photo-mode meals
Pre-existing bug fix in passing: the goals query was reading from the
non-existent table 'nutriphiGoals' instead of 'goals' (the actual table
name from module.config.ts), so the calorie target was never visible
in the workbench card. Switched to 'goals'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>