Skip to content

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

docs([codex5-dashboard-intent-layouts]): log deferred revert-target fix from codex iter-4 review

[._.]/ Adam Eivyc801ec6b22da
diff --git a/PLAN.md b/PLAN.md
index 928b3617da..dde0027920 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -11,6 +11,7 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changel
- [ ] [agents-tab-cooldown-tick-extraction] **Extract a shared cooldown-tick hook for the agents tabs.** `agents/{OverviewTab,ToolsTab,WorldTab}.jsx` each spin a 1s `setInterval` that both (a) ticks `setTick(t => t + 1)` so countdown labels update and (b) conditionally refetches rate limits when every cooldown has expired. Not a fit for `useAutoRefetch` (the tick is primarily UI-driven, the refetch is incidental). Extract `useCooldownTick({ cooldownEnds, onAllExpired })` so all three callers share one tested implementation. Surfaced while migrating sibling pollers in `[codex5-polling-consolidation]`.
- [ ] [codex5-onboarding-capability-map] **[P2][ONBOARDING]** Capability map of connected systems. One page showing each integration's status: Providers (per-provider configured/available/throttled), Calendar, Brain/memory embeddings, Voice (mic + TTS), Tailscale + HTTPS, Genome/health imports, Telegram/messages, App registry/PM2. Each row links to the relevant settings page. Doubles as a setup checklist and a runtime health overview.
- [ ] [dedupe-hhmm-time-window-helpers] **Dedupe HH:MM time-window helpers across server.** `server/services/voice/proactiveSpeech.js` exports `HHMM_RE` + `parseHHMM` + `isWithinQuietHours` (lines 26–57). `server/services/dashboardLayouts.js#sanitizeActivateWindow` + the inlined `isInTimeWindow` logic (post `[codex5-dashboard-intent-layouts]`) duplicate the same predicate (~25 LOC). Lift the three primitives to `server/lib/timezone.js` (where `getLocalParts` already lives) and have both `proactiveSpeech.js` and `dashboardLayouts.js` import from there. The dashboard route's Zod schema (`TIME_STRING_RE`) can keep aliasing the shared regex. Also evaluate whether `client/src/utils/timeWindow.js` (intentional client mirror) needs a parity test against the server primitive — surfaced by /simplify reuse review during `[codex5-dashboard-intent-layouts]` claim 2026-05-20.
+- [ ] [dashboard-active-layout-revert-tracks-server-confirmed-id] **Active-layout revert should fall back to the last server-confirmed id, not `previousId`.** In `Dashboard.jsx#selectLayout`, two consecutive failed `setActiveDashboardLayout` PUTs revert each to their respective `previousId` snapshot — but `previousId` of the second call may be the optimistic-but-uncommitted id of the first call. So after two consecutive failures the UI snaps to a layout that never landed at the server. Mitigated in practice by single-user Tailscale deployment + write-tail serialization making double-failures rare, but worth a fix: track the last server-confirmed active id (from GET or successful PUT) and revert to that, or refetch on failure. Surfaced by codex iter-4 review during `[codex5-dashboard-intent-layouts]` claim.
- [ ] [extract-layout-doc-io-helper-from-migrations] **Extract `readLayoutsDoc` / `writeLayoutsDoc` helper for migrations.** Migrations 029 and 030 both repeat the same `readFile → JSON.parse → Array.isArray(doc.layouts) guard → writeFile` shell with near-identical logging strings. `scripts/migrations/_lib.js` already exists as the shared library for prompt-replace migrations — add a layouts-doc helper there so a future migration that touches `data/dashboard-layouts.json` doesn't fork the pattern a third time. Surfaced by /simplify quality review during `[codex5-dashboard-intent-layouts]` claim 2026-05-20.
- [ ] [migrate-two-remaining-local-formatters] **Migrate two remaining local formatters surfaced during the module-discovery PR.** Two additional local format definitions were found that aren't in the original tracker: (1) `client/src/components/calendar/EventDetail.jsx:10` defines `formatDateTime(dateStr, isAllDay)` with an all-day branch the shared `formatDateTime` lacks — extend the shared helper to take `{ allDay: true }` or keep this local and rename to `formatEventDateTime`. (2) `client/src/components/cos/tabs/TaskItem.jsx:78` defines `formatDurationMin(mins)` with a `~` approximation prefix (`~3h 30m`) — extend shared `formatDurationMin` with an `{ approximate: true }` option. Low priority; visual semantics need to be preserved exactly.
- [ ] [wire-proactive-cos-speech-to-real-triggers] **Wire proactive CoS speech to real triggers.** Plumbing landed (`POST /api/voice/speak` + `voice:speak` socket event); hook to high-severity `errorEvents`, `task:ready`, and `notificationEvents` with per-source rate-limits.