Schema additions on LocalMeal:
- photoThumbnailUrl: pre-generated mana-media thumbnail URL, used in
list views to save bandwidth (full photoUrl stays for the detail
view + lightbox)
- foods: AnalyzedFood[] (name / quantity / calories) — Gemini Vision
already returns this breakdown but the previous flow threw it away
- new AnalyzedFood type exported from the barrel
Encryption registry:
- meals encrypted allowlist now includes 'foods' (food names are
user content; aes.ts JSON-stringifies arrays before wrap, so an
array value works the same as a string)
- registry comment updated to enumerate which photo fields stay
plaintext and why
New mutation: mealMutations.update(id, dto) for inline meal edits.
Patches only the supplied fields, runs encryptRecord on the partial
update so encrypted columns stay encrypted, then re-decrypts the merged
row to return a plaintext snapshot.
queries.ts: new loadMealById(id) helper used by the detail page's
inline useLiveQueryWithDefault wrapper (matches the planta DetailView
pattern of capturing the route param directly in the closure).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>