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