From cd594509b2f9b5bc27105a245bd9ac37bf19bdcf Mon Sep 17 00:00:00 2001 From: Till JS Date: Sat, 18 Apr 2026 17:24:52 +0200 Subject: [PATCH] chore: clear svelte-check errors + document scene-scope pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `app-registry/types.ts` now includes `tips` in the inline help shape, matching `ModuleHelp` and what `AppPage.svelte` actually renders. Drops 3 recurring type errors. - `event-scout` template's `{ kind: 'daily' }` cadence now carries the required `atHour` / `atMinute` fields (daily 08:00). Drops the 4th type error — svelte-check is clean. - `apps/mana/CLAUDE.md` gains a "Scene Scope" section documenting the pattern: wire `filterBySceneScopeBatch` in the query AND render `` from the empty branch, so users always see why the list is empty. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/mana/CLAUDE.md | 23 +++++++++++++++++++ .../apps/web/src/lib/app-registry/types.ts | 3 +++ .../src/agents/templates/event-scout.ts | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/apps/mana/CLAUDE.md b/apps/mana/CLAUDE.md index 43fe25efd..75ffb4aab 100644 --- a/apps/mana/CLAUDE.md +++ b/apps/mana/CLAUDE.md @@ -167,6 +167,29 @@ pnpm test:e2e # Playwright Svelte 5 runes are mandatory — no legacy `let count = 0; $: doubled = count * 2`. Always `$state`, `$derived`, `$effect`. See [`.claude/guidelines/sveltekit-web.md`](../../.claude/guidelines/sveltekit-web.md). +## Scene Scope + +Each workbench scene can carry `scopeTagIds` — a per-scene tag filter that module queries honour via `filterBySceneScopeBatch` from `$lib/stores/scene-scope.svelte`. When the filter hides everything, users need to see why. + +**When a module wires the scope filter, wire the empty state too:** + +```svelte + + +{#if items.length === 0} + {#if hasActiveSceneScope()} + + {:else} +

Noch keine Aufgaben

+ {/if} +{/if} +``` + +`ScopeEmptyState` renders a subdued "Bereichsfilter verbergen alles" message plus a one-click "Bereich zurücksetzen" button that calls `workbenchScenesStore.setSceneScopeTags(activeSceneId, undefined)`. `SceneAppBar` already shows a Funnel badge on scoped scene pills; the module doesn't need to duplicate that signal. Plan: [`docs/plans/scene-scope-empty-state.md`](../../docs/plans/scene-scope-empty-state.md). + ## AI Workbench The companion is a **second actor** that works alongside the human in every module. Full pipeline live end-to-end: diff --git a/apps/mana/apps/web/src/lib/app-registry/types.ts b/apps/mana/apps/web/src/lib/app-registry/types.ts index 3b46c0749..5290e8b73 100644 --- a/apps/mana/apps/web/src/lib/app-registry/types.ts +++ b/apps/mana/apps/web/src/lib/app-registry/types.ts @@ -59,9 +59,12 @@ export interface AppDescriptor { contextMenuActions?: AppContextMenuAction[]; // -- Help (optional) -- + // Kept in sync with ModuleHelp in help-content.ts; AppPage renders + // the tips section when present. help?: { description: string; features?: string[]; + tips?: string[]; }; } diff --git a/packages/shared-ai/src/agents/templates/event-scout.ts b/packages/shared-ai/src/agents/templates/event-scout.ts index ce0a1cbe6..019cf13f4 100644 --- a/packages/shared-ai/src/agents/templates/event-scout.ts +++ b/packages/shared-ai/src/agents/templates/event-scout.ts @@ -85,7 +85,7 @@ du entscheidest was in deinen Kalender kommt. **Voraussetzung:** Mindestens eine Region und Interessen muessen im Events-Modul unter dem Tab "Entdecken" eingerichtet sein.`, - cadence: { kind: 'daily' }, + cadence: { kind: 'daily', atHour: 8, atMinute: 0 }, startPaused: true, }, ],