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

Merge remote-tracking branch 'origin/main' into claim/issue-705-xp-hud

[._.]/ Adam Eivy5bbb0d06f651
diff --cc .changelog/NEXT.md
index 452d7aa14f,c572a19587..abbf8770a8
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@@ -13,7 -13,8 +13,9 @@@
- **[issue-705] CyberCity federation horizon** — your sync peers now appear as distant towers on the city's horizon: each lights up brighter when it's reachable and dims when it goes offline, with a link line reaching toward the city that's solid while syncing and dashed when the connection drops. A "VOID" marker for the primary instance is always there, so the horizon stays meaningful even when you run a single machine.
- **[issue-705] CyberCity backup vault** — a vault landmark now stands west of downtown and tells you your backup health at a glance: its seal glows green when a recent snapshot is protecting you, ambers as it ages, and turns red and reads "STALE" once a backup is overdue — pulsing blue while one is running. The label shows how long it's been since the last snapshot.
- **[issue-705] CyberCity task-queue warehouse** — a warehouse east of downtown now shows your Chief-of-Staff backlog as a stack of crates: one per pending task, piling up as work queues and clearing as it completes, with a capstone marker when there's more waiting than fits. Its roof light glows green while an agent is working a task and amber when a task is blocked, so you can read queue depth and state at a glance.
+ - **[issue-705] CyberCity voice marker** — a small beacon now stands north of downtown and mirrors your voice agent at a glance: its orb sits calm slate on standby, glows green while you're dictating, flashes red when a voice turn fails, and barely lights when voice mode is off — pulsing live so you can tell from across the city whether voice is awake, working, or asleep.
+ - **[issue-705] CyberCity health vitals tower** — a stacked vitals tower now rises in a wellness district southeast of downtown, showing your latest health at a glance: one glowing tier each for heart rate, steps, active calories, and sleep, each one taller and brighter the closer you are to its daily target. The heart-rate tier pulses like a heartbeat — faster as your rate climbs — and any metric with no data reads as a dim disc so you can tell "nothing tracked yet" from a genuinely low day.
+- **[issue-705] CyberCity character XP badge** — a floating badge in CyberCity now shows your adventurer's current level and a progress bar toward the next one, with current HP when known. When you earn XP it flashes briefly, and a louder celebratory flash marks a level-up — so the city reflects your progress at a glance. Click it to jump to your character sheet.
## Changed
diff --cc client/src/hooks/useCityData.js
index 96dc343e35,57099d5e15..e08e21fac4
--- a/client/src/hooks/useCityData.js
+++ b/client/src/hooks/useCityData.js
@@@ -20,7 -24,10 +24,11 @@@ export const useCityData = () =>
const [notificationCounts, setNotificationCounts] = useState({ unread: 0 });
const [backupStatus, setBackupStatus] = useState(null);
const [cosTasks, setCosTasks] = useState([]);
+ const [healthMetrics, setHealthMetrics] = useState(null);
+ // Voice-agent district marker: `enabled` from the persisted /voice/status payload,
+ // `live` driven by the per-socket voice:* events (idle | listening | dictating | error).
+ const [voiceState, setVoiceState] = useState(null);
+ const [character, setCharacter] = useState(null);
const [loading, setLoading] = useState(true);
const logIdRef = useRef(0);
@@@ -34,7 -41,7 +42,7 @@@
// /notifications/count returns the lightweight { count } payload — the HUD
// and Attention pane only need unread, and notifications:count socket
// events keep it fresh after this initial fetch.
- const [appsData, agents, cosAgentsData, status, reviewData, instanceData, health, notif, backup, cosTasksData, characterData] = await Promise.all([
- const [appsData, agents, cosAgentsData, status, reviewData, instanceData, health, notif, backup, cosTasksData, healthMetricsData, voice] = await Promise.all([
++ const [appsData, agents, cosAgentsData, status, reviewData, instanceData, health, notif, backup, cosTasksData, healthMetricsData, voice, characterData] = await Promise.all([
api.getApps().catch(() => []),
api.getRunningAgents().catch(() => []),
api.getCosAgents().catch(() => []),
@@@ -45,7 -52,8 +53,9 @@@
api.getNotificationCount().catch(() => ({ count: 0 })),
api.getBackupStatus({ silent: true }).catch(() => null),
api.getCosTasks({ silent: true }).catch(() => ({ tasks: [] })),
+ api.getLatestHealthMetrics(HEALTH_METRIC_KEYS, { silent: true }).catch(() => null),
+ api.getVoiceStatus({ silent: true }).catch(() => null),
+ api.getCharacter({ silent: true }).catch(() => null),
]);
setApps(appsData);
@@@ -58,7 -66,11 +68,12 @@@
setNotificationCounts({ unread: notif?.count ?? 0 });
setBackupStatus(backup);
setCosTasks(Array.isArray(cosTasksData?.tasks) ? cosTasksData.tasks : []);
+ setHealthMetrics(healthMetricsData);
+ // Seed the marker with the persisted enabled flag; live sub-state starts idle and the
+ // voice:* socket handlers below take over. Preserve a prior `live` across refetches so
+ // a mid-turn fetchAll doesn't snap the beacon back to idle.
+ setVoiceState(prev => ({ enabled: voice?.enabled ?? false, live: prev?.live || 'idle' }));
+ if (characterData) setCharacter(characterData);
setLoading(false);
}, []);
@@@ -235,7 -259,8 +272,9 @@@
notificationCounts,
backupStatus,
cosTasks,
+ healthMetrics,
+ voiceState,
+ character,
loading,
connected: socket.connected,
};
diff --cc client/src/pages/CyberCity.jsx
index 990fb979a0,5861b79aeb..d697e6eee7
--- a/client/src/pages/CyberCity.jsx
+++ b/client/src/pages/CyberCity.jsx
@@@ -13,7 -13,7 +13,7 @@@ import CitySettingsPanel from '../compo
import { computeFilterResult } from '../utils/cityFilter';
function CyberCityInner() {
- const { apps, cosAgents, cosStatus, eventLogs, agentMap, reviewCounts, instances, systemHealth, notificationCounts, backupStatus, cosTasks, character, loading, connected } = useCityData();
- const { apps, cosAgents, cosStatus, eventLogs, agentMap, reviewCounts, instances, systemHealth, notificationCounts, backupStatus, cosTasks, healthMetrics, voiceState, loading, connected } = useCityData();
++ const { apps, cosAgents, cosStatus, eventLogs, agentMap, reviewCounts, instances, systemHealth, notificationCounts, backupStatus, cosTasks, healthMetrics, voiceState, character, loading, connected } = useCityData();
const { settings, updateSetting } = useCitySettingsContext();
const { playSfx } = useCityAudio(settings);
const navigate = useNavigate();