refactor(runtimes): split monolithic page, add zustand store, time range selector, and delete support

- Split 1189-line runtimes-page.tsx into focused sub-components (list, detail, ping, usage, 5 chart files, shared UI, utils)
- Add useRuntimeStore zustand store for shared runtime state across pages (agents page now uses it too)
- Add 7d/30d/90d time range selector to usage charts
- Add full-stack runtime delete: SQL query, Go handler, API route, frontend with confirmation dialog
- Remove unused daemon:heartbeat WS listener (server never broadcasts it)
This commit is contained in:
Jiayuan 2026-03-29 17:02:25 +08:00
parent 42f72371bd
commit ceba8556f5
21 changed files with 1398 additions and 1138 deletions

View file

@ -51,3 +51,7 @@ SET status = 'offline', updated_at = now()
WHERE status = 'online'
AND last_seen_at < now() - make_interval(secs => @stale_seconds::double precision)
RETURNING id, workspace_id;
-- name: DeleteAgentRuntime :exec
DELETE FROM agent_runtime
WHERE id = $1 AND workspace_id = $2;