Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
align CoS widget header with the other converted widgets, and note that @container contains fixed descendants
[._.]/ Adam Eivy2906c2274862
diff --git a/client/src/components/CosDashboardWidget.jsx b/client/src/components/CosDashboardWidget.jsxindex 67d23f6aaf..35618106f1 100644--- a/client/src/components/CosDashboardWidget.jsx+++ b/client/src/components/CosDashboardWidget.jsx@@ -165,13 +165,13 @@ const CosDashboardWidget = memo(function CosDashboardWidget() {return (<div className="@container bg-port-card border border-port-border rounded-xl p-4 @md:p-6">{/* Header */}- <div className="flex items-center justify-between mb-4">- <div className="flex items-center gap-3">- <div className="text-2xl" aria-hidden="true">+ <div className="flex items-center justify-between gap-2 mb-4">+ <div className="flex min-w-0 items-center gap-3">+ <div className="shrink-0 text-2xl" aria-hidden="true"><Bot className={`w-6 h-6 ${status.running ? 'text-port-success' : 'text-gray-500'}`} /></div>- <div>- <h3 className="text-lg font-semibold text-white">Chief of Staff</h3>+ <div className="min-w-0">+ <h3 className="text-base @sm:text-lg font-semibold leading-tight text-white">Chief of Staff</h3><p className="text-sm text-gray-500">{status.running? status.paused ? 'Paused' : 'Active'@@ -186,7 +186,7 @@ const CosDashboardWidget = memo(function CosDashboardWidget() {</div><Linkto="/cos/tasks"- className="flex items-center gap-1 text-sm text-port-accent hover:text-port-accent/80 transition-colors min-h-[40px] px-2"+ className="flex shrink-0 items-center gap-1 text-sm text-port-accent hover:text-port-accent/80 transition-colors min-h-[40px] px-2"><span className="hidden @xs:inline">View Details</span><ChevronRight size={16} />diff --git a/client/src/components/dashboard/AGENTS.md b/client/src/components/dashboard/AGENTS.mdindex 47e3a4d189..b4e8c4893f 100644--- a/client/src/components/dashboard/AGENTS.md+++ b/client/src/components/dashboard/AGENTS.md@@ -16,7 +16,7 @@ On drop, `onDragEnd` re-flows the whole grid through `reflowToOrder` so its read**One source of truth for the mobile/desktop seam.** `DashboardGrid` measures its own *container* (`useContainerWidth`), which page padding makes narrower than the viewport — so a Tailwind `sm:` breakpoint disagrees with it in a ~30px band. Anything outside the grid that needs to know which affordance is live (the Dashboard's edit-mode hint) reads it from the `onLayoutModeChange` callback, never from a CSS breakpoint.-**A widget lays out by CONTAINER query, never by viewport breakpoint.** A tile is ~250px wide on a 2560px screen, so every viewport `sm:`/`md:`/`lg:` inside it is unconditionally true and pins the widest layout into the narrowest column. This bites hardest when a component built for a full-width page is reused as a widget — `TaskAddForm` (via `QuickTaskWidget`) kept its wide row and squeezed the description textarea to one character per line. Put `@container` on the **component's own root**, not on the grid cell, and prefix its layout classes `@sm:`/`@md:`/`@lg:`: the same component also renders in drawers, settings panels and full-width pages that provide no container ancestor, where a cell-level container would leave every `@` variant permanently unmatched. Viewport breakpoints remain correct for hover-vs-touch affordances (`md:opacity-0 md:group-hover:opacity-100`), which really are about the device, not the box — but a widget that needs one has to say so in the allowlist, because **`client/src/dashboardWidgetContainerConventions.test.js` fails on any bare `sm:`/`md:`/`lg:`/`xl:`/`2xl:` variant in a component `widgetRegistry.jsx` lazy-imports.** It scans the registry's own modules, not their whole import closure: a shared primitive that also renders on a real page has a viewport of its own to answer to.+**A widget lays out by CONTAINER query, never by viewport breakpoint.** A tile is ~250px wide on a 2560px screen, so every viewport `sm:`/`md:`/`lg:` inside it is unconditionally true and pins the widest layout into the narrowest column. This bites hardest when a component built for a full-width page is reused as a widget — `TaskAddForm` (via `QuickTaskWidget`) kept its wide row and squeezed the description textarea to one character per line. Put `@container` on the **component's own root**, not on the grid cell, and prefix its layout classes `@sm:`/`@md:`/`@lg:`: the same component also renders in drawers, settings panels and full-width pages that provide no container ancestor, where a cell-level container would leave every `@` variant permanently unmatched. Viewport breakpoints remain correct for hover-vs-touch affordances (`md:opacity-0 md:group-hover:opacity-100`), which really are about the device, not the box — but a widget that needs one has to say so in the allowlist, because **`client/src/dashboardWidgetContainerConventions.test.js` fails on any bare `sm:`/`md:`/`lg:`/`xl:`/`2xl:` variant in a component `widgetRegistry.jsx` lazy-imports.** It scans the registry's own modules, not their whole import closure: a shared primitive that also renders on a real page has a viewport of its own to answer to. **`@container` also brings `contain: layout style inline-size`**, which makes the element a containing block for `position: fixed` descendants — the same trap the `Drawer` convention documents. A widget that draws a fixed overlay from inside itself has to portal it to `<body>` (`Modal`'s `usePortal`), or it will be sized and clipped to the cell.**Widget order lives in the grid.** `saveGridEdit` rewrites the layout's `widgets` array into `readingOrderIds(grid)` so LayoutEditor lists widgets in the order the dashboard actually shows them. By default `reconcileGrid` iterates the *grid* and uses `widgets` only for membership — position edits survive a widget toggle or a rename. LayoutEditor's Move up/down buttons therefore have to say so explicitly: `save`/`commitDuplicate` pass `reordered`, which `isReordered()` derives by comparing the draft list against the `unmovedOrder` ref — the order the draft would have had if the user had never pressed Move (`add` appends to it, `remove` filters it, `move` deliberately doesn't touch it). That baseline can't be reconstructed from the widget list after the fact, since nothing in it records which widgets were added this session or in what order; keeping it means a move-up-then-back nets out to `false` while a just-added widget being moved, or any reorder in a layout that started empty, still reads as `true`, and `Dashboard.jsx` forwards it as `reconcileGrid(base, widgets, { reorder })`, which re-flows the reconciled grid to the list order. **Never infer that flag by comparing `widgets` to `readingOrderIds(grid)`** — layouts arranged before `saveGridEdit` started syncing the two can already disagree, so inferring would re-pack a carefully arranged desktop layout on the first unrelated save (#4132).