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
test: correct await-count wording in UpdateTab flake-fix comments (#2065)
Adam Eivy84df5c218687
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex be72d50f60..ddf9d10e64 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -30,7 +30,7 @@## Internal-- Deflaked the `UpdateTab reconcile flow` tests, which intermittently failed CI with "Unable to find role=button and name 'Restarting...'" (#2065). The component mirrors `updating` into `updatingRef` via a passive effect, and the disconnect handler's guard reads that ref synchronously; since `runUpdate()` calls `setUpdating(true)` outside any `act` (after two awaits), the "Reconciling..." button could commit — satisfying the test's `waitFor` — a scheduler tick before the ref-sync effect ran, leaving the ref stale-false when `disconnect` fired so the confirmation timer never armed. The test now flushes pending effects (`await act(async () => {})`) before firing `disconnect`, syncing the ref to the state production always reaches over real network time. Test-only change; no product behavior touched.+- Deflaked the `UpdateTab reconcile flow` tests, which intermittently failed CI with "Unable to find role=button and name 'Restarting...'" (#2065). The component mirrors `updating` into `updatingRef` via a passive effect, and the disconnect handler's guard reads that ref synchronously; since `runUpdate()` calls `setUpdating(true)` outside any `act` (after awaiting the pre-update health check), the "Reconciling..." button could commit — satisfying the test's `waitFor` — a scheduler tick before the ref-sync effect ran, leaving the ref stale-false when `disconnect` fired so the confirmation timer never armed. The test now flushes pending effects (`await act(async () => {})`) before firing `disconnect`, syncing the ref to the state production always reaches over real network time. Test-only change; no product behavior touched.- Consolidated five component-local duration/uptime/time-until formatters onto the shared `utils/formatters.js` helpers (`formatDurationMs`, `timeUntil`), per the "do not re-define formatters inside components" convention (#2028). `formatDurationMs` gained a day bucket (`2d 3h`) so long uptimes no longer render as an unbounded hours count; ProcessesTab, CityHud, Shell session ages, the CoS QuickSummary "next job" countdown, and the Loops interval label now all route through the shared helpers, and a `console.log` in `memoryClassifier.js` was collapsed to a single interpolated line.- Migration 155 heals `data/prompts/stages/cd-treatment.md` installs that #1808's anchor-based migration 148 left stranded (#2042). Installs seeded before the `imageStrength` scene knob (older pre-#1808 template) got the `## Cast & ingredients` list but missed the per-scene `"cast": [{ "ingredientId": … }]` field, so the Creative Director cast-threading regression test stayed red on the runtime template and migration 148 (already applied) never re-ran. The new hash-driven prompt-replace upgrades those copies (and both pristine pre-#1808 shipped versions) to the current shipped reference, leaving hand-customized copies untouched. Also folds `cd-treatment.md` into `buildPromptDriftTables` so setup-data.js's drift warning classifies a stranded copy correctly.- Replaced the last hardcoded `port-*` hex stragglers with design tokens (#2031). The Security page's audio-level meter used raw `#ef4444`/`#f59e0b`/`#22c55e` in an inline `backgroundColor`; these now resolve through `rgb(var(--port-error))`/`--port-warning`/`--port-success` so they track the theme. The Chief-of-Staff page's "CoS" wordmark gradient was duplicated inline three times and is now a single module-level `COS_TITLE_GRADIENT` constant. Visual output is unchanged.diff --git a/client/src/components/apps/tabs/UpdateTab.test.jsx b/client/src/components/apps/tabs/UpdateTab.test.jsxindex cbe6a161dd..545a75ecb7 100644--- a/client/src/components/apps/tabs/UpdateTab.test.jsx+++ b/client/src/components/apps/tabs/UpdateTab.test.jsx@@ -43,9 +43,10 @@ const fireDisconnectAndConfirm = async () => {// `updatingRef` via a separate effect (`useEffect(() => { updatingRef.current// = updating }, [updating])`), and handleDisconnect's guard reads that ref// synchronously. runUpdate() calls setUpdating(true) outside any act (after- // two awaits), so the "Reconciling..." button — driven directly by the- // `updating` state — can commit to the DOM (and satisfy the caller's waitFor)- // a scheduler tick before the ref-sync effect runs. Without this flush the+ // awaiting the pre-update health check), so the "Reconciling..." button —+ // driven directly by the `updating` state — can commit to the DOM (and+ // satisfy the caller's waitFor) a scheduler tick before the ref-sync effect+ // runs. Without this flush the// ref can still be stale-false when we fire 'disconnect', the confirmation// timer never arms, and "Restarting..." never appears: the intermittent CI// failure (#2065). Draining effects here syncs the ref to the state