History

Let expired probes outrank the catalog stamp; healthy probes never hide it

Rhys Sullivan committed 2 months ago

Commit 526a0e91 parent 93405fd1 file · +19 −10Browse files

Unified · Split

packages/react/src/pages/integration-detail.tsx+19−10
@@ -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 = integrationConnections258 const issues = integrationConnections
259 .map((connection) => ({259 .map((connection) => {
260 connection,
261 // The health hook hides tool-sync stamps from CONNECTION-health260 // The health hook hides tool-sync stamps from CONNECTION-health
262 // display, but this consumer explains an empty CATALOG — and a261 // display, but this consumer explains an empty CATALOG, where the
263 // "Tool sync failing" stamp is exactly that explanation (it carries262 // "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,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t