feat(health): add project health store, Mission Control bar, and session metrics

This commit is contained in:
Hibryda 2026-03-10 23:45:30 +01:00
parent 072316d63f
commit 42094eac2a
11 changed files with 773 additions and 16 deletions

View file

@ -1,6 +1,7 @@
import { loadGroups, saveGroups, getCliGroup } from '../adapters/groups-bridge';
import type { GroupsFile, GroupConfig, ProjectConfig } from '../types/groups';
import { clearAllAgentSessions } from '../stores/agents.svelte';
import { clearHealthTracking } from '../stores/health.svelte';
import { waitForPendingPersistence } from '../agent-dispatcher';
export type WorkspaceTab = 'sessions' | 'docs' | 'context' | 'settings';
@ -73,9 +74,10 @@ export async function switchGroup(groupId: string): Promise<void> {
// Wait for any in-flight persistence before clearing state
await waitForPendingPersistence();
// Teardown: clear terminal tabs and agent sessions for the old group
// Teardown: clear terminal tabs, agent sessions, and health tracking for the old group
projectTerminals = {};
clearAllAgentSessions();
clearHealthTracking();
activeGroupId = groupId;
activeProjectId = null;