diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-edit-view.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-edit-view.tsx
index 256e9a4e7..11d7d37a7 100644
--- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-edit-view.tsx
+++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-edit-view.tsx
@@ -1,7 +1,7 @@
"use client";
import { useAtomValue } from "jotai";
-import { ArrowLeft, Info, RefreshCw, Trash2 } from "lucide-react";
+import { ArrowLeft, Info, RefreshCw } from "lucide-react";
import { type FC, useCallback, useEffect, useMemo, useRef, useState } from "react";
import { toast } from "sonner";
import { activeSearchSpaceIdAtom } from "@/atoms/search-spaces/search-space-query.atoms";
@@ -19,6 +19,14 @@ import { VisionLLMConfig } from "../../components/vision-llm-config";
import { getConnectorDisplayName } from "../../tabs/all-connectors-tab";
import { getConnectorConfigComponent } from "../index";
+const VISION_LLM_CONNECTOR_TYPES = new Set
([
+ EnumConnectorName.GOOGLE_DRIVE_CONNECTOR,
+ EnumConnectorName.COMPOSIO_GOOGLE_DRIVE_CONNECTOR,
+ EnumConnectorName.DROPBOX_CONNECTOR,
+ EnumConnectorName.ONEDRIVE_CONNECTOR,
+ EnumConnectorName.OBSIDIAN_CONNECTOR,
+]);
+
const REAUTH_ENDPOINTS: Partial> = {
[EnumConnectorName.LINEAR_CONNECTOR]: "/api/v1/auth/linear/connector/reauth",
[EnumConnectorName.NOTION_CONNECTOR]: "/api/v1/auth/notion/connector/reauth",
@@ -87,10 +95,9 @@ export const ConnectorEditView: FC = ({
const isAuthExpired = connector.config?.auth_expired === true;
const reauthEndpoint = REAUTH_ENDPOINTS[connector.connector_type];
const [reauthing, setReauthing] = useState(false);
- // Obsidian is plugin-driven: name + config are owned by the plugin, so
- // the web edit view has nothing the user can persist back. Hide Save
- // (and re-auth, which Obsidian never uses) entirely for that type.
- const isPluginManagedReadOnly = connector.connector_type === EnumConnectorName.OBSIDIAN_CONNECTOR;
+ const supportsVisionLlm = VISION_LLM_CONNECTOR_TYPES.has(connector.connector_type);
+ const showsAiToggles =
+ connector.is_indexable || connector.connector_type === EnumConnectorName.OBSIDIAN_CONNECTOR;
const handleReauth = useCallback(async () => {
const spaceId = searchSpaceId ?? searchSpaceIdAtom;
@@ -275,25 +282,23 @@ export const ConnectorEditView: FC = ({
/>
)}
- {/* Summary and sync settings - only shown for indexable connectors */}
- {connector.is_indexable && (
+ {/* Summary + vision toggles (Obsidian is plugin-push, non-indexable by design) */}
+ {showsAiToggles && (
<>
{/* AI Summary toggle */}
- {/* Vision LLM toggle - only for file-based connectors */}
- {(connector.connector_type === "GOOGLE_DRIVE_CONNECTOR" ||
- connector.connector_type === "COMPOSIO_GOOGLE_DRIVE_CONNECTOR" ||
- connector.connector_type === "DROPBOX_CONNECTOR" ||
- connector.connector_type === "ONEDRIVE_CONNECTOR") && (
+ {/* Vision LLM toggle for file/attachment connectors */}
+ {supportsVisionLlm && (
)}
- {/* Date range selector - not shown for file-based connectors (Drive, Dropbox, OneDrive), Webcrawler, GitHub, or Local Folder */}
- {connector.connector_type !== "GOOGLE_DRIVE_CONNECTOR" &&
+ {/* Date-range and periodic sync stay indexable-only */}
+ {connector.is_indexable &&
+ connector.connector_type !== "GOOGLE_DRIVE_CONNECTOR" &&
connector.connector_type !== "COMPOSIO_GOOGLE_DRIVE_CONNECTOR" &&
connector.connector_type !== "DROPBOX_CONNECTOR" &&
connector.connector_type !== "ONEDRIVE_CONNECTOR" &&
@@ -313,37 +318,40 @@ export const ConnectorEditView: FC = ({
/>
)}
- {(() => {
- const isGoogleDrive = connector.connector_type === "GOOGLE_DRIVE_CONNECTOR";
- const isComposioGoogleDrive =
- connector.connector_type === "COMPOSIO_GOOGLE_DRIVE_CONNECTOR";
- const requiresFolderSelection = isGoogleDrive || isComposioGoogleDrive;
- const selectedFolders =
- (connector.config?.selected_folders as
- | Array<{ id: string; name: string }>
- | undefined) || [];
- const selectedFiles =
- (connector.config?.selected_files as
- | Array<{ id: string; name: string }>
- | undefined) || [];
- const hasItemsSelected = selectedFolders.length > 0 || selectedFiles.length > 0;
- const isDisabled = requiresFolderSelection && !hasItemsSelected;
+ {connector.is_indexable &&
+ (() => {
+ const isGoogleDrive =
+ connector.connector_type === "GOOGLE_DRIVE_CONNECTOR";
+ const isComposioGoogleDrive =
+ connector.connector_type === "COMPOSIO_GOOGLE_DRIVE_CONNECTOR";
+ const requiresFolderSelection = isGoogleDrive || isComposioGoogleDrive;
+ const selectedFolders =
+ (connector.config?.selected_folders as
+ | Array<{ id: string; name: string }>
+ | undefined) || [];
+ const selectedFiles =
+ (connector.config?.selected_files as
+ | Array<{ id: string; name: string }>
+ | undefined) || [];
+ const hasItemsSelected =
+ selectedFolders.length > 0 || selectedFiles.length > 0;
+ const isDisabled = requiresFolderSelection && !hasItemsSelected;
- return (
-
- );
- })()}
+ return (
+
+ );
+ })()}
>
)}
@@ -412,11 +420,10 @@ export const ConnectorEditView: FC = ({
disabled={isSaving || isDisconnecting}
className="text-xs sm:text-sm flex-1 sm:flex-initial h-12 sm:h-auto py-3 sm:py-2"
>
-
Disconnect
)}
- {isPluginManagedReadOnly ? null : isAuthExpired && reauthEndpoint ? (
+ {isAuthExpired && reauthEndpoint ? (