From 13b785b33f94dcccf82102f8091a36e3b2f9df39 Mon Sep 17 00:00:00 2001 From: Till JS Date: Thu, 23 Apr 2026 00:36:54 +0200 Subject: [PATCH] refactor(shell): unify card + route chrome into ModuleShell + RoutePage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the old PageShell (workbench-only) with a single ModuleShell that serves both carousel cards (variant=card, width-sized, window actions) and sub-routes (variant=fill, fills main area, optional back button). RoutePage wraps ModuleShell with auto-metadata lookup from the app-registry so every (app)/*/+page.svelte can stay a three-liner. Drops the dead onMinimize prop-drilling that was declared on PageShell but never rendered — TodoPage/ContactPage callers cleaned up too. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../web/src/lib/app-registry/help-content.ts | 4 +- .../src/lib/components/page-carousel/index.ts | 1 - .../ModuleShell.svelte} | 246 ++++++++++++------ .../src/lib/components/shell/RoutePage.svelte | 59 +++++ .../web/src/lib/components/shell/index.ts | 2 + .../lib/components/workbench/AppPage.svelte | 12 +- .../lib/modules/ai-missions/ListView.svelte | 2 +- .../modules/articles/ArticlesTabShell.svelte | 2 +- .../components/pages/ContactPage.svelte | 9 +- .../todo/components/pages/TodoPage.svelte | 7 +- .../apps/web/src/routes/(app)/+layout.svelte | 2 +- 11 files changed, 245 insertions(+), 101 deletions(-) rename apps/mana/apps/web/src/lib/components/{page-carousel/PageShell.svelte => shell/ModuleShell.svelte} (63%) create mode 100644 apps/mana/apps/web/src/lib/components/shell/RoutePage.svelte create mode 100644 apps/mana/apps/web/src/lib/components/shell/index.ts diff --git a/apps/mana/apps/web/src/lib/app-registry/help-content.ts b/apps/mana/apps/web/src/lib/app-registry/help-content.ts index 2a344fd0e..69595588b 100644 --- a/apps/mana/apps/web/src/lib/app-registry/help-content.ts +++ b/apps/mana/apps/web/src/lib/app-registry/help-content.ts @@ -1,8 +1,8 @@ /** * Per-module help content — description, features, tips. * - * Rendered inline in the page-body when the user clicks the help (?) - * icon in the PageShell header. Keyed by appId. + * Rendered inline in the shell body when the user clicks the help (?) + * icon in the ModuleShell header. Keyed by appId. */ export interface ModuleHelp { diff --git a/apps/mana/apps/web/src/lib/components/page-carousel/index.ts b/apps/mana/apps/web/src/lib/components/page-carousel/index.ts index 03ff2b07c..87c80be5f 100644 --- a/apps/mana/apps/web/src/lib/components/page-carousel/index.ts +++ b/apps/mana/apps/web/src/lib/components/page-carousel/index.ts @@ -1,4 +1,3 @@ -export { default as PageShell } from './PageShell.svelte'; export { default as PageCarousel } from './PageCarousel.svelte'; export type { CarouselPage } from './types'; diff --git a/apps/mana/apps/web/src/lib/components/page-carousel/PageShell.svelte b/apps/mana/apps/web/src/lib/components/shell/ModuleShell.svelte similarity index 63% rename from apps/mana/apps/web/src/lib/components/page-carousel/PageShell.svelte rename to apps/mana/apps/web/src/lib/components/shell/ModuleShell.svelte index 7325c78b4..958a3a426 100644 --- a/apps/mana/apps/web/src/lib/components/page-carousel/PageShell.svelte +++ b/apps/mana/apps/web/src/lib/components/shell/ModuleShell.svelte @@ -1,7 +1,23 @@ -
- -