fix(web): break metricsEqual lastSeen dep-loop; add staleTime to test
Remove lastSeen from metricsEqual in ServerWorkspaceRows: computeFleetAggregates never reads lastSeen, so comparing it in metricsEqual causes background TanStack Query refetches (dataUpdatedAt changes) to trigger spurious onMetrics callbacks, cascading into a Dashboard → ServerWorkspaceRows render loop that hits React's 100-render limit in CI. Add staleTime: Infinity to the test QueryClient to prevent background refetches from interfering with test assertions.
This commit is contained in:
@@ -34,7 +34,6 @@ function metricsEqual(a: FleetRowMetrics, b: FleetRowMetrics): boolean {
|
||||
a.conclusionCount === b.conclusionCount &&
|
||||
a.queueActive === b.queueActive &&
|
||||
a.queuePending === b.queuePending &&
|
||||
a.lastSeen === b.lastSeen &&
|
||||
a.health === b.health
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user