From b7a6e3af3d2b342879fa915ca85ad5459892330f Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Mon, 18 May 2026 23:46:16 +0530 Subject: [PATCH] refactor: update alert components across various files to use a consistent structure and styling --- .../components/AgentPermissionsContent.tsx | 12 +- .../components/CommunityPromptsContent.tsx | 11 +- .../components/MemoryContent.tsx | 6 +- .../components/PromptsContent.tsx | 11 +- .../assistant-ui/connector-popup.tsx | 53 ++-- .../baidu-search-api-connect-form.tsx | 30 ++- .../components/bookstack-connect-form.tsx | 8 +- .../components/elasticsearch-connect-form.tsx | 241 +----------------- .../components/github-connect-form.tsx | 31 ++- .../components/linkup-api-connect-form.tsx | 28 +- .../components/luma-connect-form.tsx | 28 +- .../components/obsidian-connect-form.tsx | 23 +- .../components/searxng-connect-form.tsx | 30 ++- .../components/tavily-api-connect-form.tsx | 28 +- .../components/circleback-config.tsx | 8 +- .../components/clickup-config.tsx | 21 +- .../components/confluence-config.tsx | 25 +- .../components/discord-config.tsx | 20 +- .../components/jira-config.tsx | 25 +- .../components/obsidian-config.tsx | 28 +- .../components/slack-config.tsx | 21 +- .../components/teams-config.tsx | 21 +- .../components/webcrawler-config.tsx | 16 +- .../views/connector-edit-view.tsx | 21 +- .../views/indexing-configuration-view.tsx | 19 +- .../views/youtube-crawler-view.tsx | 9 +- .../assistant-ui/document-upload-popup.tsx | 49 ++-- .../public-chat-snapshots-manager.tsx | 10 +- .../settings/agent-model-manager.tsx | 38 +-- .../settings/general-settings-manager.tsx | 8 +- .../settings/image-model-manager.tsx | 38 +-- .../settings/prompt-config-manager.tsx | 30 +-- .../settings/team-memory-manager.tsx | 6 +- .../settings/vision-model-manager.tsx | 38 +-- 34 files changed, 372 insertions(+), 619 deletions(-) diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentPermissionsContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentPermissionsContent.tsx index b01f556ad..6d8233515 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentPermissionsContent.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/AgentPermissionsContent.tsx @@ -218,13 +218,13 @@ export function AgentPermissionsContent() { if (isError) { return ( -
- -

Failed to load rules

-

+ + + Failed to load rules + {error instanceof Error ? error.message : "Unknown error."} -

-
+ + ); } diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/CommunityPromptsContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/CommunityPromptsContent.tsx index 8fe8f40ed..d37ed409c 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/CommunityPromptsContent.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/CommunityPromptsContent.tsx @@ -5,6 +5,7 @@ import { AlertTriangle, Copy, Globe, Sparkles } from "lucide-react"; import { useCallback, useState } from "react"; import { copyPromptMutationAtom } from "@/atoms/prompts/prompts-mutation.atoms"; import { publicPromptsAtom } from "@/atoms/prompts/prompts-query.atoms"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/spinner"; @@ -44,11 +45,11 @@ export function CommunityPromptsContent() { if (isError) { return ( -
- -

Failed to load community prompts

-

Please try refreshing the page.

-
+ + + Failed to load community prompts + Please try refreshing the page. + ); } diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/MemoryContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/MemoryContent.tsx index 8ae2fd007..af3aefaff 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/MemoryContent.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/MemoryContent.tsx @@ -177,9 +177,9 @@ export function MemoryContent() { return (
- - - + + +

SurfSense uses this personal memory to personalize your responses across all conversations. diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PromptsContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PromptsContent.tsx index a3c824ea0..02edac148 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PromptsContent.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PromptsContent.tsx @@ -20,6 +20,7 @@ import { AlertDialogHeader, AlertDialogTitle, } from "@/components/ui/alert-dialog"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; @@ -133,11 +134,11 @@ export function PromptsContent() { if (isError) { return ( -

- -

Failed to load prompts

-

Please try refreshing the page.

-
+ + + Failed to load prompts + Please try refreshing the page. + ); } diff --git a/surfsense_web/components/assistant-ui/connector-popup.tsx b/surfsense_web/components/assistant-ui/connector-popup.tsx index ed671d374..9150fb35f 100644 --- a/surfsense_web/components/assistant-ui/connector-popup.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup.tsx @@ -380,33 +380,32 @@ export const ConnectorIndicator = forwardRef {/* LLM Configuration Warning */} {!llmConfigLoading && !hasDocumentSummaryLLM && ( - - - LLM Configuration Required - -

- {isAutoMode && !hasGlobalConfigs - ? "Auto mode requires a global LLM configuration. Please add one in Settings" - : "A Document Summary LLM is required to process uploads, configure one in Settings"} -

- -
-
+
+ + + LLM Configuration Required + +

+ {isAutoMode && !hasGlobalConfigs + ? "Auto mode requires a global LLM configuration. Please add one in Settings" + : "A Document Summary LLM is required to process uploads, configure one in Settings"} +

+ +
+
+
)} diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/baidu-search-api-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/baidu-search-api-connect-form.tsx index a4f145e06..d994b178d 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/baidu-search-api-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/baidu-search-api-connect-form.tsx @@ -70,20 +70,22 @@ export const BaiduSearchApiConnectForm: FC = ({ onSubmit, isSu return (
- - - API Key Required - - You'll need a Baidu AppBuilder API key to use this connector. You can get one by signing - up at{" "} - - qianfan.cloud.baidu.com - + + + API Key Required + +

+ You'll need a Baidu AppBuilder API key to use this connector. You can get one by + signing up at{" "} + + qianfan.cloud.baidu.com + +

diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/bookstack-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/bookstack-connect-form.tsx index b2a6b0b25..b885df39c 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/bookstack-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/bookstack-connect-form.tsx @@ -96,10 +96,10 @@ export const BookStackConnectForm: FC = ({ onSubmit, isSubmitt return (
- - - API Token Required - + + + API Token Required + You'll need a BookStack API Token to use this connector. You can create one from your BookStack instance settings. diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/elasticsearch-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/elasticsearch-connect-form.tsx index 352a8f3bc..943b2361d 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/elasticsearch-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/elasticsearch-connect-form.tsx @@ -172,10 +172,10 @@ export const ElasticsearchConnectForm: FC = ({ onSubmit, isSub return (
- - - API Key Required - + + + API Key Required + Enter your Elasticsearch cluster endpoint URL and authentication credentials to connect. @@ -428,10 +428,10 @@ export const ElasticsearchConnectForm: FC = ({ onSubmit, isSub
)} - - - Index Selection Tips - + + + Index Selection Tips +
  • Use wildcards like "logs-*" to match multiple indices
  • Separate multiple indices with commas
  • @@ -643,231 +643,6 @@ export const ElasticsearchConnectForm: FC = ({ onSubmit, isSub
)} - - {/* Documentation Section */} - - - - Documentation - - -
-

How it works

-

- The Elasticsearch connector allows you to search and retrieve documents from your - Elasticsearch cluster. Configure connection details, select specific indices, and - set search parameters to make your existing data searchable within SurfSense. -

-
- -
-
-

Connection Setup

-
-
-

- Step 1: Get your Elasticsearch endpoint -

-

- You'll need the endpoint URL for your Elasticsearch cluster. This typically - looks like: -

-
    -
  • - Cloud:{" "} - - https://your-cluster.es.region.aws.com:443 - -
  • -
  • - Self-hosted:{" "} - - https://elasticsearch.example.com:9200 - -
  • -
-
- -
-

- Step 2: Configure authentication -

-

- Elasticsearch requires authentication. You can use either: -

-
    -
  • - API Key: A base64-encoded API key. You can create one in - Elasticsearch by running: -
    -													POST /_security/api_key
    -												
    -
  • -
  • - Username & Password: Basic authentication using your - Elasticsearch username and password. -
  • -
-
- -
-

- Step 3: Select indices -

-

- Specify which indices to search. You can: -

-
    -
  • - Use wildcards: logs-*{" "} - to match multiple indices -
  • -
  • - List specific indices:{" "} - - logs-2024, documents-2024 - -
  • -
  • - Leave empty to search all accessible indices (not recommended for - performance) -
  • -
-
-
-
-
- -
-
-

Advanced Configuration

-
-
-

Search Query

-

- The default query used for searches. Use{" "} - * to match all - documents, or specify a more complex Elasticsearch query. -

-
- -
-

Search Fields

-

- Limit searches to specific fields for better performance. Common fields - include: -

-
    -
  • - title - Document - titles -
  • -
  • - content - Main content -
  • -
  • - description - - Descriptions -
  • -
-

- Leave empty to search all fields in your documents. -

-
- -
-

Maximum Documents

-

- Set a limit on the number of documents retrieved per search (1-10,000). This - helps control response times and resource usage. Leave empty to use - Elasticsearch's default limit. -

-
-
-
-
- -
-
-

Troubleshooting

-
-
-

Connection Issues

-
    -
  • - Invalid URL: Ensure your endpoint URL includes the protocol - (https://) and port number if required. -
  • -
  • - SSL/TLS Errors: Verify that your cluster uses HTTPS and the - certificate is valid. Self-signed certificates may require additional - configuration. -
  • -
  • - Connection Timeout: Check your network connectivity and - firewall settings. Ensure the Elasticsearch cluster is accessible from - SurfSense servers. -
  • -
-
- -
-

- Authentication Issues -

-
    -
  • - Invalid Credentials: Double-check your username/password or - API key. API keys must be base64-encoded. -
  • -
  • - Permission Denied: Ensure your API key or user account has - read permissions for the indices you want to search. -
  • -
  • - API Key Format: Elasticsearch API keys are typically - base64-encoded strings. Make sure you're using the full key value. -
  • -
-
- -
-

Search Issues

-
    -
  • - No Results: Verify that your index selection matches - existing indices. Use wildcards carefully. -
  • -
  • - Slow Searches: Limit the number of indices or use specific - index names instead of wildcards. Reduce the maximum documents limit. -
  • -
  • - Field Not Found: Ensure the search fields you specify - actually exist in your Elasticsearch documents. -
  • -
-
- - - - Need More Help? - - If you continue to experience issues, check your Elasticsearch cluster logs - and ensure your cluster version is compatible. For Elasticsearch Cloud - deployments, verify your access policies and IP allowlists. - - -
-
-
-
-
-
); }; diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/github-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/github-connect-form.tsx index 68d5ef5fb..56609dbdd 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/github-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/github-connect-form.tsx @@ -105,20 +105,23 @@ export const GithubConnectForm: FC = ({ onSubmit, isSubmitting return (
- - - Personal Access Token (Optional) - - A GitHub PAT is only required for private repositories. Public repos work without a token.{" "} - - Get your token - - {" "} + + + Personal Access Token (Optional) + +

+ A GitHub PAT is only required for private repositories. Public repos work without a + token.{" "} + + Get your token + + +

diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/linkup-api-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/linkup-api-connect-form.tsx index b9771e95a..46ec35b1f 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/linkup-api-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/linkup-api-connect-form.tsx @@ -70,19 +70,21 @@ export const LinkupApiConnectForm: FC = ({ onSubmit, isSubmitt return (
- - - API Key Required - - You'll need a Linkup API key to use this connector. You can get one by signing up at{" "} - - linkup.so - + + + API Key Required + +

+ You'll need a Linkup API key to use this connector. You can get one by signing up at{" "} + + linkup.so + +

diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/luma-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/luma-connect-form.tsx index 13cc7efe1..1c45e2dd7 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/luma-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/luma-connect-form.tsx @@ -88,19 +88,21 @@ export const LumaConnectForm: FC = ({ onSubmit, isSubmitting } return (
- - - API Key Required - - You'll need a Luma API Key to use this connector. You can create one from{" "} - - Luma API Settings - + + + API Key Required + +

+ You'll need a Luma API Key to use this connector. You can create one from{" "} + + Luma API Settings + +

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 59de2b7a4..695e97d7b 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,20 +1,17 @@ "use client"; import { Check, Copy, Info } from "lucide-react"; -import { type FC, useCallback, useRef, useState } from "react"; +import type { FC } from "react"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { EnumConnectorName } from "@/contracts/enums/connector"; import { useApiKey } from "@/hooks/use-api-key"; -import { copyToClipboard as copyToClipboardUtil } from "@/lib/utils"; import { getConnectorBenefits } from "../connector-benefits"; import type { ConnectFormProps } from "../index"; const PLUGIN_RELEASES_URL = "https://github.com/MODSetter/SurfSense/releases?q=obsidian&expanded=true"; -const BACKEND_URL = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL ?? "https://surfsense.com"; - /** * Obsidian connect form for the plugin-only architecture. * @@ -30,16 +27,6 @@ const BACKEND_URL = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL ?? "https://surf */ export const ObsidianConnectForm: FC = ({ onBack }) => { const { apiKey, isLoading, copied, copyToClipboard } = useApiKey(); - const [copiedUrl, setCopiedUrl] = useState(false); - const urlCopyTimerRef = useRef | undefined>(undefined); - - const copyServerUrl = useCallback(async () => { - const ok = await copyToClipboardUtil(BACKEND_URL); - if (!ok) return; - setCopiedUrl(true); - if (urlCopyTimerRef.current) clearTimeout(urlCopyTimerRef.current); - urlCopyTimerRef.current = setTimeout(() => setCopiedUrl(false), 2000); - }, []); const handleSubmit = (event: React.FormEvent) => { event.preventDefault(); @@ -52,10 +39,10 @@ export const ObsidianConnectForm: FC = ({ onBack }) => { that just closes the dialog (see component-level docstring). */}
- - - Plugin-based sync - + + + 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. diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/searxng-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/searxng-connect-form.tsx index 5ff54fb9e..727a1ef3f 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/searxng-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/searxng-connect-form.tsx @@ -123,20 +123,22 @@ export const SearxngConnectForm: FC = ({ onSubmit, isSubmittin return (
- - - SearxNG Instance Required - - You need access to a running SearxNG instance. Refer to the{" "} - - SearxNG installation guide - {" "} - for setup instructions. If your instance requires an API key, include it below. + + + SearxNG Instance Required + +

+ You need access to a running SearxNG instance. Refer to the{" "} + + SearxNG installation guide + {" "} + for setup instructions. If your instance requires an API key, include it below. +

diff --git a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/tavily-api-connect-form.tsx b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/tavily-api-connect-form.tsx index 57d183d44..11e5d8a03 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/tavily-api-connect-form.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connect-forms/components/tavily-api-connect-form.tsx @@ -70,19 +70,21 @@ export const TavilyApiConnectForm: FC = ({ onSubmit, isSubmitt return (
- - - API Key Required - - You'll need a Tavily API key to use this connector. You can get one by signing up at{" "} - - tavily.com - + + + API Key Required + +

+ You'll need a Tavily API key to use this connector. You can get one by signing up at{" "} + + tavily.com + +

diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/circleback-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/circleback-config.tsx index 268ab0f98..af818671a 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/circleback-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/circleback-config.tsx @@ -166,10 +166,10 @@ export const CirclebackConfig: FC = ({ connector, onNameC )} {webhookInfo && ( - - - Configuration Instructions - + + + Configuration Instructions + Configure this URL in Circleback Settings → Automations → Create automation → Send webhook request. The webhook will automatically send meeting notes, transcripts, and action items to this search space. diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/clickup-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/clickup-config.tsx index 9d203a33b..f5f75bbe8 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/clickup-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/clickup-config.tsx @@ -3,6 +3,7 @@ import { Info, KeyRound } from "lucide-react"; import type { FC } from "react"; import { useState } from "react"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import type { ConnectorConfigProps } from "../index"; @@ -47,21 +48,17 @@ export const ClickUpConfig: FC = ({ return (
{/* OAuth Info */} -
-
- -
-
-

Connected via OAuth

-

+ + + Connected via OAuth + +

Workspace:{" "} {workspaceName}

-

- To update your connection, reconnect this connector. -

-
-
+

To update your connection, reconnect this connector.

+ +
); } diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/confluence-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/confluence-config.tsx index 040479211..b098f3694 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/confluence-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/confluence-config.tsx @@ -3,6 +3,7 @@ import { Info, KeyRound } from "lucide-react"; import type { FC } from "react"; import { useState } from "react"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import type { ConnectorConfigProps } from "../index"; @@ -72,23 +73,17 @@ export const ConfluenceConfig: FC = ({ return (
{/* OAuth Info */} -
-
- -
-
-

Connected via OAuth

-

- This connector is authenticated using OAuth 2.0. Your Confluence instance is: -

-

+ + + Connected via OAuth + +

This connector is authenticated using OAuth 2.0. Your Confluence instance is:

+

{siteUrl}

-

- To update your connection, reconnect this connector. -

-
-
+

To update your connection, reconnect this connector.

+ +
); } diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/discord-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/discord-config.tsx index 3c00a1603..93fc3ff81 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/discord-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/discord-config.tsx @@ -2,6 +2,7 @@ import { AlertCircle, CheckCircle2, Hash, Info, Megaphone, RefreshCw } from "lucide-react"; import { type FC, useCallback, useEffect, useState } from "react"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/spinner"; import { connectorsApiService, type DiscordChannel } from "@/lib/apis/connectors-api.service"; @@ -73,17 +74,14 @@ export const DiscordConfig: FC = ({ connector }) => { return (
{/* Info box */} -
-
- -
-
-

- The bot needs "Read Message History" permission to access channels. Ask a - server admin to grant this permission for channels shown below. -

-
-
+ + + Grant Channel Permissions + + The bot needs "Read Message History" permission to access channels. Ask a server + admin to grant this permission for channels shown below. + + {/* Channels Section */}
diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/jira-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/jira-config.tsx index c43bd1524..bbabb195a 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/jira-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/jira-config.tsx @@ -3,6 +3,7 @@ import { Info, KeyRound } from "lucide-react"; import type { FC } from "react"; import { useState } from "react"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import type { ConnectorConfigProps } from "../index"; @@ -65,23 +66,17 @@ export const JiraConfig: FC = ({ connector, onConfigChange, onN return (
{/* OAuth Info */} -
-
- -
-
-

Connected via OAuth

-

- This connector is authenticated using OAuth 2.0. Your Jira instance is: -

-

+ + + Connected via OAuth + +

This connector is authenticated using OAuth 2.0. Your Jira instance is:

+

{baseUrl}

-

- To update your connection, reconnect this connector. -

-
-
+

To update your connection, reconnect this 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 094eb3aa0..de7ea8230 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 @@ -47,12 +47,10 @@ export const ObsidianConfig: FC = ({ connector }) => { const LegacyBanner: FC = () => { return (
- - - - Sync stopped, install the plugin to migrate - - + + + Sync stopped, install the plugin to migrate + This Obsidian connector used the legacy server-path scanner, which has been removed. The notes already indexed remain searchable, but they no longer reflect changes made in your vault. @@ -124,10 +122,10 @@ const PluginStats: FC<{ config: Record }> = ({ config }) => { return (
- - - Plugin connected - + + + Plugin connected + Your notes stay synced automatically. To stop syncing, disable or uninstall the plugin in Obsidian, or delete this connector. @@ -152,11 +150,11 @@ const PluginStats: FC<{ config: Record }> = ({ config }) => { const UnknownConnectorState: FC = () => ( - - Unrecognized config - - This connector has neither plugin metadata nor a legacy marker. It may predate migration — you - can safely delete it and re-install the SurfSense Obsidian plugin to resume syncing. + + Unrecognized config + + This connector is missing plugin metadata and may predate the Obsidian plugin migration. You + can safely delete it and reinstall the SurfSense Obsidian plugin to resume syncing. ); diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/slack-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/slack-config.tsx index e7a03423b..a5700c668 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/slack-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/slack-config.tsx @@ -2,6 +2,7 @@ import { AlertCircle, CheckCircle2, Hash, Info, Lock, RefreshCw } from "lucide-react"; import { type FC, useCallback, useEffect, useState } from "react"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/spinner"; import { connectorsApiService, type SlackChannel } from "@/lib/apis/connectors-api.service"; @@ -74,20 +75,18 @@ export const SlackConfig: FC = ({ connector }) => { return (
{/* Info box */} -
-
- -
-
-

Add Bot to Channels

-

+ + + Add Bot to Channels + +

Before indexing, add the SurfSense bot to each channel you want to index. The bot can only access messages from channels it's been added to. Type{" "} - /invite @SurfSense in - any channel to add it. + /invite @SurfSense{" "} + in any channel to add it.

-
-
+ + {/* Channels Section */}
diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/teams-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/teams-config.tsx index 06ce21dae..aae517098 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/teams-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/teams-config.tsx @@ -2,6 +2,7 @@ import { Info } from "lucide-react"; import type { FC } from "react"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import type { ConnectorConfigProps } from "../index"; export interface TeamsConfigProps extends ConnectorConfigProps { @@ -11,19 +12,17 @@ export interface TeamsConfigProps extends ConnectorConfigProps { export const TeamsConfig: FC = () => { return (
-
-
- -
-
-

Microsoft Teams Access

-

+ + + Microsoft Teams Access + +

Your agent can search and read messages from Teams channels you have access to, and send - messages on your behalf. Make sure you're a member of the teams you want to interact - with. + messages on your behalf. Make sure you're a member of the teams you want to + interact with.

-
-
+ +
); }; diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/webcrawler-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/webcrawler-config.tsx index 365d1c020..b7fbae91c 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/webcrawler-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/webcrawler-config.tsx @@ -52,13 +52,13 @@ export const WebcrawlerConfig: FC = ({ connector, onConfig
{/* Chat tip */} -
- -

+ + + Want a quick answer from a webpage without indexing it? Just paste the URL directly into the chat instead. -

-
+ + {/* API Key Field */}
@@ -116,9 +116,9 @@ export const WebcrawlerConfig: FC = ({ connector, onConfig
{/* Info Alert */} - - - + + + Configuration is saved when you start indexing. You can update these settings anytime from the connector management page. 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 2f69df79c..b64f97414 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 @@ -5,6 +5,7 @@ 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"; +import { Alert, AlertDescription } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/spinner"; import { EnumConnectorName } from "@/contracts/enums/connector"; @@ -350,20 +351,12 @@ export const ConnectorEditView: FC = ({ {/* Info box - hidden for live connectors */} {connector.is_indexable && !isLive && ( -
-
- -
-
-

- Re-indexing runs in the background -

-

- You can continue using SurfSense while we sync your data. Check inbox for - updates. -

-
-
+ + + + You can continue using SurfSense while we sync your data. Check inbox for updates. + + )}
diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/indexing-configuration-view.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/indexing-configuration-view.tsx index cf8f32ee4..74b4fad9f 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/indexing-configuration-view.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/indexing-configuration-view.tsx @@ -2,6 +2,7 @@ import { ArrowLeft, Check, Info } from "lucide-react"; import { type FC, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { Alert, AlertDescription } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/spinner"; import { EnumConnectorName } from "@/contracts/enums/connector"; @@ -230,18 +231,12 @@ export const IndexingConfigurationView: FC = ({ {/* Info box - hidden for live connectors */} {connector?.is_indexable && !isLive && ( -
-
- -
-
-

Indexing runs in the background

-

- You can continue using SurfSense while we sync your data. Check inbox for - updates. -

-
-
+ + + + You can continue using SurfSense while we sync your data. Check inbox for updates. + + )}
diff --git a/surfsense_web/components/assistant-ui/connector-popup/views/youtube-crawler-view.tsx b/surfsense_web/components/assistant-ui/connector-popup/views/youtube-crawler-view.tsx index 576d858d1..5bffa0dfe 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/views/youtube-crawler-view.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/views/youtube-crawler-view.tsx @@ -7,6 +7,7 @@ import { useTranslations } from "next-intl"; import { type FC, useCallback, useState } from "react"; import { toast } from "sonner"; import { createDocumentMutationAtom } from "@/atoms/documents/document-mutation.atoms"; +import { Alert, AlertDescription } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Label } from "@/components/ui/label"; import { Spinner } from "@/components/ui/spinner"; @@ -279,10 +280,10 @@ export const YouTubeCrawlerView: FC = ({ searchSpaceId, {error &&
{error}
} -
- -

{t("chat_tip")}

-
+ + + {t("chat_tip")} +

{t("tips_title")}

diff --git a/surfsense_web/components/assistant-ui/document-upload-popup.tsx b/surfsense_web/components/assistant-ui/document-upload-popup.tsx index d4482a01b..0067e25b6 100644 --- a/surfsense_web/components/assistant-ui/document-upload-popup.tsx +++ b/surfsense_web/components/assistant-ui/document-upload-popup.tsx @@ -147,31 +147,30 @@ const DocumentUploadPopupContent: FC<{
{!isLoading && !hasDocumentSummaryLLM ? ( - - - LLM Configuration Required - -

- {isAutoMode && !hasGlobalConfigs - ? "Auto mode requires a global LLM configuration. Please add one in Settings" - : "A Document Summary LLM is required to process uploads, configure one in Settings"} -

- -
-
+
+ + + LLM Configuration Required + +

+ {isAutoMode && !hasGlobalConfigs + ? "Auto mode requires a global LLM configuration. Please add one in Settings" + : "A Document Summary LLM is required to process uploads, configure one in Settings"} +

+ +
+
+
) : ( )} diff --git a/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx b/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx index cb7be1376..e0d2f52a9 100644 --- a/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx +++ b/surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx @@ -128,8 +128,8 @@ export function PublicChatSnapshotsManager({ // Permission denied if (!canView) { return ( - - + + You don't have permission to view public chat links in this search space. @@ -141,9 +141,9 @@ export function PublicChatSnapshotsManager({ return (
- - - + + + Public chat links allow anyone with the URL to view a snapshot of a chat. These links do not update when the original chat changes. diff --git a/surfsense_web/components/settings/agent-model-manager.tsx b/surfsense_web/components/settings/agent-model-manager.tsx index 6f11a9ffe..c9a5b9f54 100644 --- a/surfsense_web/components/settings/agent-model-manager.tsx +++ b/surfsense_web/components/settings/agent-model-manager.tsx @@ -152,26 +152,30 @@ export function AgentModelManager({ searchSpaceId }: AgentModelManagerProps) { {/* Read-only / Limited permissions notice */} {access && !isLoading && isReadOnly && (
- - - - You have read-only access to LLM configurations. - Contact a space owner to request additional permissions. + + + +

+ You have read-only access to LLM + configurations. Contact a space owner to request additional permissions. +

)} {access && !isLoading && !isReadOnly && (!canCreate || !canUpdate || !canDelete) && (
- - - - You can{" "} - {[canCreate && "create", canUpdate && "edit", canDelete && "delete"] - .filter(Boolean) - .join(" and ")}{" "} - configurations - {!canDelete && ", but cannot delete them"}. + + + +

+ You can{" "} + {[canCreate && "create", canUpdate && "edit", canDelete && "delete"] + .filter(Boolean) + .join(" and ")}{" "} + configurations + {!canDelete && ", but cannot delete them"}. +

@@ -179,9 +183,9 @@ export function AgentModelManager({ searchSpaceId }: AgentModelManagerProps) { {/* Global Configs Info */} {globalConfigs.length > 0 && ( - - - + + +

{globalConfigs.length} global {globalConfigs.length === 1 ? "model" : "models"} diff --git a/surfsense_web/components/settings/general-settings-manager.tsx b/surfsense_web/components/settings/general-settings-manager.tsx index 796746f75..02791e4a0 100644 --- a/surfsense_web/components/settings/general-settings-manager.tsx +++ b/surfsense_web/components/settings/general-settings-manager.tsx @@ -135,11 +135,9 @@ export function GeneralSettingsManager({ searchSpaceId }: GeneralSettingsManager return (

- - - - Update your search space name and description. - + + + Update your search space name and description. diff --git a/surfsense_web/components/settings/image-model-manager.tsx b/surfsense_web/components/settings/image-model-manager.tsx index e6c5f375e..4ee22dd52 100644 --- a/surfsense_web/components/settings/image-model-manager.tsx +++ b/surfsense_web/components/settings/image-model-manager.tsx @@ -153,26 +153,30 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) { {/* Read-only / Limited permissions notice */} {access && !isLoading && isReadOnly && (
- - - - You have read-only access to image generation - configurations. Contact a space owner to request additional permissions. + + + +

+ You have read-only access to image generation + configurations. Contact a space owner to request additional permissions. +

)} {access && !isLoading && !isReadOnly && (!canCreate || !canDelete) && (
- - - - You can{" "} - {[canCreate && "create and edit", canDelete && "delete"] - .filter(Boolean) - .join(" and ")}{" "} - image model configurations - {!canDelete && ", but cannot delete them"}. + + + +

+ You can{" "} + {[canCreate && "create and edit", canDelete && "delete"] + .filter(Boolean) + .join(" and ")}{" "} + image model configurations + {!canDelete && ", but cannot delete them"}. +

@@ -180,9 +184,9 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) { {/* Global info */} {globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length > 0 && ( - - - + + +

{globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length}{" "} diff --git a/surfsense_web/components/settings/prompt-config-manager.tsx b/surfsense_web/components/settings/prompt-config-manager.tsx index 6bc77faa2..04e20fe17 100644 --- a/surfsense_web/components/settings/prompt-config-manager.tsx +++ b/surfsense_web/components/settings/prompt-config-manager.tsx @@ -4,7 +4,7 @@ import { useQuery } from "@tanstack/react-query"; import { AlertTriangle, Info } from "lucide-react"; import { useEffect, useState } from "react"; import { toast } from "sonner"; -import { Alert, AlertDescription } from "@/components/ui/alert"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Label } from "@/components/ui/label"; @@ -102,21 +102,19 @@ export function PromptConfigManager({ searchSpaceId }: PromptConfigManagerProps) return (

{/* Work in Progress Notice */} - - - - Work in Progress: This functionality is currently - under development and not yet connected to the backend. Your instructions will be saved - but won't affect AI behavior until the feature is fully implemented. + + + Work in Progress + + This functionality is currently under development and not yet connected to the backend. + Your instructions will be saved but won't affect AI behavior until the feature is fully + implemented. - - - + + + System instructions apply to all AI interactions in this search space. They guide how the AI responds, its tone, focus areas, and behavior patterns. @@ -167,9 +165,9 @@ export function PromptConfigManager({ searchSpaceId }: PromptConfigManagerProps)
{customInstructions.trim().length === 0 && ( - - - + + + No system instructions are currently set. The AI will use default behavior. diff --git a/surfsense_web/components/settings/team-memory-manager.tsx b/surfsense_web/components/settings/team-memory-manager.tsx index 534687326..effc6a148 100644 --- a/surfsense_web/components/settings/team-memory-manager.tsx +++ b/surfsense_web/components/settings/team-memory-manager.tsx @@ -183,9 +183,9 @@ export function TeamMemoryManager({ searchSpaceId }: TeamMemoryManagerProps) { return (
- - - + + +

SurfSense uses this shared memory to provide team-wide context across all conversations in this search space. diff --git a/surfsense_web/components/settings/vision-model-manager.tsx b/surfsense_web/components/settings/vision-model-manager.tsx index 0e528094e..167c5b31d 100644 --- a/surfsense_web/components/settings/vision-model-manager.tsx +++ b/surfsense_web/components/settings/vision-model-manager.tsx @@ -155,35 +155,39 @@ export function VisionModelManager({ searchSpaceId }: VisionModelManagerProps) { {access && !isLoading && isReadOnly && (

- - - - You have read-only access to vision model - configurations. Contact a space owner to request additional permissions. + + + +

+ You have read-only access to vision model + configurations. Contact a space owner to request additional permissions. +

)} {access && !isLoading && !isReadOnly && (!canCreate || !canDelete) && (
- - - - You can{" "} - {[canCreate && "create and edit", canDelete && "delete"] - .filter(Boolean) - .join(" and ")}{" "} - vision model configurations - {!canDelete && ", but cannot delete them"}. + + + +

+ You can{" "} + {[canCreate && "create and edit", canDelete && "delete"] + .filter(Boolean) + .join(" and ")}{" "} + vision model configurations + {!canDelete && ", but cannot delete them"}. +

)} {globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length > 0 && ( - - - + + +

{globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length}{" "}