From ae264290d040defd8fcd447e9e7f31a8ea14a57f Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Wed, 22 Apr 2026 06:07:38 +0530 Subject: [PATCH] feat: update Obsidian connector UI and improve user instructions --- .../components/obsidian-connect-form.tsx | 239 ++++++++---------- .../components/obsidian-config.tsx | 8 +- .../views/connector-connect-view.tsx | 4 +- 3 files changed, 117 insertions(+), 134 deletions(-) diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/obsidian-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/obsidian-connect-form.tsx index 49c68ba39..689684c51 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/obsidian-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/obsidian-connect-form.tsx @@ -1,6 +1,6 @@ "use client"; -import { Check, Copy, Download, Info, KeyRound, Settings2 } from "lucide-react"; +import { Check, Copy, Info } from "lucide-react"; import { type FC, useCallback, useRef, useState } from "react"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; @@ -55,145 +55,126 @@ export const ObsidianConnectForm: FC = ({ onBack }) => { that just closes the dialog (see component-level docstring). */}
- + Plugin-based sync SurfSense now syncs Obsidian via an official plugin that runs inside Obsidian itself. Works on desktop and mobile, in cloud and self-hosted - deployments — no server-side vault mounts required. + deployments. - {/* Step 1 — Install plugin */}
-
-
- 1 -
-

Install the plugin

-
-

- Grab the latest SurfSense plugin release. Once it's in the community - store, you'll also be able to install it from{" "} - Settings → Community plugins{" "} - inside Obsidian. -

- - - -
- - {/* Step 2 — Copy API key */} -
-
-
- 2 -
-

- Copy your API key -

- -
-

- Paste this into the plugin's API token{" "} - setting. The token expires after 24 hours; long-lived personal access - tokens are coming in a future release. -

- - {isLoading ? ( -
- ) : apiKey ? ( -
-
-

- {apiKey} -

-
- -
- ) : ( -

- No API key available — try refreshing the page. -

- )} -
- - {/* Step 3 — Server URL */} -
-
-
- 3 -
-

- Point the plugin at this server -

-
-

- Paste this URL into the plugin's Server URL{" "} - setting. We auto-detect it from your current dashboard origin. -

-
-
-

- {BACKEND_URL} +

+ {/* Step 1 — Install plugin */} +
+
+
+ 1 +
+

Install the plugin

+
+

+ Grab the latest SurfSense plugin release. Once it's in the community + store, you'll also be able to install it from{" "} + Settings → Community plugins{" "} + inside Obsidian.

-
- -
-
+ + + + - {/* Step 4 — Pick search space */} -
-
-
- 4 -
-

- Pick this search space -

- -
-

- In the plugin's Search space{" "} - setting, choose the search space you want this vault to sync into. - The connector will appear here automatically once the plugin makes - its first sync. -

+
+ + {/* Step 2 — Copy API key */} +
+
+
+ 2 +
+

Copy your API key

+
+

+ Paste this into the plugin's API token{" "} + setting. The token expires after 24 hours. Long-lived personal access + tokens are coming in a future release. +

+ + {isLoading ? ( +
+ ) : apiKey ? ( +
+
+

+ {apiKey} +

+
+ +
+ ) : ( +

+ No API key available — try refreshing the page. +

+ )} +
+ +
+ + {/* Step 3 — Server URL */} +
+
+
+ 3 +
+

Point the plugin at this server

+
+

+ For SurfSense Cloud, use the default surfsense.com. + If you are self-hosting, set the plugin's{" "} + Server URL to your frontend domain. +

+
+ +
+ + {/* Step 4 — Pick search space */} +
+
+
+ 4 +
+

Pick this search space

+
+

+ In the plugin's Search space{" "} + setting, choose the search space you want this vault to sync into. + The connector will appear here automatically once the plugin makes + its first sync. +

+
+
{getConnectorBenefits(EnumConnectorName.OBSIDIAN_CONNECTOR) && ( diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/obsidian-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/obsidian-config.tsx index 33a7110c0..a9b98b76c 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/obsidian-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/obsidian-config.tsx @@ -130,20 +130,20 @@ const PluginStats: FC<{ config: Record }> = ({ config }) => { Plugin connected - Edits in Obsidian sync over HTTPS. To stop syncing, disable or uninstall the plugin in + Your notes stay synced automatically. To stop syncing, disable or uninstall the plugin in Obsidian, or delete this connector.
-
+

Vault status

{tileRows.map((stat) => (
-
+
{stat.label}
{stat.value}
diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-connect-view.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-connect-view.tsx index e58542923..5b82a8e88 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-connect-view.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-connect-view.tsx @@ -151,7 +151,9 @@ export const ConnectorConnectView: FC = ({ {connectorType === "MCP_CONNECTOR" ? "Connect" - : `Connect ${getConnectorTypeDisplay(connectorType)}`} + : connectorType === "OBSIDIAN_CONNECTOR" + ? "Done" + : `Connect ${getConnectorTypeDisplay(connectorType)}`} {isSubmitting && }