FN-6835: add system stats node selection

Add Command Center controls for inspecting local or remote node system telemetry.

- add a System area node selector with local defaults, remote stats loading, and per-node sample resets
- expose proxied node system-stats fetching and route local node requests through the shared stats builder
- route Vitest kill requests through node-aware proxy plumbing and cover node stats behavior with tests
- add localized node selector copy, docs, and a published package changeset

Files changed:
 .changeset/fuzzy-nodes-watch.md                    |   5 +
 docs/dashboard-guide.md                            |   4 +-
 packages/dashboard/app/api/legacy.ts               |  14 +-
 .../__tests__/CommandCenter.mobile-scroll.test.tsx |   2 +
 .../__tests__/CommandCenter.tablet-layout.test.tsx |   2 +
 .../__tests__/CommandCenter.test.tsx               |   1 +
 .../__tests__/SystemStatsArea.test.tsx             | 160 +++++++++++++++++
 .../command-center/areas/SystemStatsArea.css       |  13 ++
 .../command-center/areas/SystemStatsArea.tsx       |  72 +++++++-
 .../dashboard/src/__tests__/routes-system.test.ts  | 122 +++++++++++++
 packages/dashboard/src/routes.ts                   | 190 +++++++++++++--------
 packages/i18n/locales/en/app.json                  |  10 ++
 packages/i18n/locales/es/app.json                  |  10 ++
 packages/i18n/locales/fr/app.json                  |  10 ++
 packages/i18n/locales/ko/app.json                  |  10 ++
 packages/i18n/locales/zh-CN/app.json               |  10 ++
 packages/i18n/locales/zh-TW/app.json               |  10 ++
 17 files changed, 562 insertions(+), 83 deletions(-)

Fusion-Task-Id: FN-6835

Fusion-Task-Lineage: 8f9a047b-78d0-477e-824e-f7592966cdc0
This commit is contained in:
gsxdsm
2026-06-21 12:54:36 -07:00
parent ef44f6357f
commit eb3477aba4
17 changed files with 564 additions and 85 deletions

View File

@@ -7213,13 +7213,23 @@ export interface GithubSourceIssueClosedAtBackfillResult {
hasMore: boolean;
}
/*
FNXC:CommandCenter 2026-06-21-00:00:
The Command Center System area keeps the direct local /system-stats client and uses the explicit /nodes/:id/system-stats route for selected remote nodes so authenticated node proxying stays server-side and local project scoping is not forwarded across nodes.
*/
export function fetchSystemStats(projectId?: string): Promise<SystemStatsResponse> {
return api<SystemStatsResponse>(withProjectId("/system-stats", projectId));
}
export function killVitestProcesses(projectId?: string): Promise<KillVitestResponse> {
return api<KillVitestResponse>(withProjectId("/kill-vitest", projectId), {
export function fetchNodeSystemStats(nodeId: string, projectId?: string): Promise<SystemStatsResponse> {
return api<SystemStatsResponse>(withProjectId(`/nodes/${encodeURIComponent(nodeId)}/system-stats`, projectId));
}
export function killVitestProcesses(projectId?: string, nodeId?: string, localNodeId?: string): Promise<KillVitestResponse> {
return proxyApi<KillVitestResponse>(withProjectId("/kill-vitest", projectId), {
method: "POST",
nodeId,
localNodeId,
});
}