From bd748b0a144a5c3f7c14b27ba4b86710e1441bd3 Mon Sep 17 00:00:00 2001 From: Till JS Date: Thu, 9 Apr 2026 16:14:50 +0200 Subject: [PATCH] feat(mana/web/nutriphi): context menu quick-action for "Neue Mahlzeit" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a contextMenuActions entry to the nutriphi registerApp() block matching the convention todo / calendar / contacts / habits / notes / dreams / cycles all use: a Plus-icon "Neue Mahlzeit" action that dispatches a window CustomEvent('mana:quick-action', { app: 'nutriphi', action: 'new' }). Note: there is currently no registered listener for mana:quick-action in the codebase — every existing module dispatches it but nothing consumes it yet (presumably waiting for a central handler in the workbench shell). Adding the entry now keeps nutriphi consistent with the convention so it will light up automatically once the listener lands. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/mana/apps/web/src/lib/app-registry/apps.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/mana/apps/web/src/lib/app-registry/apps.ts b/apps/mana/apps/web/src/lib/app-registry/apps.ts index c4372c5f5..99aa290aa 100644 --- a/apps/mana/apps/web/src/lib/app-registry/apps.ts +++ b/apps/mana/apps/web/src/lib/app-registry/apps.ts @@ -541,6 +541,17 @@ registerApp({ views: { list: { load: () => import('$lib/modules/nutriphi/ListView.svelte') }, }, + contextMenuActions: [ + { + id: 'new-meal', + label: 'Neue Mahlzeit', + icon: Plus, + action: () => + window.dispatchEvent( + new CustomEvent('mana:quick-action', { detail: { app: 'nutriphi', action: 'new' } }) + ), + }, + ], }); registerApp({