From 5f7684499230d33f0b8a3419ab306efc6609529d Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Thu, 1 Jan 2026 22:08:20 +0530 Subject: [PATCH] refactor: update dashboard layout and enhance Circleback connector configuration - Modified the DashboardLayout to replace the "Sources" section with a "Documents" entry, improving navigation clarity. - Updated the CirclebackConfig component to include an Info icon for configuration instructions and adjusted the webhook URL input to be disabled for better user experience. - Enhanced the useConnectorDialog hook to handle non-indexable connectors more effectively, ensuring proper state management and user feedback. - Improved icon mapping in the app sidebar for consistency across components. --- .../dashboard/[search_space_id]/layout.tsx | 21 ++--- .../components/circleback-config.tsx | 9 ++- .../hooks/use-connector-dialog.ts | 77 ++++++++++++++----- .../components/sidebar/app-sidebar.tsx | 4 + 4 files changed, 76 insertions(+), 35 deletions(-) diff --git a/surfsense_web/app/dashboard/[search_space_id]/layout.tsx b/surfsense_web/app/dashboard/[search_space_id]/layout.tsx index afaa3abef..ae3c5ad9c 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/layout.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/layout.tsx @@ -30,24 +30,19 @@ export default function DashboardLayout({ { title: "Chat", url: `/dashboard/${search_space_id}/new-chat`, - icon: "SquareTerminal", + icon: "MessageCircle", items: [], }, - { - title: "Sources", - url: "#", - icon: "Database", - items: [ - { - title: "Manage Documents", - url: `/dashboard/${search_space_id}/documents`, - }, - ], - }, + { + title: "Documents", + url: `/dashboard/${search_space_id}/documents`, + icon: "SquareLibrary", + items: [], + }, { title: "Logs", url: `/dashboard/${search_space_id}/logs`, - icon: "FileText", + icon: "Logs", items: [], }, ]; 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 48e4b43e5..26c070b0b 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 @@ -1,6 +1,6 @@ "use client"; -import { Copy, Webhook, Check } from "lucide-react"; +import { Copy, Webhook, Check, Info } from "lucide-react"; import { useState, useEffect } from "react"; import type { FC } from "react"; import { Input } from "@/components/ui/input"; @@ -107,11 +107,12 @@ export const CirclebackConfig: FC = ({