diff --git a/apps/mana/apps/web/src/lib/components/page-carousel/PageCarousel.svelte b/apps/mana/apps/web/src/lib/components/page-carousel/PageCarousel.svelte index 8a919624b..5a399829a 100644 --- a/apps/mana/apps/web/src/lib/components/page-carousel/PageCarousel.svelte +++ b/apps/mana/apps/web/src/lib/components/page-carousel/PageCarousel.svelte @@ -119,9 +119,7 @@ {:else} {/if} @@ -179,11 +177,12 @@ align-items: center; } /* Sized stand-in for a not-yet-mounted card. Matches the card's - widthPx/heightPx so scroll position and the surrounding flex - layout stay stable while the IntersectionObserver decides which - cards to mount. Falls back to 60vh height when heightPx is - absent (the same minimum the empty state uses), which keeps the - track from collapsing on initial paint. */ + widthPx so scroll position and the surrounding flex layout stay + stable while the IntersectionObserver decides which cards to + mount. Height falls back to 60vh (the same minimum the empty + state uses), which keeps the track from collapsing on initial + paint. Card bodies scroll internally — per-card heights were + dropped in favour of a single viewport-height policy. */ .page-placeholder { min-height: 60vh; border-radius: 1.25rem; diff --git a/apps/mana/apps/web/src/lib/components/page-carousel/types.ts b/apps/mana/apps/web/src/lib/components/page-carousel/types.ts index 69b9cf039..868f9e73a 100644 --- a/apps/mana/apps/web/src/lib/components/page-carousel/types.ts +++ b/apps/mana/apps/web/src/lib/components/page-carousel/types.ts @@ -4,7 +4,6 @@ export interface CarouselPage { id: string; maximized?: boolean; widthPx: number; - heightPx?: number; title: string; color: string; icon?: Component; diff --git a/apps/mana/apps/web/src/lib/components/workbench/AppPage.svelte b/apps/mana/apps/web/src/lib/components/workbench/AppPage.svelte index 90cbf3181..eb34a9a5b 100644 --- a/apps/mana/apps/web/src/lib/components/workbench/AppPage.svelte +++ b/apps/mana/apps/web/src/lib/components/workbench/AppPage.svelte @@ -15,11 +15,10 @@ interface Props { appId: string; widthPx: number; - heightPx?: number; maximized?: boolean; onClose: () => void; onMaximize?: () => void; - onResize?: (widthPx: number, heightPx?: number) => void; + onResize?: (widthPx: number) => void; onMoveLeft?: () => void; onMoveRight?: () => void; onContextMenu?: (e: MouseEvent) => void; @@ -28,7 +27,6 @@ let { appId, widthPx, - heightPx, maximized = false, onClose, onMaximize, @@ -296,7 +294,6 @@ - apps.map((a) => - a.appId === appId ? { ...a, widthPx, ...(heightPx !== undefined ? { heightPx } : {}) } : a - ) - ); + async resizeApp(appId: string, widthPx: number) { + await patchActiveScene((apps) => apps.map((a) => (a.appId === appId ? { ...a, widthPx } : a))); }, async moveAppLeft(appId: string) { diff --git a/apps/mana/apps/web/src/lib/types/workbench-scenes.ts b/apps/mana/apps/web/src/lib/types/workbench-scenes.ts index 564c4d021..04aaf7d44 100644 --- a/apps/mana/apps/web/src/lib/types/workbench-scenes.ts +++ b/apps/mana/apps/web/src/lib/types/workbench-scenes.ts @@ -17,8 +17,8 @@ import type { WallpaperConfig } from '@mana/shared-theme'; export interface WorkbenchSceneApp { appId: string; maximized?: boolean; + /** Width preset in pixels. See PAGE_WIDTH_PRESETS for allowed values. */ widthPx?: number; - heightPx?: number; } /** A user-defined named layout of the workbench. */ diff --git a/apps/mana/apps/web/src/routes/(app)/+page.svelte b/apps/mana/apps/web/src/routes/(app)/+page.svelte index a7e82b0f0..aec8d127b 100644 --- a/apps/mana/apps/web/src/routes/(app)/+page.svelte +++ b/apps/mana/apps/web/src/routes/(app)/+page.svelte @@ -106,7 +106,6 @@ id: a.appId, maximized: a.maximized, widthPx: a.widthPx ?? DEFAULT_WIDTH, - heightPx: a.heightPx, title: appTitles.get(a.appId) ?? a.appId, color: entry?.color ?? '#6B7280', icon: entry?.icon, @@ -192,8 +191,8 @@ function handleMaximizeApp(id: string) { workbenchScenesStore.toggleMaximizeApp(id); } - function handleResize(id: string, widthPx: number, heightPx?: number) { - workbenchScenesStore.resizeApp(id, widthPx, heightPx); + function handleResize(id: string, widthPx: number) { + workbenchScenesStore.resizeApp(id, widthPx); } function handleMoveLeft(id: string) { workbenchScenesStore.moveAppLeft(id); @@ -329,11 +328,10 @@ handleRemoveApp(p.id)} onMaximize={() => handleMaximizeApp(p.id)} - onResize={(w, h) => handleResize(p.id, w, h)} + onResize={(w) => handleResize(p.id, w)} onMoveLeft={idx > 0 ? () => handleMoveLeft(p.id) : undefined} onMoveRight={idx < openApps.length - 1 ? () => handleMoveRight(p.id) : undefined} onContextMenu={(e) => handleCardContextMenu(e, p.id, idx)}