feat(FN-4671): complete Step 1 — add ready and startup duration state
Fusion-Task-Id: FN-4671 Fusion-Task-Lineage: d6a084c7-eafd-4775-8284-8dd6d9eeb842
This commit is contained in:
@@ -85,6 +85,7 @@ export class DashboardTUI {
|
||||
// changes or the split is no longer rendered.
|
||||
narrowLogSplitFocused = false;
|
||||
loadingStatus = "Starting…";
|
||||
isReady = false;
|
||||
mode: "status" | "interactive" = "status";
|
||||
// When true, sampleSystemStats() kills any running vitest processes if
|
||||
// system memory usage crosses 90%. Toggled by [v] in the Utilities panel.
|
||||
@@ -195,6 +196,7 @@ export class DashboardTUI {
|
||||
logsViewportStart: this.logsViewportStart,
|
||||
narrowLogSplitFocused: this.narrowLogSplitFocused,
|
||||
loadingStatus: this.loadingStatus,
|
||||
isReady: this.isReady,
|
||||
mode: this.mode,
|
||||
interactiveData: this.interactiveData,
|
||||
interactiveView: this.interactiveView,
|
||||
@@ -220,6 +222,10 @@ export class DashboardTUI {
|
||||
return this.isRunning;
|
||||
}
|
||||
|
||||
get ready(): boolean {
|
||||
return this.isReady;
|
||||
}
|
||||
|
||||
setCallbacks(callbacks: TUICallbacks): void {
|
||||
this.callbacks = callbacks;
|
||||
this.notify();
|
||||
@@ -403,6 +409,11 @@ export class DashboardTUI {
|
||||
this.notify();
|
||||
}
|
||||
|
||||
setReady(ready: boolean): void {
|
||||
this.isReady = ready;
|
||||
this.notify();
|
||||
}
|
||||
|
||||
setInteractiveData(data: InteractiveData): void {
|
||||
this.interactiveData = data;
|
||||
this.notify();
|
||||
|
||||
@@ -20,6 +20,7 @@ export interface SystemInfo {
|
||||
engineMode: "dev" | "active" | "paused";
|
||||
fileWatcher: boolean;
|
||||
startTimeMs: number;
|
||||
startupDurationMs?: number;
|
||||
}
|
||||
|
||||
export interface TaskStats {
|
||||
@@ -347,6 +348,7 @@ export interface DashboardState {
|
||||
// pane has key focus (vs. the top main panel).
|
||||
narrowLogSplitFocused: boolean;
|
||||
loadingStatus: string;
|
||||
isReady: boolean;
|
||||
mode: AppMode;
|
||||
interactiveData: InteractiveData | null;
|
||||
interactiveView: InteractiveView;
|
||||
@@ -392,6 +394,7 @@ export function createInitialState(): DashboardState {
|
||||
logsViewportStart: 0,
|
||||
narrowLogSplitFocused: false,
|
||||
loadingStatus: "Starting…",
|
||||
isReady: false,
|
||||
mode: "status",
|
||||
interactiveData: null,
|
||||
interactiveView: "board",
|
||||
|
||||
Reference in New Issue
Block a user