diff --git a/surfsense_web/components/assistant-ui/connector-popup.tsx b/surfsense_web/components/assistant-ui/connector-popup.tsx index 86c0cf59e..6d9d2390b 100644 --- a/surfsense_web/components/assistant-ui/connector-popup.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup.tsx @@ -191,7 +191,7 @@ export const ConnectorIndicator: FC = () => { ) : connectingConnectorType ? ( handleSubmitConnectForm(formData, startIndexing)} onBack={handleBackFromConnect} isSubmitting={isCreatingConnector} /> diff --git a/surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts b/surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts index 99bd11f53..78f67095f 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts +++ b/surfsense_web/components/assistant-ui/connector-popup/hooks/use-connector-dialog.ts @@ -491,20 +491,23 @@ export const useConnectorDialog = () => { // Handle submitting connect form const handleSubmitConnectForm = useCallback( - async (formData: { - name: string; - connector_type: string; - config: Record; - is_indexable: boolean; - last_indexed_at: null; - periodic_indexing_enabled: boolean; - indexing_frequency_minutes: number | null; - next_scheduled_at: null; - startDate?: Date; - endDate?: Date; - periodicEnabled?: boolean; - frequencyMinutes?: string; - }) => { + async ( + formData: { + name: string; + connector_type: string; + config: Record; + is_indexable: boolean; + last_indexed_at: null; + periodic_indexing_enabled: boolean; + indexing_frequency_minutes: number | null; + next_scheduled_at: null; + startDate?: Date; + endDate?: Date; + periodicEnabled?: boolean; + frequencyMinutes?: string; + }, + onIndexingStart?: (connectorId: number) => void + ) => { if (!searchSpaceId || !connectingConnectorType) return; // Prevent multiple submissions using ref for immediate check @@ -603,6 +606,11 @@ export const useConnectorDialog = () => { }); } + // Notify caller that indexing is starting (for UI syncing state) + if (onIndexingStart) { + onIndexingStart(connector.id); + } + // Start indexing (backend will use defaults if dates are undefined) const startDateStr = startDateForIndexing ? format(startDateForIndexing, "yyyy-MM-dd") diff --git a/surfsense_web/components/assistant-ui/connector-popup/tabs/active-connectors-tab.tsx b/surfsense_web/components/assistant-ui/connector-popup/tabs/active-connectors-tab.tsx index 8188e6723..ed4d377fb 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/tabs/active-connectors-tab.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/tabs/active-connectors-tab.tsx @@ -174,10 +174,10 @@ export const ActiveConnectorsTab: FC = ({
= ({
= ({
{tooltip} diff --git a/surfsense_web/components/ui/tooltip.tsx b/surfsense_web/components/ui/tooltip.tsx index e1aa458e6..871ce9ed5 100644 --- a/surfsense_web/components/ui/tooltip.tsx +++ b/surfsense_web/components/ui/tooltip.tsx @@ -42,7 +42,7 @@ function TooltipContent({ data-slot="tooltip-content" sideOffset={sideOffset} className={cn( - "bg-popover text-popover-foreground fill-popover shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance", + "bg-black text-white font-medium shadow-xl px-3 py-1.5 dark:bg-zinc-800 dark:text-zinc-50 border-none animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md text-xs text-balance", className )} {...props}