diff --git a/surfsense_web/components/assistant-ui/connector-popup/components/connector-dialog-header.tsx b/surfsense_web/components/assistant-ui/connector-popup/components/connector-dialog-header.tsx index 4fa261dba..25ad22523 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/components/connector-dialog-header.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/components/connector-dialog-header.tsx @@ -2,6 +2,7 @@ import { Search, X } from "lucide-react"; import type { FC } from "react"; +import { Button } from "@/components/ui/button"; import { DialogDescription, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { TabsList, TabsTrigger } from "@/components/ui/tabs"; import { cn } from "@/lib/utils"; @@ -76,14 +77,16 @@ export const ConnectorDialogHeader: FC = ({ onChange={(e) => onSearchChange(e.target.value)} /> {searchQuery && ( - + + )} diff --git a/surfsense_web/components/assistant-ui/connector-popup/components/connector-warning-banner.tsx b/surfsense_web/components/assistant-ui/connector-popup/components/connector-warning-banner.tsx index d1de3e37e..ccd778be4 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/components/connector-warning-banner.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/components/connector-warning-banner.tsx @@ -3,6 +3,7 @@ import { AlertTriangle, X } from "lucide-react"; import type { FC } from "react"; import { useState } from "react"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; interface ConnectorWarningBannerProps { @@ -42,14 +43,16 @@ export const ConnectorWarningBanner: FC = ({ )} {onDismiss && ( - + + )} ); diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-connect-view.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-connect-view.tsx index 66a34afdf..7eaea271e 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-connect-view.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/views/connector-connect-view.tsx @@ -90,14 +90,15 @@ export const ConnectorConnectView: FC = ({
{/* Header */}
- +
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 b74042205..2f69df79c 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 @@ -206,14 +206,15 @@ export const ConnectorEditView: FC = ({ )} > {/* Back button */} - + {/* Connector header */}
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 5503ce062..cf8f32ee4 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 @@ -128,14 +128,15 @@ export const IndexingConfigurationView: FC = ({ > {/* Back button - only show if not from OAuth */} {!isFromOAuth && ( - + )} {/* Success header */} 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 e2e44f0c6..576d858d1 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 @@ -216,14 +216,15 @@ export const YouTubeCrawlerView: FC = ({ searchSpaceId,
{/* Header */}
- +
diff --git a/surfsense_web/components/assistant-ui/mention-chip.tsx b/surfsense_web/components/assistant-ui/mention-chip.tsx index 9f9c9b177..79be46611 100644 --- a/surfsense_web/components/assistant-ui/mention-chip.tsx +++ b/surfsense_web/components/assistant-ui/mention-chip.tsx @@ -1,6 +1,7 @@ "use client"; import type { MouseEventHandler, ReactNode } from "react"; +import { Button } from "@/components/ui/button"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; @@ -60,13 +61,14 @@ export function MentionChip({ const isInteractive = Boolean(onClick) && !disabled; const chip = ( - + ); if (!tooltip) return chip; diff --git a/surfsense_web/components/assistant-ui/reasoning-message-part.tsx b/surfsense_web/components/assistant-ui/reasoning-message-part.tsx index 94dd6f25e..72347e33c 100644 --- a/surfsense_web/components/assistant-ui/reasoning-message-part.tsx +++ b/surfsense_web/components/assistant-ui/reasoning-message-part.tsx @@ -4,6 +4,7 @@ import type { ReasoningMessagePartComponent } from "@assistant-ui/react"; import { ChevronRightIcon } from "lucide-react"; import { useEffect, useMemo, useState } from "react"; import { TextShimmerLoader } from "@/components/prompt-kit/loader"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; /** @@ -45,11 +46,12 @@ export const ReasoningMessagePart: ReasoningMessagePartComponent = ({ text, stat return (
- +
{ key={url} className="group relative h-14 w-14 shrink-0 overflow-hidden rounded-md border border-border/50 bg-muted" > - {/* biome-ignore lint/performance/noImgElement: data URL thumbnails from capture */} - + Pending screenshot preview
- + ); } diff --git a/surfsense_web/components/desktop/shortcut-recorder.tsx b/surfsense_web/components/desktop/shortcut-recorder.tsx index 388bb1bf8..cd49eac71 100644 --- a/surfsense_web/components/desktop/shortcut-recorder.tsx +++ b/surfsense_web/components/desktop/shortcut-recorder.tsx @@ -48,9 +48,9 @@ export const DEFAULT_SHORTCUTS = { export function Kbd({ keys, className }: { keys: string[]; className?: string }) { return ( - {keys.map((key, i) => ( + {keys.map((key) => ( 3 && "px-1.5" @@ -136,14 +136,15 @@ export function ShortcutRecorder({ )} - +
); diff --git a/surfsense_web/components/layout/ui/sidebar/SidebarButton.tsx b/surfsense_web/components/layout/ui/sidebar/SidebarButton.tsx index 83ece94ab..d440fe9d3 100644 --- a/surfsense_web/components/layout/ui/sidebar/SidebarButton.tsx +++ b/surfsense_web/components/layout/ui/sidebar/SidebarButton.tsx @@ -2,6 +2,7 @@ import type { LucideIcon } from "lucide-react"; import type React from "react"; +import { Button } from "@/components/ui/button"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; @@ -22,7 +23,7 @@ interface SidebarButtonProps { } const baseClassName = cn( - "group/sidebar-button relative flex h-9 items-center rounded-md mx-2 px-2 text-sm text-left", + "group/sidebar-button relative h-9 justify-start gap-0 rounded-md mx-2 px-2 text-sm text-left", "transition-colors hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" ); @@ -49,7 +50,8 @@ export function SidebarButton({ : (expandedIconNode ?? ); const button = ( - + ); const renderTooltip = isCollapsed || !!tooltipContent; diff --git a/surfsense_web/components/pricing/pricing-section.tsx b/surfsense_web/components/pricing/pricing-section.tsx index 7616d461d..b2eef2778 100644 --- a/surfsense_web/components/pricing/pricing-section.tsx +++ b/surfsense_web/components/pricing/pricing-section.tsx @@ -4,6 +4,7 @@ import { AnimatePresence, motion } from "motion/react"; import type React from "react"; import { useEffect, useRef, useState } from "react"; import { Pricing } from "@/components/pricing"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; const demoPlans = [ @@ -264,7 +265,7 @@ function PricingFAQ() {
{faqData.map((section) => ( -
+

{section.title}

@@ -275,7 +276,7 @@ function PricingFAQ() { return (
)} - + {isActive && (
) : ( - + )} {selectedFolder && ( diff --git a/surfsense_web/components/theme/theme-toggle.tsx b/surfsense_web/components/theme/theme-toggle.tsx index 0b480a1ca..9985e863a 100644 --- a/surfsense_web/components/theme/theme-toggle.tsx +++ b/surfsense_web/components/theme/theme-toggle.tsx @@ -4,6 +4,7 @@ import { motion } from "motion/react"; import { useTheme } from "next-themes"; import { useCallback, useEffect, useId, useState } from "react"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; // /////////////////////////////////////////////////////////////////////////// @@ -706,10 +707,12 @@ export const ThemeToggleButton = ({ const clipPathId = `theme-toggle-clip-${clipId}`; return ( - + ); }; diff --git a/surfsense_web/components/tool-ui/citation/citation.tsx b/surfsense_web/components/tool-ui/citation/citation.tsx index 425ee2ecf..9ecb7c2f2 100644 --- a/surfsense_web/components/tool-ui/citation/citation.tsx +++ b/surfsense_web/components/tool-ui/citation/citation.tsx @@ -3,6 +3,7 @@ import { ExternalLink, Globe } from "lucide-react"; import NextImage from "next/image"; import * as React from "react"; +import { Button } from "@/components/ui/button"; import { openSafeNavigationHref, sanitizeHref } from "../shared/media"; import { cn, Popover, PopoverContent, PopoverTrigger } from "./_adapter"; import type { CitationVariant, SerializableCitation } from "./schema"; @@ -126,7 +127,8 @@ export function Citation(props: CitationProps) { return ( - + - +
); } diff --git a/surfsense_web/components/tool-ui/generate-resume.tsx b/surfsense_web/components/tool-ui/generate-resume.tsx index cc9dbb60e..448e8c531 100644 --- a/surfsense_web/components/tool-ui/generate-resume.tsx +++ b/surfsense_web/components/tool-ui/generate-resume.tsx @@ -9,6 +9,7 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { z } from "zod"; import { openReportPanelAtom, reportPanelAtom } from "@/atoms/chat/report-panel.atom"; import { TextShimmerLoader } from "@/components/prompt-kit/loader"; +import { Button } from "@/components/ui/button"; import { useMediaQuery } from "@/hooks/use-media-query"; import { baseApiService } from "@/lib/apis/base-api.service"; import { getAuthHeaders } from "@/lib/auth-utils"; @@ -281,10 +282,11 @@ function ResumeCard({
-
- +
); } diff --git a/surfsense_web/components/ui/callout-node.tsx b/surfsense_web/components/ui/callout-node.tsx index 0b5213b43..597276511 100644 --- a/surfsense_web/components/ui/callout-node.tsx +++ b/surfsense_web/components/ui/callout-node.tsx @@ -6,6 +6,7 @@ import type { TCalloutElement } from "platejs"; import { PlateElement, type PlateElementProps, useEditorPlugin } from "platejs/react"; import * as React from "react"; +import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; const calloutVariants = cva("my-1 flex w-full items-start gap-2 rounded-lg border p-4", { @@ -24,7 +25,10 @@ const calloutVariants = cva("my-1 flex w-full items-start gap-2 rounded-lg borde }, }); -const calloutIcons: Record = { +const variantCycle = ["info", "warning", "error", "success", "note", "tip"] as const; +type CalloutVariant = (typeof variantCycle)[number]; + +const calloutIcons: Record = { info: "💡", warning: "⚠️", error: "🚨", @@ -33,13 +37,13 @@ const calloutIcons: Record = { tip: "💜", }; -const variantCycle = ["info", "warning", "error", "success", "note", "tip"] as const; - export function CalloutElement({ children, ...props }: PlateElementProps) { const { editor } = useEditorPlugin(CalloutPlugin); const element = props.element; - const variant = element.variant || "info"; - const icon = element.icon || calloutIcons[variant] || "💡"; + const variant = variantCycle.includes(element.variant as CalloutVariant) + ? (element.variant as CalloutVariant) + : "info"; + const icon = element.icon || calloutIcons[variant]; const cycleVariant = React.useCallback(() => { const currentIndex = variantCycle.indexOf(variant as (typeof variantCycle)[number]); @@ -58,17 +62,18 @@ export function CalloutElement({ children, ...props }: PlateElementProps - +
{children}
); diff --git a/surfsense_web/components/ui/sidebar.tsx b/surfsense_web/components/ui/sidebar.tsx index 7399a30aa..a5592bf9c 100644 --- a/surfsense_web/components/ui/sidebar.tsx +++ b/surfsense_web/components/ui/sidebar.tsx @@ -263,11 +263,12 @@ function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps) { +function SidebarRail({ className, ...props }: React.ComponentProps) { const { toggleSidebar } = useSidebar(); return ( - +
{children}
); diff --git a/surfsense_web/components/ui/toolbar.tsx b/surfsense_web/components/ui/toolbar.tsx index 772055c04..35ad1352c 100644 --- a/surfsense_web/components/ui/toolbar.tsx +++ b/surfsense_web/components/ui/toolbar.tsx @@ -6,6 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import { ChevronDown } from "lucide-react"; import * as React from "react"; +import { Button } from "@/components/ui/button"; import { DropdownMenuLabel, DropdownMenuRadioGroup, @@ -219,7 +220,8 @@ export function ToolbarSplitButtonSecondary({ ...props }: React.ComponentPropsWithoutRef<"span"> & VariantProps) { return ( - + ); } diff --git a/surfsense_web/features/chat-messages/hitl/edit-panel/fields/calendar-field.tsx b/surfsense_web/features/chat-messages/hitl/edit-panel/fields/calendar-field.tsx index 23bc22d2c..534e9a2d5 100644 --- a/surfsense_web/features/chat-messages/hitl/edit-panel/fields/calendar-field.tsx +++ b/surfsense_web/features/chat-messages/hitl/edit-panel/fields/calendar-field.tsx @@ -4,6 +4,7 @@ import { format } from "date-fns"; import { CalendarIcon } from "lucide-react"; import type React from "react"; import { useCallback, useMemo, useState } from "react"; +import { Button } from "@/components/ui/button"; import { Calendar } from "@/components/ui/calendar"; import { Input } from "@/components/ui/input"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; @@ -81,16 +82,17 @@ export function DateTimePickerField({
- +
- +
-
- +