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
address review (codex r2): place Daily Driver below scan quadrants to avoid top gap
[._.]/ Adam Eivyd1f2666672b1
diff --git a/client/src/components/dashboard/builtins/DailyDriverWidget.jsx b/client/src/components/dashboard/builtins/DailyDriverWidget.jsxindex 2ff0ebf7b9..ce866813e3 100644--- a/client/src/components/dashboard/builtins/DailyDriverWidget.jsx+++ b/client/src/components/dashboard/builtins/DailyDriverWidget.jsx@@ -61,6 +61,11 @@ export default function DailyDriverWidget({ dashboardState }) {if (!loaded) return null;+ // `completedToday`/`streak` come straight from getPostStats — the same source+ // the standalone DailyPostWidget uses — so the driver's POST row always agrees+ // with it. (getPostStats derives "today" from the server's UTC day, a+ // subsystem-wide property of meatspacePost, not this widget; a timezone-aware+ // POST day boundary is a separate POST-service change, out of scope here.)const completedToday = !!post?.completedToday;const streak = post?.currentStreak ?? 0;diff --git a/scripts/migrations/191-seed-daily-driver-widget.js b/scripts/migrations/191-seed-daily-driver-widget.jsindex 14e48b6035..090bf43f5f 100644--- a/scripts/migrations/191-seed-daily-driver-widget.js+++ b/scripts/migrations/191-seed-daily-driver-widget.js@@ -12,12 +12,11 @@* are not touched. Re-runs detect the widget is already present and skip.* Mirrors migration 145.*- * The DEFAULT_LAYOUTS geometry pins daily-driver full-width at the top and- * shifts the other Morning Review widgets down — but an existing persisted- * layout still has those widgets at their old (top) positions, so the preferred- * top slot collides. Per the migration-145 convention we do NOT rewrite the- * user's existing positions; instead the collision fallback appends- * daily-driver on a fresh row below everything (still present, still gated).+ * The DEFAULT_LAYOUTS geometry places daily-driver full-width in a fresh row+ * BELOW the Morning Review scan quadrants (so a gated-off slot leaves only+ * trailing space, never a gap at the top). This migration mirrors that: it+ * appends daily-driver on a fresh row below everything already in the persisted+ * grid, never rewriting the user's existing positions (migration-145 convention).*/import { readLayoutsDoc, writeLayoutsDoc } from './_lib.js';@@ -27,40 +26,18 @@ const WIDGET_W = 12;const WIDGET_H = 6;// Mirror of the geometry in `server/services/dashboardLayouts.js`-// DEFAULT_LAYOUTS `morning-review` layout — edits here must match that file or-// fresh installs + migrated installs diverge.-const PREFERRED_SLOTS = {- 'morning-review': { x: 0, y: 0, w: WIDGET_W, h: WIDGET_H },-};-const TARGET_LAYOUT_IDS = Object.keys(PREFERRED_SLOTS);--function rectsOverlap(a, b) {- return a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h && b.y < a.y + a.h;-}+// DEFAULT_LAYOUTS `morning-review` layout — daily-driver sits full-width in a+// fresh row BELOW the scan quadrants. Edits here must match that file or fresh+// installs + migrated installs diverge.+const TARGET_LAYOUT_IDS = ['morning-review'];-function collidesWith(grid, candidate) {- for (const item of grid) {- if (rectsOverlap(item, candidate)) return true;- }- return false;-}--function pickGridEntry(grid, layoutId) {- const preferred = PREFERRED_SLOTS[layoutId];- if (preferred) {- const candidate = { id: WIDGET_ID, x: preferred.x, y: preferred.y, w: preferred.w, h: preferred.h };- if (!collidesWith(grid, candidate)) return candidate;- }- // Fall back to a clean row below everything else if the preferred slot is- // occupied (an existing persisted layout keeps its old widget positions).+// Always append daily-driver on a fresh row below everything already in the+// grid (never at the top). A gated-off widget's slot is dropped without+// compacting the rows above it, so a bottom slot means the driver's absence+// leaves only harmless trailing space — matching the DEFAULT_LAYOUTS placement.+function pickGridEntry(grid) {const bottom = grid.reduce((max, it) => Math.max(max, (it.y ?? 0) + (it.h ?? 0)), 0);- return {- id: WIDGET_ID,- x: 0,- y: bottom,- w: preferred?.w ?? WIDGET_W,- h: preferred?.h ?? WIDGET_H,- };+ return { id: WIDGET_ID, x: 0, y: bottom, w: WIDGET_W, h: WIDGET_H };}function applyToLayout(layout) {@@ -80,7 +57,7 @@ function applyToLayout(layout) {const existingGrid = Array.isArray(layout.grid) ? layout.grid : [];const hasGridEntry = existingGrid.some((it) => it?.id === WIDGET_ID);if (!hasGridEntry) {- layout.grid = [...existingGrid, pickGridEntry(existingGrid, layout.id)];+ layout.grid = [...existingGrid, pickGridEntry(existingGrid)];changed = true;} else if (!Array.isArray(layout.grid)) {layout.grid = existingGrid;diff --git a/scripts/migrations/191-seed-daily-driver-widget.test.js b/scripts/migrations/191-seed-daily-driver-widget.test.jsindex c2ec689ebd..308feceaf4 100644--- a/scripts/migrations/191-seed-daily-driver-widget.test.js+++ b/scripts/migrations/191-seed-daily-driver-widget.test.js@@ -29,7 +29,7 @@ describe('migration 191 — seed daily-driver widget into the morning-review layexpect(existsSync(layoutsPath)).toBe(false);});- it('inserts daily-driver at the top when the preferred slot is free', async () => {+ it('appends daily-driver full-width in a fresh row below existing content', async () => {writeJson(layoutsPath, {activeLayoutId: 'default',layouts: [@@ -41,7 +41,8 @@ describe('migration 191 — seed daily-driver widget into the morning-review layconst after = readJson(layoutsPath);const layout = after.layouts.find((l) => l.id === 'morning-review');expect(layout.widgets).toContain('daily-driver');- expect(layout.grid.find((g) => g.id === 'daily-driver')).toEqual({ id: 'daily-driver', x: 0, y: 0, w: 12, h: 6 });+ // Below the existing review-hub (y:8 h:4 → bottom 12).+ expect(layout.grid.find((g) => g.id === 'daily-driver')).toEqual({ id: 'daily-driver', x: 0, y: 12, w: 12, h: 6 });});it('appends below existing items when the preferred top slot is occupied', async () => {diff --git a/server/services/dashboardLayouts.js b/server/services/dashboardLayouts.jsindex 638bfea16e..895f750773 100644--- a/server/services/dashboardLayouts.js+++ b/server/services/dashboardLayouts.js@@ -149,20 +149,23 @@ const DEFAULT_LAYOUTS = [id: 'morning-review',name: 'Morning Review',builtIn: true,- widgets: ['daily-driver', 'proactive-alerts', 'upcoming-tasks', 'review-hub', 'goal-progress', 'death-clock'],- // Scan-and-act morning ritual. The Daily Driver (#2666) is pinned full-width- // at the very top — the first-visit-of-day sequence (POST → goal- // next-actions) — and self-hides once handled, collapsing the layout back to- // the classic scan quadrants below it. Tasks list takes the tall center- // column (the actionable hot zone); alerts top-left grab attention first;- // death-clock top-right for mortality framing; review + goals fill the rest.+ widgets: ['proactive-alerts', 'upcoming-tasks', 'review-hub', 'goal-progress', 'death-clock', 'daily-driver'],+ // Scan-and-act morning ritual — the classic scan quadrants above the fold.+ // Tasks list takes the tall center column (the actionable hot zone); alerts+ // top-left grab attention first; death-clock top-right for mortality framing;+ // review + goals fill the remaining quadrants. The Daily Driver (#2666) — the+ // first-visit-of-day sequence (POST → goal next-actions) — sits full-width in+ // a fresh row BELOW the scan quadrants: it self-hides once handled, and a+ // gated-off widget's grid slot is dropped without compacting the rows above+ // it, so placing it last (like the gated tribe-care/feeds widgets) means its+ // absence leaves only harmless trailing space instead of a gap at the top.grid: [- { id: 'daily-driver', x: 0, y: 0, w: 12, h: 6 },- { id: 'proactive-alerts', x: 0, y: 6, w: 4, h: 4 },- { id: 'upcoming-tasks', x: 4, y: 6, w: 5, h: 8 },- { id: 'death-clock', x: 9, y: 6, w: 3, h: 2 },- { id: 'goal-progress', x: 9, y: 8, w: 3, h: 4 },- { id: 'review-hub', x: 0, y: 10, w: 4, h: 4 },+ { id: 'proactive-alerts', x: 0, y: 0, w: 4, h: 4 },+ { id: 'upcoming-tasks', x: 4, y: 0, w: 5, h: 8 },+ { id: 'death-clock', x: 9, y: 0, w: 3, h: 2 },+ { id: 'goal-progress', x: 9, y: 2, w: 3, h: 4 },+ { id: 'review-hub', x: 0, y: 4, w: 4, h: 4 },+ { id: 'daily-driver', x: 0, y: 8, w: 12, h: 6 },],},{