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
fix([codex5-onboarding-capability-map]): address gemini review — memory count + empty-rollup
Adam Eivy6289cb81f874
diff --git a/server/lib/capabilityMap.js b/server/lib/capabilityMap.jsindex 2b6c5fb795..b8e54d8039 100644--- a/server/lib/capabilityMap.js+++ b/server/lib/capabilityMap.js@@ -256,13 +256,15 @@ export function buildCapabilityRows(data = {}) {* `overall` is worst-wins across error → warn → unconfigured → ok.*/export function summarizeCapabilities(rows = []) {+ const list = Array.isArray(rows) ? rows : [];const counts = { ok: 0, warn: 0, error: 0, unconfigured: 0 };- for (const r of (Array.isArray(rows) ? rows : [])) {+ for (const r of list) {if (counts[r?.status] !== undefined) counts[r.status] += 1;}- let overall = OK;+ // Empty/garbage input is "nothing set up", not "all healthy" — don't default OK.+ let overall = list.length > 0 ? OK : UNCONFIGURED;if (counts.error > 0) overall = ERROR;else if (counts.warn > 0) overall = WARN;else if (counts.unconfigured > 0) overall = UNCONFIGURED;- return { ...counts, total: rows.length, overall };+ return { ...counts, total: list.length, overall };}diff --git a/server/lib/capabilityMap.test.js b/server/lib/capabilityMap.test.jsindex 20f5426fc3..94b2276306 100644--- a/server/lib/capabilityMap.test.js+++ b/server/lib/capabilityMap.test.js@@ -198,4 +198,10 @@ describe('summarizeCapabilities', () => {it('reports unconfigured overall when only ok + unconfigured rows', () => {expect(summarizeCapabilities([{ status: OK }, { status: UNCONFIGURED }]).overall).toBe(UNCONFIGURED);});++ it('reports unconfigured (not ok) for empty or garbage input', () => {+ expect(summarizeCapabilities([]).overall).toBe(UNCONFIGURED);+ expect(summarizeCapabilities(null).overall).toBe(UNCONFIGURED);+ expect(summarizeCapabilities(null).total).toBe(0);+ });});diff --git a/server/routes/capabilities.js b/server/routes/capabilities.jsindex 48448723d5..bb7c3a1051 100644--- a/server/routes/capabilities.js+++ b/server/routes/capabilities.js@@ -63,7 +63,7 @@ router.get('/', asyncHandler(async (req, res) => {Promise.resolve().then(() => getAllProviderStatuses()).catch(() => ({})),listCalendarAccounts().catch(() => []),listMessageAccounts().catch(() => []),- getMemories({ status: 'active' }).catch(() => []),+ getMemories({ status: 'active' }).catch(() => ({ total: 0 })),resolveEmbeddingProviderConfigured().catch(() => false),getVoiceConfig().catch(() => ({})),getGenomeSummary().catch(() => ({ uploaded: false })),@@ -79,7 +79,8 @@ router.get('/', asyncHandler(async (req, res) => {providerStatuses,calendarAccounts,messageAccounts,- memoryCount: Array.isArray(memories) ? memories.length : 0,+ // getMemories returns { total, memories } — use the count, not the wrapper.+ memoryCount: Number(memories?.total) || 0,embeddingProviderConfigured,voiceConfig,network,