From c184991b3aa1bca988ef8d7b2bcad64be2bf58af Mon Sep 17 00:00:00 2001 From: Till JS Date: Thu, 9 Apr 2026 16:05:13 +0200 Subject: [PATCH] feat(mana/web/nutriphi): inline text + photo quick-add in workbench ListView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../src/lib/modules/nutriphi/ListView.svelte | 154 +++++++++++++++++- 1 file changed, 146 insertions(+), 8 deletions(-) diff --git a/apps/mana/apps/web/src/lib/modules/nutriphi/ListView.svelte b/apps/mana/apps/web/src/lib/modules/nutriphi/ListView.svelte index 89bbcaf20..b1b373756 100644 --- a/apps/mana/apps/web/src/lib/modules/nutriphi/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/nutriphi/ListView.svelte @@ -1,12 +1,16 @@ m.id} emptyTitle="Noch keine Mahlzeiten heute"> @@ -69,6 +145,46 @@ {/if} + + +
+ + + + +
{/snippet} {#snippet header()} @@ -77,14 +193,36 @@ {/snippet} {#snippet item(meal)} -