From 5c8769508f1b16a1d6981cb371e8b32f16d6cea2 Mon Sep 17 00:00:00 2001
From: "DESKTOP-RTLN3BA\\$punk"
Date: Tue, 31 Mar 2026 21:42:03 -0700
Subject: [PATCH] chore: linting
---
.../purchase-cancel/page.tsx | 13 ++++++++--
.../purchase-success/page.tsx | 9 ++++++-
.../components/PurchaseHistoryContent.tsx | 23 ++++++++++-------
.../tabs/all-connectors-tab.tsx | 25 +++++--------------
.../layout/ui/sidebar/NavSection.tsx | 5 +---
.../layout/ui/sidebar/PageUsageDisplay.tsx | 4 +--
.../components/settings/buy-pages-content.tsx | 20 +++++++--------
.../settings/more-pages-content.tsx | 20 +++++++++------
.../tool-ui/shared/media/sanitize-href.ts | 2 +-
surfsense_web/lib/apis/stripe-api.service.ts | 10 +++++---
surfsense_web/lib/env-config.ts | 1 -
11 files changed, 71 insertions(+), 61 deletions(-)
diff --git a/surfsense_web/app/dashboard/[search_space_id]/purchase-cancel/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/purchase-cancel/page.tsx
index 790227986..0e5224700 100644
--- a/surfsense_web/app/dashboard/[search_space_id]/purchase-cancel/page.tsx
+++ b/surfsense_web/app/dashboard/[search_space_id]/purchase-cancel/page.tsx
@@ -4,7 +4,14 @@ import { CircleSlash2 } from "lucide-react";
import Link from "next/link";
import { useParams } from "next/navigation";
import { Button } from "@/components/ui/button";
-import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
export default function PurchaseCancelPage() {
const params = useParams();
@@ -16,7 +23,9 @@ export default function PurchaseCancelPage() {
Checkout canceled
- No charge was made and your current pages are unchanged.
+
+ No charge was made and your current pages are unchanged.
+
You can return to the pricing options and try again whenever you're ready.
diff --git a/surfsense_web/app/dashboard/[search_space_id]/purchase-success/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/purchase-success/page.tsx
index 6f46602c6..82c6f8c74 100644
--- a/surfsense_web/app/dashboard/[search_space_id]/purchase-success/page.tsx
+++ b/surfsense_web/app/dashboard/[search_space_id]/purchase-success/page.tsx
@@ -7,7 +7,14 @@ import { useParams } from "next/navigation";
import { useEffect } from "react";
import { USER_QUERY_KEY } from "@/atoms/user/user-query.atoms";
import { Button } from "@/components/ui/button";
-import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
export default function PurchaseSuccessPage() {
const params = useParams();
diff --git a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PurchaseHistoryContent.tsx b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PurchaseHistoryContent.tsx
index 833f06201..2eb56520b 100644
--- a/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PurchaseHistoryContent.tsx
+++ b/surfsense_web/app/dashboard/[search_space_id]/user-settings/components/PurchaseHistoryContent.tsx
@@ -17,9 +17,18 @@ import { stripeApiService } from "@/lib/apis/stripe-api.service";
import { cn } from "@/lib/utils";
const STATUS_STYLES: Record = {
- completed: { label: "Completed", className: "bg-emerald-600 text-white border-transparent hover:bg-emerald-600" },
- pending: { label: "Pending", className: "bg-yellow-600 text-white border-transparent hover:bg-yellow-600" },
- failed: { label: "Failed", className: "bg-destructive text-white border-transparent hover:bg-destructive" },
+ completed: {
+ label: "Completed",
+ className: "bg-emerald-600 text-white border-transparent hover:bg-emerald-600",
+ },
+ pending: {
+ label: "Pending",
+ className: "bg-yellow-600 text-white border-transparent hover:bg-yellow-600",
+ },
+ failed: {
+ label: "Failed",
+ className: "bg-destructive text-white border-transparent hover:bg-destructive",
+ },
};
function formatDate(iso: string): string {
@@ -82,9 +91,7 @@ export function PurchaseHistoryContent() {
const style = STATUS_STYLES[p.status];
return (
-
- {formatDate(p.created_at)}
-
+ {formatDate(p.created_at)}
{p.pages_granted.toLocaleString()}
@@ -92,9 +99,7 @@ export function PurchaseHistoryContent() {
{formatAmount(p)}
-
- {style.label}
-
+ {style.label}
);
diff --git a/surfsense_web/components/assistant-ui/connector-popup/tabs/all-connectors-tab.tsx b/surfsense_web/components/assistant-ui/connector-popup/tabs/all-connectors-tab.tsx
index 5e671b359..ad2418865 100644
--- a/surfsense_web/components/assistant-ui/connector-popup/tabs/all-connectors-tab.tsx
+++ b/surfsense_web/components/assistant-ui/connector-popup/tabs/all-connectors-tab.tsx
@@ -160,10 +160,7 @@ export const AllConnectorsTab: FC = ({
: [];
const accountCount = typeConnectors.length;
- const documentCount = getDocumentCountForConnector(
- connector.connectorType,
- documentTypeCounts
- );
+ const documentCount = getDocumentCountForConnector(connector.connectorType, documentTypeCounts);
const isIndexing = typeConnectors.some((c) => indexingConnectorIds?.has(c.id));
return (
@@ -199,18 +196,14 @@ export const AllConnectorsTab: FC = ({
)
: undefined;
- const documentCount = getDocumentCountForConnector(
- connector.connectorType,
- documentTypeCounts
- );
+ const documentCount = getDocumentCountForConnector(connector.connectorType, documentTypeCounts);
const isIndexing = actualConnector && indexingConnectorIds?.has(actualConnector.id);
const isMCP = connector.connectorType === EnumConnectorName.MCP_CONNECTOR;
const mcpConnectorCount =
isMCP && allConnectors
? allConnectors.filter(
- (c: SearchSourceConnector) =>
- c.connector_type === EnumConnectorName.MCP_CONNECTOR
+ (c: SearchSourceConnector) => c.connector_type === EnumConnectorName.MCP_CONNECTOR
).length
: undefined;
@@ -231,9 +224,7 @@ export const AllConnectorsTab: FC = ({
connectorCount={mcpConnectorCount}
isIndexing={isIndexing}
onConnect={handleConnect}
- onManage={
- actualConnector && onManage ? () => onManage(actualConnector) : undefined
- }
+ onManage={actualConnector && onManage ? () => onManage(actualConnector) : undefined}
/>
);
};
@@ -241,9 +232,7 @@ export const AllConnectorsTab: FC = ({
const renderCrawlerCard = (crawler: CrawlerConnector) => {
const isYouTube = crawler.id === "youtube-crawler";
const isWebcrawler = crawler.id === "webcrawler-connector";
- const isConnected = crawler.connectorType
- ? connectedTypes.has(crawler.connectorType)
- : false;
+ const isConnected = crawler.connectorType ? connectedTypes.has(crawler.connectorType) : false;
const isConnecting = connectingId === crawler.id;
const actualConnector =
@@ -283,9 +272,7 @@ export const AllConnectorsTab: FC = ({
documentCount={documentCount}
isIndexing={isIndexing}
onConnect={handleConnect}
- onManage={
- actualConnector && onManage ? () => onManage(actualConnector) : undefined
- }
+ onManage={actualConnector && onManage ? () => onManage(actualConnector) : undefined}
/>
);
};
diff --git a/surfsense_web/components/layout/ui/sidebar/NavSection.tsx b/surfsense_web/components/layout/ui/sidebar/NavSection.tsx
index ccbe8e738..0781a66c2 100644
--- a/surfsense_web/components/layout/ui/sidebar/NavSection.tsx
+++ b/surfsense_web/components/layout/ui/sidebar/NavSection.tsx
@@ -99,10 +99,7 @@ function StatusIcon({
if (status === "background_sync") {
return (
);
}
diff --git a/surfsense_web/components/layout/ui/sidebar/PageUsageDisplay.tsx b/surfsense_web/components/layout/ui/sidebar/PageUsageDisplay.tsx
index 32532254d..73347e304 100644
--- a/surfsense_web/components/layout/ui/sidebar/PageUsageDisplay.tsx
+++ b/surfsense_web/components/layout/ui/sidebar/PageUsageDisplay.tsx
@@ -54,9 +54,7 @@ export function PageUsageDisplay({ pagesUsed, pagesLimit }: PageUsageDisplayProp
Buy Pages
-
- $1/1k
-
+ $1/1k
)}
diff --git a/surfsense_web/components/settings/buy-pages-content.tsx b/surfsense_web/components/settings/buy-pages-content.tsx
index 6aeb44ea2..5e2c6f9db 100644
--- a/surfsense_web/components/settings/buy-pages-content.tsx
+++ b/surfsense_web/components/settings/buy-pages-content.tsx
@@ -46,9 +46,7 @@ export function BuyPagesContent() {
return (
Buy Pages
-
- Page purchases are temporarily unavailable.
-
+
Page purchases are temporarily unavailable.
);
}
@@ -68,9 +66,7 @@ export function BuyPagesContent() {
Buy Pages
-
- $1 per 1,000 pages, pay as you go
-
+
$1 per 1,000 pages, pay as you go
@@ -118,7 +114,9 @@ export function BuyPagesContent() {
- {totalPages.toLocaleString()} pages
+
+ {totalPages.toLocaleString()} pages
+
${totalPrice}
@@ -133,12 +131,12 @@ export function BuyPagesContent() {
Redirecting
>
) : (
- <>Buy {totalPages.toLocaleString()} Pages for ${totalPrice}>
+ <>
+ Buy {totalPages.toLocaleString()} Pages for ${totalPrice}
+ >
)}
-
- Secure checkout via Stripe
-
+
Secure checkout via Stripe
);
diff --git a/surfsense_web/components/settings/more-pages-content.tsx b/surfsense_web/components/settings/more-pages-content.tsx
index b076b4fdc..ee100f22d 100644
--- a/surfsense_web/components/settings/more-pages-content.tsx
+++ b/surfsense_web/components/settings/more-pages-content.tsx
@@ -8,10 +8,7 @@ import { useEffect, useState } from "react";
import { toast } from "sonner";
import { USER_QUERY_KEY } from "@/atoms/user/user-query.atoms";
import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
-} from "@/components/ui/card";
+import { Card, CardContent } from "@/components/ui/card";
import {
Dialog,
DialogContent,
@@ -98,7 +95,11 @@ export function MorePagesContent() {
Limited offer. Schedule a meeting or email us to claim.
-