From 8d9eed653380fe8a851dddc59b27fd813fcedd10 Mon Sep 17 00:00:00 2001 From: Jon Saad-Falcon <41205309+jonsaadfalcon@users.noreply.github.com> Date: Fri, 27 Mar 2026 16:30:01 -0700 Subject: [PATCH] feat: add Reconnect button to connected sources, show warning for 0-data sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Connected sources now show a "Reconnect" button that expands the inline setup flow to re-enter credentials. Sources with 0 chunks show "Connected — no data synced yet" in amber instead of "0 items" in green. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/pages/AgentsPage.tsx | 94 +++++++++++++++++++++++++++---- 1 file changed, 84 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/AgentsPage.tsx b/frontend/src/pages/AgentsPage.tsx index b260ecbb..4fd0dd81 100644 --- a/frontend/src/pages/AgentsPage.tsx +++ b/frontend/src/pages/AgentsPage.tsx @@ -1075,26 +1075,100 @@ function ChannelsTab({ agentId }: { agentId: string }) { {connected.map((c) => { const meta = SOURCE_CATALOG.find(s => s.connector_id === c.connector_id); const unit = meta?.unitLabel || 'items'; + const isReconnecting = expandedId === c.connector_id; return (
- {iconMap[c.connector_id] || '\uD83D\uDD17'} -
-
- {c.display_name} -
-
- {c.chunks.toLocaleString()} {unit} +
+ {iconMap[c.connector_id] || '\uD83D\uDD17'} +
+
+ {c.display_name} +
+
0 ? '#4ade80' : '#f59e0b' }}> + {c.chunks > 0 + ? `${c.chunks.toLocaleString()} ${unit}` + : 'Connected — no data synced yet'} +
+
- {'\u2713'} + {isReconnecting && meta?.steps && ( +
+
+ Re-enter credentials to reconnect this source. +
+ {meta.steps.map((step, i) => ( +
+
+ STEP {i + 1} +
+
+ {step.label} +
+ {step.url && ( + + {step.urlLabel || 'Open'} → + + )} +
+ ))} + {meta.inputFields && ( + handleConnect(c.connector_id, req)} + /> + )} +
+ )}
); })}