feat(FN-2681): add Vitest kill controls in system stats

- Add dashboard API endpoint and server route to terminate Vitest worker processes safely
- Extend legacy API client with killVitestProcess support for frontend invocation
- Add SystemStatsModal UI controls and styling for triggering Vitest kill actions, including mobile width stability fixes
- Expand route and modal tests to cover new controls and behavior
- Add changeset and architecture docs updates for the new Vitest kill capability
This commit is contained in:
Fusion
2026-04-27 05:50:40 -07:00
committed by gsxdsm
parent fce1755d2b
commit ec092825ac
8 changed files with 506 additions and 9 deletions

View File

@@ -4896,12 +4896,25 @@ export interface TaskStatsSnapshot {
export interface SystemStatsResponse {
systemStats: SystemStatsSnapshot;
taskStats: TaskStatsSnapshot;
vitestProcessCount?: number;
vitestLastAutoKillAt?: string | null;
}
export interface KillVitestResponse {
killed: number;
pids: number[];
}
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), {
method: "POST",
});
}
/** Fetch unified activity feed */
export function fetchActivityFeed(options?: FeedOptions): Promise<ActivityFeedEntry[]> {
const params = new URLSearchParams();