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([dedupe-hhmm-time-window-helpers]): remove from PLAN.md and log to changelog

Adam Eivyc29c6a7071e7
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index d5c292b888..e2e4e2d39f 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -12,6 +12,7 @@
- **Universes list/table index — CRUD all universes at a glance.** New `client/src/pages/Universes.jsx` lists every universe in a table (desktop) / card stack (mobile) with canon-entity count, linked-series count, last-updated, and per-row Share / Sync-to-peer / two-click delete (optimistic remove + rollback, no `window.confirm`) — mirroring the Series Pipeline index. Series counts come from a client-side join against `listPipelineSeries()` (reverse of the join `Pipeline.jsx` already does); canon counts sum the `characters`/`places`/`objects` trunks. The PipelineSeries "Open" link beside the Linked-Universe picker now opens the actually-linked universe instead of a blank builder.
## Changed
+- **[dedupe-hhmm-time-window-helpers] Shared time-of-day helpers.** Voice quiet-hours and time-windowed dashboard layouts now share one implementation for parsing HH:MM times and deciding whether the current time falls inside a window, so the two can't quietly drift apart.
- **Universe page route renamed `/universe-builder` → `/universes`.** `/universes` is now the list/table index; the editor lives at `/universes/:universeId`, and `/universes/new` is the create-mode entry point (the `UniverseBuilder` editor treats the `new` sentinel as no-id → blank draft; real ids are UUIDs so no collision). The "Universe" sidebar entry is relabeled "Universes" and points at the index; the editor header gains a "← All Universes" back link. Legacy `/universe-builder*` (and the older `/media/universe-builder*`) paths redirect to `/universes*` preserving search + `#canon`, so existing bookmarks and in-app deep-links keep working. The `/api/universe-builder/*` backend endpoints are unchanged. `useUniverseNav`'s exported `universeBuilderBasePath` is renamed `universesBasePath`; the nav-manifest entry + voice/`⌘K` aliases follow the new path.
- **Bumped the bundled `lib/slashdo` submodule v2.18.0 → v3.1.0.** v3.1.0's `/do:pr` / `/do:release` accept an ordered, comma-separated `--review-with` list plus `--review-stop-on-*` and `--reviewer-applies` flags — the slashdo capability this release wires into the task forms. Added `.claude/commands/do/` symlinks for the new `depfree` / `pr-better` / `scan` commands so the in-repo project slash-command set matches the vendored submodule.
- `data.sample/` renamed to `data.reference/` to reflect its actual role: the canonical reference / seed source consumed by `scripts/setup-data.js` (and by migrations that look up the post-migration shipped version of a file). The old name implied "optional samples"; the new name conveys "this is what `./data/` is bootstrapped from and compared against." All code, tests, and active docs (CLAUDE.md, README, docs/) updated; historical `.changelog/v*.md` entries kept as-is since they describe past releases. The `DATA_SAMPLE_DIR` constant in `server/index.js` is now `DATA_REFERENCE_DIR`; `sampleDir` in `setup-data.js` is now `referenceDir`.
diff --git a/PLAN.md b/PLAN.md
index 6aabe30450..01e3f626e3 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -6,7 +6,6 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changel
- [ ] [extract-compare-helpers-once-eight-callers] **Extract `equalByKeys` / `equalListByKeys` once `useAutoRefetch`'s `compare` reaches ~8 widget callers.** With the dashboard rollout (PR #421) there are now 5 widget callers (Backup, Chief of Staff, Decision Log, Goal Progress, Proactive Alerts) on top of EpisodeVideoStage / Brain / Digital Twin from PR #425, using two emerging shapes — (a) scalar-object key equality (BackupWidget status, DecisionLogWidget last24Hours, ProactiveAlertsWidget counts) and (b) array equality by length + per-item key tuple (BackupWidget snapshots, GoalProgressWidget goals, ProactiveAlertsWidget alerts list, DecisionLogWidget impactfulDecisions). Inline forms are noisy but each has an explanatory comment that an `equalByKeys(prev, next, ['status', 'lastRun', …])` would lose. Defer until enough more callers appear that the abstraction pays for itself, then add helpers to `client/src/lib/compareHelpers.js` (register in `index.js` + `README.md`) and migrate the flat callers — leave CosDashboardWidget's nested-optional-chain shape inline. Surfaced by /simplify reuse review during `[useautorefetch-compare-caller-rollout-widgets]` claim 2026-05-21.
- [ ] [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.