Files
stack/apps/web/src/components/widgets/defaultLayout.ts
Jason Woltje cc56f2cbe1
All checks were successful
ci/woodpecker/push/web Pipeline was successful
feat(web): migrate dashboard to WidgetGrid with layout persistence (#497)
Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
2026-02-24 00:50:24 +00:00

26 lines
1.1 KiB
TypeScript

/**
* Default dashboard layout — used when a user has no saved layout.
*
* Widget ID format: "WidgetType-default" where the prefix before the
* first "-" must match a key in WidgetRegistry.
*
* Grid: 12 columns, 100px row height.
*/
import type { WidgetPlacement } from "@mosaic/shared";
export const DEFAULT_LAYOUT: WidgetPlacement[] = [
// Row 0 — top row (3 widgets, 4 cols each)
{ i: "TasksWidget-default", x: 0, y: 0, w: 4, h: 2, minW: 1, minH: 2, maxW: 4 },
{ i: "CalendarWidget-default", x: 4, y: 0, w: 4, h: 2, minW: 2, minH: 2, maxW: 4 },
{ i: "AgentStatusWidget-default", x: 8, y: 0, w: 4, h: 2, minW: 1, minH: 2, maxW: 3 },
// Row 2 — middle row
{ i: "ActiveProjectsWidget-default", x: 0, y: 2, w: 4, h: 3, minW: 2, minH: 2, maxW: 4 },
{ i: "TaskProgressWidget-default", x: 4, y: 2, w: 4, h: 2, minW: 1, minH: 2, maxW: 3 },
{ i: "OrchestratorEventsWidget-default", x: 8, y: 2, w: 4, h: 2, minW: 1, minH: 2, maxW: 4 },
// Row 4 — bottom
{ i: "QuickCaptureWidget-default", x: 4, y: 4, w: 4, h: 1, minW: 2, minH: 1, maxW: 4, maxH: 2 },
];