Unified · Split
| @@ -256,17 +256,26 @@ export function IntegrationDetailPage(props: { · 255 unmodified lines | |||
| 256 | const healthProbeFor = useConnectionsHealth(integrationConnections); | 256 | const healthProbeFor = useConnectionsHealth(integrationConnections); |
| 257 | const toolsHealthIssue = useMemo(() => { | 257 | const toolsHealthIssue = useMemo(() => { |
| 258 | const issues = integrationConnections | 258 | const issues = integrationConnections |
| 259 | .map((connection) => ({ | 259 | .map((connection) => { |
| 260 | connection, | ||
| 261 | // The health hook hides tool-sync stamps from CONNECTION-health | 260 | // The health hook hides tool-sync stamps from CONNECTION-health |
| 262 | // display, but this consumer explains an empty CATALOG — and a | 261 | // display, but this consumer explains an empty CATALOG, where the |
| 263 | // "Tool sync failing" stamp is exactly that explanation (it carries | 262 | // "Tool sync failing" stamp is a real answer (it names the sync |
| 264 | // the sync failure and drives the "Check and sync tools" recovery). | 263 | // failure and drives the "Check and sync tools" recovery). Precedence: |
| 265 | // Fall back to the raw persisted verdict when it is one. | 264 | // an expired/degraded PROBE verdict wins — a rejected credential |
| 266 | probe: | 265 | // names its own fix ("Connection rejected" → reconnect) — but a |
| 267 | healthProbeFor(connection) ?? | 266 | // healthy or unknown probe must NOT hide the stamp: a working |
| 268 | (isToolSyncHealth(connection.lastHealth) ? connection.lastHealth : null), | 267 | // credential does not refute a broken catalog, and only a successful |
| 269 | })) | 268 | // sync clears the stamp. |
| 269 | const probe = healthProbeFor(connection); | ||
| 270 | const catalogStamp = isToolSyncHealth(connection.lastHealth) ? connection.lastHealth : null; | ||
| 271 | return { | ||
| 272 | connection, | ||
| 273 | probe: | ||
| 274 | probe?.status === "expired" || probe?.status === "degraded" | ||
| 275 | ? probe | ||
| 276 | : (catalogStamp ?? probe), | ||
| 277 | }; | ||
| 278 | }) | ||
| 270 | .filter( | 279 | .filter( |
| 271 | ( | 280 | ( |
| 272 | entry, | 281 | entry, |