From de17ef7f44946dec8a6a825b90bb2ce9bc963036 Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Sun, 22 Mar 2026 03:17:05 -0700 Subject: [PATCH 1/5] style: update GitHub stars badge appearance with improved spacing and color adjustments --- .../components/homepage/github-stars-badge.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/surfsense_web/components/homepage/github-stars-badge.tsx b/surfsense_web/components/homepage/github-stars-badge.tsx index c22c4eb82..e11d6ff2d 100644 --- a/surfsense_web/components/homepage/github-stars-badge.tsx +++ b/surfsense_web/components/homepage/github-stars-badge.tsx @@ -272,19 +272,17 @@ function NavbarGitHubStars({ target="_blank" rel="noopener noreferrer" className={cn( - "group flex items-center gap-1.5 rounded-lg px-1 py-1 hover:bg-gray-100 dark:hover:bg-neutral-800/50 transition-colors", + "group flex items-center gap-1 rounded-lg px-2 py-1 hover:bg-gray-100 dark:hover:bg-neutral-800/50 transition-colors", className )} > - - - - + + ); } From 009e89e5cd90d8da6651bfaab7965ee17ac2a694 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Mon, 23 Mar 2026 03:39:08 +0530 Subject: [PATCH 2/5] refactor: simplify audio component by removing dropdown menu and integrating download button directly --- surfsense_web/components/tool-ui/audio.tsx | 33 ++++++---------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/surfsense_web/components/tool-ui/audio.tsx b/surfsense_web/components/tool-ui/audio.tsx index 5ab53a096..f07aa3cf6 100644 --- a/surfsense_web/components/tool-ui/audio.tsx +++ b/surfsense_web/components/tool-ui/audio.tsx @@ -2,7 +2,6 @@ import { DownloadIcon, - EllipsisVerticalIcon, PauseIcon, PlayIcon, Volume2Icon, @@ -10,12 +9,6 @@ import { } from "lucide-react"; import { useCallback, useEffect, useRef, useState } from "react"; import { Button } from "@/components/ui/button"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu"; import { Slider } from "@/components/ui/slider"; import { cn } from "@/lib/utils"; @@ -189,23 +182,15 @@ export function Audio({ id, src, title, durationMs, className }: AudioProps) {

{title}

- - - - - - - - Download - - - +
From af5215fa440502f831320093821f402707852bbe Mon Sep 17 00:00:00 2001 From: Rohan Verma <122026167+MODSetter@users.noreply.github.com> Date: Sun, 22 Mar 2026 18:20:47 -0700 Subject: [PATCH 3/5] Update video link in README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ad66e0d9..c593e761e 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,8 @@ https://github.com/user-attachments/assets/cc0c84d3-1f2f-4f7a-b519-2ecce22310b1 ## Video Agent Sample -https://github.com/user-attachments/assets/cc977e6d-8292-4ffe-abb8-3b0560ef5562 + +https://github.com/user-attachments/assets/012a7ffa-6f76-4f06-9dda-7632b470057a From b240057c619a34740eb9793c8891f674142f7e12 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Mon, 23 Mar 2026 23:29:16 -0700 Subject: [PATCH 4/5] fix: gate console.log calls behind development check Wraps unguarded console.log statements in use-connectors-electric, mcp-config-validator, and ElectricProvider behind an IS_DEV guard, matching the existing pattern in lib/electric/client.ts. Keeps console.error calls untouched so real errors still surface. Fixes #904 --- .../connector-popup/utils/mcp-config-validator.ts | 8 +++++--- surfsense_web/components/providers/ElectricProvider.tsx | 8 +++++--- surfsense_web/hooks/use-connectors-electric.ts | 6 ++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/surfsense_web/components/assistant-ui/connector-popup/utils/mcp-config-validator.ts b/surfsense_web/components/assistant-ui/connector-popup/utils/mcp-config-validator.ts index 650a95e3d..87bd5815e 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/utils/mcp-config-validator.ts +++ b/surfsense_web/components/assistant-ui/connector-popup/utils/mcp-config-validator.ts @@ -33,6 +33,8 @@ import { z } from "zod"; import type { MCPServerConfig, MCPToolDefinition } from "@/contracts/types/mcp.types"; import { connectorsApiService } from "@/lib/apis/connectors-api.service"; +const IS_DEV = process.env.NODE_ENV === "development"; + /** * Zod schema for MCP server configuration * Supports both stdio (local process) and HTTP (remote server) transports @@ -102,11 +104,11 @@ export const parseMCPConfig = (configJson: string): MCPConfigValidationResult => // Check cache first const cached = configCache.get(configJson); if (cached && Date.now() - cached.timestamp < CACHE_TTL) { - console.log("[MCP Validator] ✅ Using cached config"); + if (IS_DEV) console.log("[MCP Validator] ✅ Using cached config"); return { config: cached.config, error: null }; } - console.log("[MCP Validator] 🔍 Parsing new config..."); + if (IS_DEV) console.log("[MCP Validator] 🔍 Parsing new config..."); // Clean up expired cache entries periodically if (configCache.size > 100) { @@ -176,7 +178,7 @@ export const parseMCPConfig = (configJson: string): MCPConfigValidationResult => timestamp: Date.now(), }); - console.log("[MCP Validator] ✅ Config parsed successfully:", config); + if (IS_DEV) console.log("[MCP Validator] ✅ Config parsed successfully:", config); return { config, diff --git a/surfsense_web/components/providers/ElectricProvider.tsx b/surfsense_web/components/providers/ElectricProvider.tsx index aded9533a..02005d098 100644 --- a/surfsense_web/components/providers/ElectricProvider.tsx +++ b/surfsense_web/components/providers/ElectricProvider.tsx @@ -14,6 +14,8 @@ import { } from "@/lib/electric/client"; import { ElectricContext } from "@/lib/electric/context"; +const IS_DEV = process.env.NODE_ENV === "development"; + interface ElectricProviderProps { children: React.ReactNode; } @@ -40,7 +42,7 @@ export function ElectricProvider({ children }: ElectricProviderProps) { // No user logged in - cleanup if previous user existed if (!isUserLoaded || !user?.id) { if (previousUserIdRef.current && isElectricInitialized()) { - console.log("[ElectricProvider] User logged out, cleaning up..."); + if (IS_DEV) console.log("[ElectricProvider] User logged out, cleaning up..."); cleanupElectric().then(() => { previousUserIdRef.current = null; setElectricClient(null); @@ -61,14 +63,14 @@ export function ElectricProvider({ children }: ElectricProviderProps) { async function init() { try { - console.log(`[ElectricProvider] Initializing for user: ${userId}`); + if (IS_DEV) console.log(`[ElectricProvider] Initializing for user: ${userId}`); const client = await initElectric(userId); if (mounted) { previousUserIdRef.current = userId; setElectricClient(client); setError(null); - console.log(`[ElectricProvider] ✅ Ready for user: ${userId}`); + if (IS_DEV) console.log(`[ElectricProvider] ✅ Ready for user: ${userId}`); } } catch (err) { console.error("[ElectricProvider] Failed to initialize:", err); diff --git a/surfsense_web/hooks/use-connectors-electric.ts b/surfsense_web/hooks/use-connectors-electric.ts index 951f1d15a..883186c3c 100644 --- a/surfsense_web/hooks/use-connectors-electric.ts +++ b/surfsense_web/hooks/use-connectors-electric.ts @@ -5,6 +5,8 @@ import type { SearchSourceConnector } from "@/contracts/types/connector.types"; import type { SyncHandle } from "@/lib/electric/client"; import { useElectricClient } from "@/lib/electric/context"; +const IS_DEV = process.env.NODE_ENV === "development"; + /** * Hook for managing connectors with Electric SQL real-time sync * @@ -72,7 +74,7 @@ export function useConnectorsElectric(searchSpaceId: number | string | null) { async function startSync() { try { - console.log("[useConnectorsElectric] Starting sync for search space:", searchSpaceId); + if (IS_DEV) console.log("[useConnectorsElectric] Starting sync for search space:", searchSpaceId); const handle = await electricClient.syncShape({ table: "search_source_connectors", @@ -80,7 +82,7 @@ export function useConnectorsElectric(searchSpaceId: number | string | null) { primaryKey: ["id"], }); - console.log("[useConnectorsElectric] Sync started:", { + if (IS_DEV) console.log("[useConnectorsElectric] Sync started:", { isUpToDate: handle.isUpToDate, }); From 15e9f113e5339520ffb4b2bf081520bf5c8026e2 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Mon, 23 Mar 2026 23:34:17 -0700 Subject: [PATCH 5/5] fix: add error logging to empty catch blocks in useMessagesElectric Replaces 4 silent catch blocks with console.warn calls so sync failures are observable in the browser console. Cleanup catches at lines 147/155 stay silent since PGlite may already be closed. Fixes #905 --- surfsense_web/hooks/use-messages-electric.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/surfsense_web/hooks/use-messages-electric.ts b/surfsense_web/hooks/use-messages-electric.ts index 728503de9..4928bed63 100644 --- a/surfsense_web/hooks/use-messages-electric.ts +++ b/surfsense_web/hooks/use-messages-electric.ts @@ -57,8 +57,8 @@ export function useMessagesElectric( handle.initialSyncPromise, new Promise((resolve) => setTimeout(resolve, 3000)), ]); - } catch { - // Timeout + } catch (err) { + console.warn("[useMessagesElectric] Sync timeout:", err); } } @@ -70,8 +70,8 @@ export function useMessagesElectric( syncHandleRef.current = handle; await fetchMessages(); await setupLiveQuery(); - } catch { - // Sync failed + } catch (err) { + console.warn("[useMessagesElectric] Sync failed:", err); } } @@ -88,8 +88,8 @@ export function useMessagesElectric( if (mounted && result.rows) { handleMessagesUpdate(result.rows); } - } catch { - // Query failed + } catch (err) { + console.warn("[useMessagesElectric] Query failed:", err); } } @@ -130,8 +130,8 @@ export function useMessagesElectric( liveQueryRef.current = liveQuery; } } - } catch { - // Live query failed + } catch (err) { + console.warn("[useMessagesElectric] Live query failed:", err); } }