{typeConnectors.map((connector) => {
From 207595bb335682afaf7343cd80b90cb3d4544be7 Mon Sep 17 00:00:00 2001
From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com>
Date: Fri, 9 Jan 2026 23:16:00 +0530
Subject: [PATCH 2/9] refactor: enhance connector card and status badge
components
- Updated `ConnectorCard` to prioritize displaying status messages over indexed dates and warnings.
- Modified `ConnectorStatusBadge` to use a span instead of a div for better inline flexibility.
- Adjusted styles in `ConnectorAccountsListView` for improved layout and spacing.
- Cleaned up example status messages in the configuration file for clarity.
---
.../connector-popup/components/connector-card.tsx | 13 +++++++------
.../components/connector-status-badge.tsx | 6 +++---
.../config/connector-status-config.ts | 7 ++-----
.../views/connector-accounts-list-view.tsx | 14 +++++++-------
4 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/surfsense_web/components/assistant-ui/connector-popup/components/connector-card.tsx b/surfsense_web/components/assistant-ui/connector-popup/components/connector-card.tsx
index 43c03e03c..b302da2b5 100644
--- a/surfsense_web/components/assistant-ui/connector-popup/components/connector-card.tsx
+++ b/surfsense_web/components/assistant-ui/connector-popup/components/connector-card.tsx
@@ -140,13 +140,14 @@ export const ConnectorCard: FC = ({
);
}
- // Show status message if available and connector is not connected
- if (!isConnected && statusMessage) {
+ // Priority 1: Show status message if available (for both connected and disconnected connectors)
+ // This takes precedence over indexed dates and warnings
+ if (statusMessage) {
return {statusMessage};
}
if (isConnected) {
- // Show last indexed date for connected connectors
+ // Show last indexed date for connected connectors (only if no status message)
if (lastIndexedAt) {
return (
@@ -158,7 +159,7 @@ export const ConnectorCard: FC = ({
return Never indexed;
}
- // Show warning message if available and warnings are enabled
+ // Show warning message if available and warnings are enabled (only if no status message)
if (warning && showWarnings) {
return {warning};
}
@@ -196,10 +197,10 @@ export const ConnectorCard: FC = ({
)}