FN-6197: suppress tab-resume fetch errors in dashboard
Keep cached dashboard data visible while reconnecting after transient tab-resume fetch failures. - detect likely tab suspension and visibility-resume fetch errors across dashboard data hooks - suppress transient "Failed to fetch" errors when cached project and node data already exist - show a "Connecting…" executor status state instead of surfacing raw resume-time fetch errors - add dashboard tests covering visibility suspension handling and executor reconnect rendering - add a patch changeset for the published CLI package Files changed: .changeset/tame-tab-resume-fetch.md | 5 + packages/dashboard/app/App.tsx | 16 ++- .../dashboard/app/components/ExecutorStatusBar.css | 19 ++- .../dashboard/app/components/ExecutorStatusBar.tsx | 12 ++ .../__tests__/ExecutorStatusBar.test.tsx | 20 ++- .../dashboard/app/hooks/__tests__/useNodes.test.ts | 149 ++++++++++++++++++++- .../app/hooks/__tests__/useProjects.test.ts | 72 +++++++++- .../hooks/__tests__/visibilitySuspension.test.ts | 13 ++ packages/dashboard/app/hooks/useExecutorStats.ts | 15 ++- .../dashboard/app/hooks/useManagedDockerNodes.ts | 25 +++- packages/dashboard/app/hooks/useMeshState.ts | 25 +++- packages/dashboard/app/hooks/useNodes.ts | 25 +++- packages/dashboard/app/hooks/useProjectHealth.ts | 18 ++- packages/dashboard/app/hooks/useProjects.ts | 27 +++- packages/dashboard/app/hooks/useUsageData.ts | 24 +++- .../dashboard/app/hooks/visibilitySuspension.ts | 4 + 16 files changed, 435 insertions(+), 34 deletions(-) Fusion-Task-Id: FN-6197 Fusion-Task-Lineage: 834f56d8-8391-414f-8cbd-7e626c5724d0
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
background: var(--executor-status-error-bg);
|
||||
}
|
||||
|
||||
.executor-status-bar--connecting,
|
||||
.executor-status-bar--loading {
|
||||
background: var(--surface);
|
||||
}
|
||||
@@ -102,6 +103,14 @@
|
||||
background: var(--color-error);
|
||||
}
|
||||
|
||||
.executor-status-bar__indicator--connecting {
|
||||
background: var(--color-warning);
|
||||
}
|
||||
|
||||
.executor-status-bar__indicator--connecting.executor-status-bar__indicator--active {
|
||||
animation: executor-pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* Numeric count display */
|
||||
.executor-status-bar__count {
|
||||
font-family: var(--font-mono);
|
||||
@@ -251,13 +260,21 @@
|
||||
}
|
||||
|
||||
/* Error message */
|
||||
.executor-status-bar__error {
|
||||
.executor-status-bar__error,
|
||||
.executor-status-bar__connecting {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.executor-status-bar__error {
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
.executor-status-bar__connecting {
|
||||
color: var(--color-warning);
|
||||
}
|
||||
|
||||
/* Loading message */
|
||||
.executor-status-bar__loading-text {
|
||||
color: var(--text-muted);
|
||||
|
||||
Reference in New Issue
Block a user