FN-6827: add engine status banner
Add project-scoped engine connectivity remediation to the dashboard. - Add engine status/start API helpers and server routes that can resume paused projects or start missing engines. - Render a project banner with dashboard-only guidance, polling, disabled starting state, localized copy, and focused tests. - Document the engine status banner behavior and add a changeset for the published CLI package. Files changed: .changeset/fn-6827-engine-disconnected-banner.md | 7 + docs/dashboard-guide.md | 8 + packages/dashboard/app/api/legacy.ts | 20 +++ .../app/components/EngineStatusBanner.css | 87 +++++++++++ .../app/components/EngineStatusBanner.tsx | 62 ++++++++ .../__tests__/EngineStatusBanner.test.tsx | 145 +++++++++++++++++ .../app/components/dashboard/DashboardBanners.tsx | 3 + .../app/hooks/__tests__/useEngineStatus.test.ts | 171 +++++++++++++++++++++ packages/dashboard/app/hooks/useEngineStatus.ts | 111 +++++++++++++ packages/dashboard/src/__tests__/server.test.ts | 129 ++++++++++++++++ packages/dashboard/src/server.ts | 89 +++++++++++ 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, 892 insertions(+) Fusion-Task-Id: FN-6827 Fusion-Task-Lineage: 56821ca3-04c8-4674-9400-3639f10e463d
This commit is contained in:
@@ -255,6 +255,26 @@ export function refreshDashboardHealth(): Promise<DashboardHealthResponse> {
|
||||
return api<DashboardHealthResponse>("/health/refresh", { method: "POST" });
|
||||
}
|
||||
|
||||
export interface EngineStatusResponse {
|
||||
connected: boolean;
|
||||
starting: boolean;
|
||||
canStart: boolean;
|
||||
reason?: "dashboard-only" | "no-project" | string;
|
||||
projectId?: string;
|
||||
}
|
||||
|
||||
/*
|
||||
* FNXC:EngineStatusBanner 2026-06-22-00:00:
|
||||
* Engine status is project-scoped because a multi-project dashboard can have one running engine while the current project is paused, failed, or not yet started. Thread `projectId` through the existing query helper so the server resolves the same project context as task and settings routes.
|
||||
*/
|
||||
export function fetchEngineStatus(projectId?: string): Promise<EngineStatusResponse> {
|
||||
return api<EngineStatusResponse>(withProjectId("/engine/status", projectId));
|
||||
}
|
||||
|
||||
export function startEngine(projectId?: string): Promise<EngineStatusResponse> {
|
||||
return api<EngineStatusResponse>(withProjectId("/engine/start", projectId), { method: "POST" });
|
||||
}
|
||||
|
||||
export function checkForUpdates(): Promise<UpdateCheckResponse> {
|
||||
return api<UpdateCheckResponse>("/updates/check");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user