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
256256 const healthProbeFor = useConnectionsHealth(integrationConnections);
257257 const toolsHealthIssue = useMemo(() => {
258258 const issues = integrationConnections
259− .map((connection) => ({
260− connection,
259+ .map((connection) => {
261260 // 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+ })
270279 .filter(
271280 (
272281 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