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
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/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
)}
>
-
-
-
-
+
+
);
}
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/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
-
-
-
+
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,
});
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);
}
}