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 review: Copilot round 6

Adam Eivybb6fe731b487
diff --git a/client/src/components/city/CityIntelPane.jsx b/client/src/components/city/CityIntelPane.jsx
index 03cc5a503e..9e28c41bdf 100644
--- a/client/src/components/city/CityIntelPane.jsx
+++ b/client/src/components/city/CityIntelPane.jsx
@@ -26,7 +26,7 @@ function buildAttentionItems({ apps, cosAgents, reviewCounts, instances, systemH
}
const pm2 = app.pm2Status || {};
Object.entries(pm2).forEach(([procName, s]) => {
- if (s?.status === 'errored') {
+ if (s?.status === 'errored' || s?.status === 'error') {
items.push({
id: `proc-err-${app.id}-${procName}`,
severity: 'critical',
diff --git a/client/src/hooks/useCityData.js b/client/src/hooks/useCityData.js
index 77e0eb77b8..26ad6f65f7 100644
--- a/client/src/hooks/useCityData.js
+++ b/client/src/hooks/useCityData.js
@@ -39,7 +39,7 @@ export const useCityData = () => {
api.getCosStatus().catch(() => ({ running: false })),
api.getReviewCounts().catch(() => ({ total: 0, alert: 0, todo: 0, briefing: 0, cos: 0 })),
api.getInstances().catch(() => ({ self: null, peers: [], syncStatus: null })),
- api.getSystemHealth().catch(() => null),
+ api.getSystemHealth({ silent: true }).catch(() => null),
api.getNotificationCount().catch(() => ({ count: 0 })),
]);
@@ -55,7 +55,7 @@ export const useCityData = () => {
}, []);
const fetchHealth = useCallback(async () => {
- const health = await api.getSystemHealth().catch(() => null);
+ const health = await api.getSystemHealth({ silent: true }).catch(() => null);
if (!health) return;
setSystemHealth(prev => {
if (prev && healthSignature(prev) === healthSignature(health)) return prev;
diff --git a/client/src/pages/CyberCity.jsx b/client/src/pages/CyberCity.jsx
index d74df6f155..ecbcdae92a 100644
--- a/client/src/pages/CyberCity.jsx
+++ b/client/src/pages/CyberCity.jsx
@@ -19,10 +19,16 @@ function CyberCityInner() {
const location = useLocation();
const [productivityData, setProductivityData] = useState(null);
const [filter, setFilter] = useState(() => {
- const raw = sessionStorage.getItem('cybercity.filter');
- if (raw) {
- const parsed = JSON.parse(raw);
- if (parsed && typeof parsed.status === 'string') return parsed;
+ // try/catch is necessary because sessionStorage values are external state
+ // a corrupted/older-schema entry would throw and crash the page render.
+ try {
+ const raw = sessionStorage.getItem('cybercity.filter');
+ if (raw) {
+ const parsed = JSON.parse(raw);
+ if (parsed && typeof parsed.status === 'string') return parsed;
+ }
+ } catch {
+ // fall through to default
}
return { status: 'all', search: '' };
});
diff --git a/client/src/utils/cityFilter.js b/client/src/utils/cityFilter.js
index ea18e4ae6b..2fd197b066 100644
--- a/client/src/utils/cityFilter.js
+++ b/client/src/utils/cityFilter.js
@@ -8,7 +8,7 @@ export const STATUS_FILTERS = [
match: (app) => {
if (app.archived) return false;
const pm2 = app.pm2Status || {};
- return Object.values(pm2).some(s => s?.status === 'errored');
+ return Object.values(pm2).some(s => s?.status === 'errored' || s?.status === 'error');
},
},
{