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

address release review: silent polled fetches, autoClean doc drift, claude-code default timeout

[._.]/ Adam Eivyd536ebd147bc
diff --git a/PLAN.md b/PLAN.md
index a4d1cebb70..592b443986 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -6,6 +6,7 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changel
- [ ] [ai-fallback-coalesce-concurrent-failures] **Coalesce concurrent AI provider failures so N simultaneous calls don't all re-read `providers.json` and re-mark the same provider.** Surfaced by /simplify efficiency review during the ai-fallback PR (2026-05-22). When a stuck provider has N simultaneous in-flight calls, each failure independently runs `pickFallbackProvider` → `getAllProviders()` → `loadProviders()` (which reads `providers.json` from disk every time — no in-memory cache) → `markUnavailable` (writing `provider-status.json`). Two fixes that compound: (a) add a tiny TTL cache (~1s) to `aiToolkit/providers.js#loadProviders` so the read cost is amortized; (b) coalesce per-provider failure handling in `promptRunner.js` with a `Map<providerId, Promise>` so subsequent failures for the same provider await the first's mark-and-pick result and skip the duplicate work. Together they cut N-way failure storms to one disk-write + one mark. Acceptance: under a simulated 10-concurrent-failure load, providers.json is read at most twice and provider-status.json is written once.
- [ ] [propagate-runner-errorAnalysis-into-onRunFailed-context] **Propagate `metadata.errorAnalysis` into the `onRunFailed` event context** so `promptRunner.js#markProviderUnavailableFromError` doesn't re-run `analyzeError` on the same text the runner already analyzed. The runner writes `errorAnalysis` to `metadata` (`server/lib/aiToolkit/runner.js:245`, 343, 433) but `server/index.js:202` only forwards a subset to the error event, so the analysis pass is duplicated on every failure. Either add `errorAnalysis` to the event context AND to the rejected error thrown to promptRunner, or attach it to the metadata object that the rejection carries. Microsecond-class perf, but cleaner. Surfaced by /simplify efficiency review during the ai-fallback PR (2026-05-22).
+- [ ] [upcoming-tasks-widget-drop-catch-to-empty] **Drop the `.catch(() => [])` in `UpcomingTasksWidget.jsx:21`.** Pre-existing tech debt (not touched in v2.6.0): `useAutoRefetch(() => api.getCosUpcomingTasks(6).catch(() => []), 60000)` wipes the prior list on transient errors. The seven sibling callers (Brain, DigitalTwin, QuickSummary, ActionableInsightsBanner, ProcessesTab, SystemHealthPage, CyberCity) were fixed during the v2.6.0 release review by dropping the catch and passing `{ silent: true }` to the API helper instead. Apply the same pattern here: add an `options` parameter to `getCosUpcomingTasks` (in `client/src/services/apiAgents.js`, mirroring `getCosQuickSummary`), drop the catch, and pass `{ silent: true }` in the call site. Surfaced by reviewer-4 in the v2.6.0 release review (2026-05-21).
- [ ] [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.
diff --git a/client/src/components/apps/tabs/ProcessesTab.jsx b/client/src/components/apps/tabs/ProcessesTab.jsx
index 9e7b03ef4b..c1ebac68c4 100644
--- a/client/src/components/apps/tabs/ProcessesTab.jsx
+++ b/client/src/components/apps/tabs/ProcessesTab.jsx
@@ -39,8 +39,11 @@ export default function ProcessesTab({ pm2ProcessNames, filterFn }) {
const logsRef = useRef(null);
const fullscreenLogsRef = useRef(null);
+ // Let errors throw — `useAutoRefetch` preserves the last-good process list
+ // on transient failures. `silent: true` is essential here because the 5s
+ // poll would otherwise spit a toast every 5 seconds during any blip.
const { data, loading } = useAutoRefetch(
- () => api.getProcessesList().catch(() => []),
+ () => api.getProcessesList({ silent: true }),
5000,
);
const processes = data ?? [];
diff --git a/client/src/components/cos/ActionableInsightsBanner.jsx b/client/src/components/cos/ActionableInsightsBanner.jsx
index 3bd517d9ba..ce6e1914c1 100644
--- a/client/src/components/cos/ActionableInsightsBanner.jsx
+++ b/client/src/components/cos/ActionableInsightsBanner.jsx
@@ -65,8 +65,10 @@ export default function ActionableInsightsBanner({ onTaskUnblocked }) {
const [expanded, setExpanded] = useState({});
const navigate = useNavigate();
+ // Let errors throw — `useAutoRefetch` preserves the last-good insights on
+ // transient failures. `silent: true` keeps the 60s poll quiet on blips.
const { data, loading } = useAutoRefetch(
- () => api.getCosActionableInsights().catch(() => null),
+ () => api.getCosActionableInsights({ silent: true }),
60_000,
);
diff --git a/client/src/components/cos/QuickSummary.jsx b/client/src/components/cos/QuickSummary.jsx
index a1d33f949c..462b1ea6c9 100644
--- a/client/src/components/cos/QuickSummary.jsx
+++ b/client/src/components/cos/QuickSummary.jsx
@@ -25,8 +25,10 @@ import { useAutoRefetch } from '../../hooks/useAutoRefetch';
*/
export default function QuickSummary() {
const [showAccomplishments, setShowAccomplishments] = useState(false);
+ // Let errors throw — `useAutoRefetch` preserves the last-good summary on
+ // transient failures. `silent: true` keeps the 30s poll quiet on blips.
const { data: summary, loading } = useAutoRefetch(
- () => api.getCosQuickSummary().catch(() => null),
+ () => api.getCosQuickSummary({ silent: true }),
30_000,
);
diff --git a/client/src/components/settings/ImageGenTab.jsx b/client/src/components/settings/ImageGenTab.jsx
index 405a0f825f..3aed687142 100644
--- a/client/src/components/settings/ImageGenTab.jsx
+++ b/client/src/components/settings/ImageGenTab.jsx
@@ -155,8 +155,7 @@ export function ImageGenTab() {
setParallelBounds(bounds);
const cxParallel = clampParallel(cx.parallelLimit, bounds);
// Per-mode cleaner reads via the shared helper (mirrored from
- // server/lib/imageClean.js). Handles the legacy `autoClean: true` →
- // both-flags migration for users upgrading from before the split.
+ // server/lib/imageClean.js).
const codexClean = resolveCleanersFromConfig(cx);
const localClean = resolveCleanersFromConfig(ig.local);
const externalClean = resolveCleanersFromConfig(ig.external);
diff --git a/client/src/lib/README.md b/client/src/lib/README.md
index 8ad48ade15..11034b3240 100644
--- a/client/src/lib/README.md
+++ b/client/src/lib/README.md
@@ -31,7 +31,7 @@ grep -i "what you want to do" client/src/lib/README.md
| `sheetPointers.js` | Mirror of the character-sheet pointer helpers from `server/lib/storyBible.js`. `LEGACY_SHEET_VARIANT_ID` + `readSheetPointer` / `listSheetPointers` / `applySheetPointer` for traversing both the legacy `referenceSheetImageRef` field and the `referenceSheets` map. |
| `universeStylePreset.js` | Build the client-side style preset that `composeStyledPrompt` layers on top. |
| `bibleLimits.js` | Mirror of `server/lib/storyBible.js` `BIBLE_LIMITS`. |
-| `imageCleaners.js` | Mirror of `resolveCleanersFromConfig` from `server/lib/imageClean.js`. Reads `{cleanC2PA, denoise}` off a per-mode settings record + handles the legacy `autoClean: true` migration. |
+| `imageCleaners.js` | Mirror of `resolveCleanersFromConfig` from `server/lib/imageClean.js`. Reads `{cleanC2PA, denoise}` off a per-mode settings record; `cleanC2PA` defaults on, `denoise` defaults off (legacy `autoClean: true` no longer silently enables denoise). |
| `runnerFamilies.js` | Mirror of `server/lib/runners.js`. |
| `issueLength.js` | Mirror of `server/lib/issueLength.js`. |
diff --git a/client/src/pages/Brain.jsx b/client/src/pages/Brain.jsx
index d64d2db8e2..9e00645775 100644
--- a/client/src/pages/Brain.jsx
+++ b/client/src/pages/Brain.jsx
@@ -27,10 +27,13 @@ export default function Brain() {
const navigate = useNavigate();
const activeTab = tab || 'inbox';
+ // Let errors throw — `useAutoRefetch` preserves the last-good data on
+ // transient failures. `silent: true` keeps the 30s poll from spamming
+ // toasts when a single blip would otherwise fire two of them.
const fetchData = useCallback(async () => {
const [summary, settings] = await Promise.all([
- api.getBrainSummary().catch(() => null),
- api.getBrainSettings().catch(() => null)
+ api.getBrainSummary({ silent: true }),
+ api.getBrainSettings({ silent: true })
]);
return { summary, settings };
}, []);
diff --git a/client/src/pages/CyberCity.jsx b/client/src/pages/CyberCity.jsx
index e0d2f0bd28..9d8a45b390 100644
--- a/client/src/pages/CyberCity.jsx
+++ b/client/src/pages/CyberCity.jsx
@@ -61,9 +61,10 @@ function CyberCityInner() {
const keysRef = useKeyboardControls(handleToggleExploration);
- // Productivity data for HUD vitals and billboards
+ // Productivity data for HUD vitals and billboards. Let errors throw —
+ // `useAutoRefetch` preserves the last-good snapshot on transient failures.
const { data: productivityData } = useAutoRefetch(
- () => api.getCosQuickSummary().catch(() => null),
+ () => api.getCosQuickSummary({ silent: true }),
60_000,
);
diff --git a/client/src/pages/DigitalTwin.jsx b/client/src/pages/DigitalTwin.jsx
index fe027abef9..09d444f31a 100644
--- a/client/src/pages/DigitalTwin.jsx
+++ b/client/src/pages/DigitalTwin.jsx
@@ -28,10 +28,13 @@ export default function DigitalTwin() {
const navigate = useNavigate();
const activeTab = tab || 'overview';
+ // Let errors throw — `useAutoRefetch` preserves the last-good data on
+ // transient failures. `silent: true` keeps the 30s poll from spamming
+ // toasts when a single blip would otherwise fire two of them.
const fetchData = useCallback(async () => {
const [status, settings] = await Promise.all([
- api.getDigitalTwinStatus().catch(() => null),
- api.getDigitalTwinSettings().catch(() => null)
+ api.getDigitalTwinStatus({ silent: true }),
+ api.getDigitalTwinSettings({ silent: true })
]);
return { status, settings };
}, []);
diff --git a/client/src/pages/ImageGen.jsx b/client/src/pages/ImageGen.jsx
index 55dd1fcff9..6f4c6daeab 100644
--- a/client/src/pages/ImageGen.jsx
+++ b/client/src/pages/ImageGen.jsx
@@ -243,8 +243,7 @@ export default function ImageGen() {
return getSettings().then((s) => {
const backends = deriveAvailableBackends(s);
// Per-mode saved defaults via the shared helper (mirrored from
- // server/lib/imageClean.js). Handles the legacy `autoClean: true` →
- // both-flags migration. One pass per mode, then split into the
+ // server/lib/imageClean.js). One pass per mode, then split into the
// parallel cleanC2PA / denoise maps the UI binds to.
const perMode = {
external: resolveCleanersFromConfig(s?.imageGen?.external),
diff --git a/client/src/pages/SystemHealthPage.jsx b/client/src/pages/SystemHealthPage.jsx
index d26fa25803..e5f3336fec 100644
--- a/client/src/pages/SystemHealthPage.jsx
+++ b/client/src/pages/SystemHealthPage.jsx
@@ -32,7 +32,7 @@ export default function SystemHealthPage() {
const draftSeededRef = useRef(false);
const { data: health, loading, refetch } = useAutoRefetch(
- () => api.getSystemHealth({ silent: true }).catch(() => null),
+ () => api.getSystemHealth({ silent: true }),
15_000,
);
diff --git a/client/src/services/apiAgents.js b/client/src/services/apiAgents.js
index 196bdf47eb..d06a9de8e7 100644
--- a/client/src/services/apiAgents.js
+++ b/client/src/services/apiAgents.js
@@ -173,7 +173,7 @@ export const getCosProductivityTrends = (days = 30) => request(`/cos/productivit
export const getCosActivityCalendar = (weeks = 12, options) => request(`/cos/productivity/calendar?weeks=${weeks}`, options);
export const getCosQuickSummary = (options) => request('/cos/quick-summary', options);
export const getCosRecentTasks = (limit = 10, options) => request(`/cos/recent-tasks?limit=${limit}`, options);
-export const getCosActionableInsights = () => request('/cos/actionable-insights');
+export const getCosActionableInsights = (options) => request('/cos/actionable-insights', options);
export const getCosGoalProgress = () => request('/cos/goal-progress');
export const getCosGoalProgressSummary = (options) => request('/cos/goal-progress/summary', options);
diff --git a/client/src/services/apiBrain.js b/client/src/services/apiBrain.js
index 0c1a48c77b..90ba6cdbd3 100644
--- a/client/src/services/apiBrain.js
+++ b/client/src/services/apiBrain.js
@@ -1,8 +1,8 @@
import { request } from './apiCore.js';
// Brain - Second Brain Feature
-export const getBrainSummary = () => request('/brain/summary');
-export const getBrainSettings = () => request('/brain/settings');
+export const getBrainSummary = (options) => request('/brain/summary', options);
+export const getBrainSettings = (options) => request('/brain/settings', options);
export const updateBrainSettings = (settings) => request('/brain/settings', {
method: 'PUT',
body: JSON.stringify(settings)
diff --git a/client/src/services/apiCommands.js b/client/src/services/apiCommands.js
index bce61ad8fa..65b8bfb4ff 100644
--- a/client/src/services/apiCommands.js
+++ b/client/src/services/apiCommands.js
@@ -7,4 +7,4 @@ export const executeCommand = (command, workspacePath) => request('/commands/exe
});
export const stopCommand = (id) => request(`/commands/${id}/stop`, { method: 'POST' });
export const getAllowedCommands = () => request('/commands/allowed');
-export const getProcessesList = () => request('/commands/processes');
+export const getProcessesList = (options) => request('/commands/processes', options);
diff --git a/client/src/services/apiDigitalTwin.js b/client/src/services/apiDigitalTwin.js
index c4d19e3176..9db32b66dd 100644
--- a/client/src/services/apiDigitalTwin.js
+++ b/client/src/services/apiDigitalTwin.js
@@ -1,7 +1,7 @@
import { request } from './apiCore.js';
// Digital Twin - Status & Summary
-export const getDigitalTwinStatus = () => request('/digital-twin');
+export const getDigitalTwinStatus = (options) => request('/digital-twin', options);
// Digital Twin - Documents
export const getDigitalTwinDocuments = () => request('/digital-twin/documents');
@@ -48,7 +48,7 @@ export const exportDigitalTwin = (format, documentIds = null, includeDisabled =
});
// Digital Twin - Settings
-export const getDigitalTwinSettings = () => request('/digital-twin/settings');
+export const getDigitalTwinSettings = (options) => request('/digital-twin/settings', options);
export const updateDigitalTwinSettings = (settings) => request('/digital-twin/settings', {
method: 'PUT',
body: JSON.stringify(settings)
diff --git a/data.sample/providers.json b/data.sample/providers.json
index 2e4f94076d..e0d368d2fd 100644
--- a/data.sample/providers.json
+++ b/data.sample/providers.json
@@ -12,7 +12,7 @@
"lightModel": "claude-haiku-4-5-20251001",
"mediumModel": "claude-sonnet-4-5-20250929",
"heavyModel": "claude-opus-4-6",
- "timeout": 300000,
+ "timeout": 900000,
"enabled": true,
"envVars": {}
},
@@ -27,7 +27,7 @@
"lightModel": "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
"mediumModel": "us.anthropic.claude-sonnet-4-6-v1:0",
"heavyModel": "us.anthropic.claude-opus-4-6-v1:0",
- "timeout": 300000,
+ "timeout": 900000,
"enabled": false,
"envVars": {
"CLAUDE_CODE_USE_BEDROCK": "1",
@@ -94,7 +94,7 @@
"lightModel": "claude-haiku-4-5-20251001",
"mediumModel": "claude-sonnet-4-5-20250929",
"heavyModel": "claude-opus-4-6",
- "timeout": 600000,
+ "timeout": 900000,
"enabled": true,
"envVars": {},
"tuiPromptDelayMs": 2500,
diff --git a/server/services/imageGen/index.js b/server/services/imageGen/index.js
index a3d92720dc..242da9012b 100644
--- a/server/services/imageGen/index.js
+++ b/server/services/imageGen/index.js
@@ -35,10 +35,9 @@ const codexCfg = (s) => cfg(s).codex || {};
// Resolve the cleaner flags from body overrides + saved per-mode settings.
// Body fields win when explicit (per-render checkbox); otherwise inherit
-// the saved per-mode defaults (which include the legacy `autoClean: true`
-// → both-flags migration handled by `resolveCleanersFromConfig`). Shared
-// by `/generate` and `generateImage()` (safety net for direct callers
-// like `generateAvatar`).
+// the saved per-mode defaults via `resolveCleanersFromConfig`. Shared by
+// `/generate` and `generateImage()` (safety net for direct callers like
+// `generateAvatar`).
export function resolveImageCleaners(body, settings, mode) {
const saved = resolveCleanersFromConfig(cfg(settings)[mode]);
return {