An open-source, faster Devin alternative
TypeScript
feat(web): OpenComputer component wrappers + sonner Toaster
Igor Zalutskia809906cdb06
diff --git a/web/src/components/confirm-dialog.tsx b/web/src/components/confirm-dialog.tsxnew file mode 100644index 00000000..165983b2--- /dev/null+++ b/web/src/components/confirm-dialog.tsx@@ -0,0 +1,81 @@+import type { ReactNode } from 'react'+import { Loader2 } from 'lucide-react'+import {+ AlertDialog,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogTitle,+} from '@/components/ui/alert-dialog'+import { Button } from '@/components/ui/button'+import { cn } from '@/lib/utils'++/**+ * Controlled confirm dialog — replaces window.confirm() for destructive and+ * other consequential actions. The parent owns `open`: run the async work in+ * `onConfirm`, flip `pending` while it's in flight, then close on success.+ * While `pending` the dialog can't be dismissed (Esc / overlay / Cancel).+ *+ * The confirm action is a plain Button (not AlertDialogAction) so the dialog+ * does not auto-close before the async work resolves.+ */+export function ConfirmDialog({+ open,+ onOpenChange,+ title,+ description,+ confirmLabel = 'Confirm',+ cancelLabel = 'Cancel',+ destructive = false,+ pending = false,+ onConfirm,+}: {+ open: boolean+ onOpenChange: (open: boolean) => void+ title: ReactNode+ description?: ReactNode+ confirmLabel?: string+ cancelLabel?: string+ destructive?: boolean+ pending?: boolean+ onConfirm: () => void+}) {+ return (+ <AlertDialog+ open={open}+ onOpenChange={(next) => {+ if (pending) return+ onOpenChange(next)+ }}+ >+ <AlertDialogContent>+ <AlertDialogHeader>+ <AlertDialogTitle>{title}</AlertDialogTitle>+ {description ? (+ <AlertDialogDescription>{description}</AlertDialogDescription>+ ) : null}+ </AlertDialogHeader>+ <AlertDialogFooter>+ <AlertDialogCancel disabled={pending}>+ {cancelLabel}+ </AlertDialogCancel>+ <Button+ disabled={pending}+ onClick={onConfirm}+ className={cn(+ destructive &&+ 'bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:border-destructive focus-visible:ring-destructive/30',+ )}+ >+ {pending ? (+ <Loader2 className="size-4 animate-spin" aria-hidden />+ ) : null}+ {confirmLabel}+ </Button>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>+ )+}diff --git a/web/src/components/empty-state.tsx b/web/src/components/empty-state.tsxnew file mode 100644index 00000000..d14f8a7e--- /dev/null+++ b/web/src/components/empty-state.tsx@@ -0,0 +1,41 @@+import type { LucideIcon } from 'lucide-react'+import type { ReactNode } from 'react'+import { cn } from '@/lib/utils'++export function EmptyState({+ icon: Icon,+ title,+ description,+ action,+ className,+}: {+ icon?: LucideIcon+ title: ReactNode+ description?: ReactNode+ action?: ReactNode+ className?: string+}) {+ return (+ <div+ className={cn(+ 'flex flex-col items-center justify-center gap-3 px-6 py-14 text-center',+ className,+ )}+ >+ {Icon ? (+ <div className="bg-muted text-muted-foreground flex size-10 items-center justify-center rounded-full">+ <Icon className="size-5" aria-hidden />+ </div>+ ) : null}+ <div className="space-y-1">+ <p className="text-foreground text-sm font-medium">{title}</p>+ {description ? (+ <p className="text-muted-foreground mx-auto max-w-sm text-sm">+ {description}+ </p>+ ) : null}+ </div>+ {action ? <div className="mt-1">{action}</div> : null}+ </div>+ )+}diff --git a/web/src/components/form.tsx b/web/src/components/form.tsxnew file mode 100644index 00000000..dfc419a1--- /dev/null+++ b/web/src/components/form.tsx@@ -0,0 +1,69 @@+import type { ComponentProps, ReactNode } from 'react'+import { Label } from '@/components/ui/label'+import { Input } from '@/components/ui/input'+import { cn } from '@/lib/utils'++// Re-exported so screens import all form primitives from one place.+export { Input, Label }++/**+ * Plain-props, RHF-agnostic field wrapper: label + control + description/error.+ * A later "form correctness" pass wires react-hook-form + zod into these+ * primitives without changing markup, so inputs are only built once.+ *+ * Pass the same id to `htmlFor` here and to the control's `id`.+ */+export function Field({+ label,+ htmlFor,+ error,+ description,+ required,+ className,+ children,+}: {+ label?: ReactNode+ htmlFor?: string+ error?: ReactNode+ description?: ReactNode+ required?: boolean+ className?: string+ children: ReactNode+}) {+ return (+ <div className={cn('space-y-1.5', className)}>+ {label ? (+ <Label htmlFor={htmlFor}>+ {label}+ {required ? (+ <span className="text-status-error" aria-hidden>+ {' '}+ *+ </span>+ ) : null}+ </Label>+ ) : null}+ {children}+ {description && !error ? (+ <FieldDescription>{description}</FieldDescription>+ ) : null}+ {error ? <FieldError>{error}</FieldError> : null}+ </div>+ )+}++export function FieldDescription({ className, ...props }: ComponentProps<'p'>) {+ return (+ <p className={cn('text-muted-foreground text-xs', className)} {...props} />+ )+}++export function FieldError({ className, ...props }: ComponentProps<'p'>) {+ return (+ <p+ role="alert"+ className={cn('text-status-error text-xs font-medium', className)}+ {...props}+ />+ )+}diff --git a/web/src/components/page-header.tsx b/web/src/components/page-header.tsxnew file mode 100644index 00000000..7d63e468--- /dev/null+++ b/web/src/components/page-header.tsx@@ -0,0 +1,35 @@+import type { ReactNode } from 'react'+import { cn } from '@/lib/utils'++export function PageHeader({+ title,+ description,+ actions,+ className,+}: {+ title: ReactNode+ description?: ReactNode+ actions?: ReactNode+ className?: string+}) {+ return (+ <div+ className={cn(+ 'mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between',+ className,+ )}+ >+ <div className="space-y-1">+ <h1 className="text-foreground text-xl font-semibold tracking-tight">+ {title}+ </h1>+ {description ? (+ <p className="text-muted-foreground text-sm">{description}</p>+ ) : null}+ </div>+ {actions ? (+ <div className="flex shrink-0 items-center gap-2">{actions}</div>+ ) : null}+ </div>+ )+}diff --git a/web/src/components/panel.tsx b/web/src/components/panel.tsxnew file mode 100644index 00000000..87678356--- /dev/null+++ b/web/src/components/panel.tsx@@ -0,0 +1,58 @@+import type { ComponentProps } from 'react'+import { cn } from '@/lib/utils'++/** A raised surface — the dashboard's card primitive (replaces .glass-card). */+export function Panel({ className, ...props }: ComponentProps<'div'>) {+ return (+ <div+ className={cn(+ 'bg-panel text-card-foreground rounded-lg border shadow-sm',+ className,+ )}+ {...props}+ />+ )+}++export function PanelHeader({ className, ...props }: ComponentProps<'div'>) {+ return (+ <div+ className={cn(+ 'flex items-start justify-between gap-4 border-b px-5 py-4',+ className,+ )}+ {...props}+ />+ )+}++export function PanelTitle({+ className,+ children,+ ...props+}: ComponentProps<'h2'>) {+ return (+ <h2 className={cn('text-sm font-semibold', className)} {...props}>+ {children}+ </h2>+ )+}++export function PanelDescription({ className, ...props }: ComponentProps<'p'>) {+ return (+ <p className={cn('text-muted-foreground text-sm', className)} {...props} />+ )+}++export function PanelContent({ className, ...props }: ComponentProps<'div'>) {+ return <div className={cn('px-5 py-4', className)} {...props} />+}++export function PanelFooter({ className, ...props }: ComponentProps<'div'>) {+ return (+ <div+ className={cn('flex items-center gap-2 border-t px-5 py-3', className)}+ {...props}+ />+ )+}diff --git a/web/src/components/resource-table.tsx b/web/src/components/resource-table.tsxnew file mode 100644index 00000000..d009d527--- /dev/null+++ b/web/src/components/resource-table.tsx@@ -0,0 +1,102 @@+import type { ReactNode } from 'react'+import {+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow,+} from '@/components/ui/table'+import { Skeleton } from '@/components/ui/skeleton'+import { cn } from '@/lib/utils'++export type Column<T> = {+ key: string+ header: ReactNode+ cell: (row: T) => ReactNode+ align?: 'left' | 'right' | 'center'+ className?: string+ headClassName?: string+}++function alignClass(a?: 'left' | 'right' | 'center') {+ return a === 'right'+ ? 'text-right'+ : a === 'center'+ ? 'text-center'+ : 'text-left'+}++/**+ * Presentational table (replaces the hand-rolled .data-table). Column-config+ * driven; handles loading (skeleton) and empty states. No sort UI and no+ * row-click div — give an explicit Open link/button in a column instead.+ */+export function ResourceTable<T>({+ columns,+ rows,+ rowKey,+ loading = false,+ skeletonRows = 5,+ empty,+ className,+}: {+ columns: Column<T>[]+ rows: T[]+ rowKey: (row: T) => string+ loading?: boolean+ skeletonRows?: number+ empty?: ReactNode+ className?: string+}) {+ return (+ <div className={cn('w-full overflow-x-auto', className)}>+ <Table>+ <TableHeader>+ <TableRow className="hover:bg-transparent">+ {columns.map((col) => (+ <TableHead+ key={col.key}+ className={cn(alignClass(col.align), col.headClassName)}+ >+ {col.header}+ </TableHead>+ ))}+ </TableRow>+ </TableHeader>+ <TableBody>+ {loading ? (+ Array.from({ length: skeletonRows }).map((_, i) => (+ <TableRow key={`sk-${i}`} className="hover:bg-transparent">+ {columns.map((col) => (+ <TableCell key={col.key} className={alignClass(col.align)}>+ <Skeleton className="h-4 w-full max-w-[140px]" />+ </TableCell>+ ))}+ </TableRow>+ ))+ ) : rows.length === 0 ? (+ <TableRow className="hover:bg-transparent">+ <TableCell colSpan={columns.length} className="p-0">+ {empty}+ </TableCell>+ </TableRow>+ ) : (+ rows.map((row) => (+ <TableRow key={rowKey(row)} className="hover:bg-row-hover">+ {columns.map((col) => (+ <TableCell+ key={col.key}+ className={cn(alignClass(col.align), col.className)}+ >+ {col.cell(row)}+ </TableCell>+ ))}+ </TableRow>+ ))+ )}+ </TableBody>+ </Table>+ </div>+ )+}diff --git a/web/src/components/status-badge.tsx b/web/src/components/status-badge.tsxnew file mode 100644index 00000000..37278118--- /dev/null+++ b/web/src/components/status-badge.tsx@@ -0,0 +1,67 @@+import {+ CircleCheck,+ CircleAlert,+ CircleSlash,+ Moon,+ Clock,+ type LucideIcon,+} from 'lucide-react'+import { cn } from '@/lib/utils'++type Tone = 'running' | 'stopped' | 'hibernated' | 'error' | 'pending'++// Full class strings (not constructed) so Tailwind's scanner keeps them.+const TONE_CLASS: Record<Tone, string> = {+ running: 'bg-status-running-bg text-status-running',+ stopped: 'bg-status-stopped-bg text-status-stopped',+ hibernated: 'bg-status-hibernated-bg text-status-hibernated',+ error: 'bg-status-error-bg text-status-error',+ pending: 'bg-status-pending-bg text-status-pending',+}++type Meta = { tone: Tone; label: string; icon: LucideIcon }++// Raw API status strings -> lifecycle tone + label + non-color (icon) cue.+const STATUS: Record<string, Meta> = {+ running: { tone: 'running', label: 'Running', icon: CircleCheck },+ ready: { tone: 'running', label: 'Ready', icon: CircleCheck },+ stopped: { tone: 'stopped', label: 'Stopped', icon: CircleSlash },+ hibernated: { tone: 'hibernated', label: 'Hibernated', icon: Moon },+ pending: { tone: 'pending', label: 'Pending', icon: Clock },+ error: { tone: 'error', label: 'Error', icon: CircleAlert },+ failed: { tone: 'error', label: 'Failed', icon: CircleAlert },+}++function titleCase(s: string) {+ return s ? s.charAt(0).toUpperCase() + s.slice(1) : 'Unknown'+}++export function StatusBadge({+ status,+ label,+ className,+}: {+ status: string+ label?: string+ className?: string+}) {+ const key = status?.toLowerCase?.() ?? ''+ const meta: Meta = STATUS[key] ?? {+ tone: 'stopped',+ label: titleCase(status),+ icon: CircleSlash,+ }+ const Icon = meta.icon+ return (+ <span+ className={cn(+ 'inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 text-xs font-medium',+ TONE_CLASS[meta.tone],+ className,+ )}+ >+ <Icon className="size-3.5" aria-hidden />+ {label ?? meta.label}+ </span>+ )+}diff --git a/web/src/components/ui/alert-dialog.tsx b/web/src/components/ui/alert-dialog.tsxnew file mode 100644index 00000000..9fd371da--- /dev/null+++ b/web/src/components/ui/alert-dialog.tsx@@ -0,0 +1,197 @@+import * as React from 'react'+import { AlertDialog as AlertDialogPrimitive } from 'radix-ui'++import { cn } from '@/lib/utils'+import { Button } from '@/components/ui/button'++function AlertDialog({+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {+ return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />+}++function AlertDialogTrigger({+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {+ return (+ <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />+ )+}++function AlertDialogPortal({+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {+ return (+ <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />+ )+}++function AlertDialogOverlay({+ className,+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {+ return (+ <AlertDialogPrimitive.Overlay+ data-slot="alert-dialog-overlay"+ className={cn(+ 'data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs',+ className,+ )}+ {...props}+ />+ )+}++function AlertDialogContent({+ className,+ size = 'default',+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {+ size?: 'default' | 'sm'+}) {+ return (+ <AlertDialogPortal>+ <AlertDialogOverlay />+ <AlertDialogPrimitive.Content+ data-slot="alert-dialog-content"+ data-size={size}+ className={cn(+ 'group/alert-dialog-content bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 ring-1 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm',+ className,+ )}+ {...props}+ />+ </AlertDialogPortal>+ )+}++function AlertDialogHeader({+ className,+ ...props+}: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="alert-dialog-header"+ className={cn(+ 'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',+ className,+ )}+ {...props}+ />+ )+}++function AlertDialogFooter({+ className,+ ...props+}: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="alert-dialog-footer"+ className={cn(+ 'bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',+ className,+ )}+ {...props}+ />+ )+}++function AlertDialogMedia({+ className,+ ...props+}: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="alert-dialog-media"+ className={cn(+ "bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",+ className,+ )}+ {...props}+ />+ )+}++function AlertDialogTitle({+ className,+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {+ return (+ <AlertDialogPrimitive.Title+ data-slot="alert-dialog-title"+ className={cn(+ 'font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',+ className,+ )}+ {...props}+ />+ )+}++function AlertDialogDescription({+ className,+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {+ return (+ <AlertDialogPrimitive.Description+ data-slot="alert-dialog-description"+ className={cn(+ 'text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3',+ className,+ )}+ {...props}+ />+ )+}++function AlertDialogAction({+ className,+ variant = 'default',+ size = 'default',+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &+ Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {+ return (+ <Button variant={variant} size={size} asChild>+ <AlertDialogPrimitive.Action+ data-slot="alert-dialog-action"+ className={cn(className)}+ {...props}+ />+ </Button>+ )+}++function AlertDialogCancel({+ className,+ variant = 'outline',+ size = 'default',+ ...props+}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &+ Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {+ return (+ <Button variant={variant} size={size} asChild>+ <AlertDialogPrimitive.Cancel+ data-slot="alert-dialog-cancel"+ className={cn(className)}+ {...props}+ />+ </Button>+ )+}++export {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogMedia,+ AlertDialogOverlay,+ AlertDialogPortal,+ AlertDialogTitle,+ AlertDialogTrigger,+}diff --git a/web/src/components/ui/badge.tsx b/web/src/components/ui/badge.tsxnew file mode 100644index 00000000..fd82c065--- /dev/null+++ b/web/src/components/ui/badge.tsx@@ -0,0 +1,49 @@+import * as React from 'react'+import { cva, type VariantProps } from 'class-variance-authority'+import { Slot } from 'radix-ui'++import { cn } from '@/lib/utils'++const badgeVariants = cva(+ 'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!',+ {+ variants: {+ variant: {+ default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',+ secondary:+ 'bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80',+ destructive:+ 'bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20',+ outline:+ 'border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground',+ ghost:+ 'hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50',+ link: 'text-primary underline-offset-4 hover:underline',+ },+ },+ defaultVariants: {+ variant: 'default',+ },+ },+)++function Badge({+ className,+ variant = 'default',+ asChild = false,+ ...props+}: React.ComponentProps<'span'> &+ VariantProps<typeof badgeVariants> & { asChild?: boolean }) {+ const Comp = asChild ? Slot.Root : 'span'++ return (+ <Comp+ data-slot="badge"+ data-variant={variant}+ className={cn(badgeVariants({ variant }), className)}+ {...props}+ />+ )+}++export { Badge, badgeVariants }diff --git a/web/src/components/ui/input.tsx b/web/src/components/ui/input.tsxnew file mode 100644index 00000000..068f80c4--- /dev/null+++ b/web/src/components/ui/input.tsx@@ -0,0 +1,19 @@+import * as React from 'react'++import { cn } from '@/lib/utils'++function Input({ className, type, ...props }: React.ComponentProps<'input'>) {+ return (+ <input+ type={type}+ data-slot="input"+ className={cn(+ 'border-input file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm',+ className,+ )}+ {...props}+ />+ )+}++export { Input }diff --git a/web/src/components/ui/label.tsx b/web/src/components/ui/label.tsxnew file mode 100644index 00000000..1b6db8a3--- /dev/null+++ b/web/src/components/ui/label.tsx@@ -0,0 +1,22 @@+import * as React from 'react'+import { Label as LabelPrimitive } from 'radix-ui'++import { cn } from '@/lib/utils'++function Label({+ className,+ ...props+}: React.ComponentProps<typeof LabelPrimitive.Root>) {+ return (+ <LabelPrimitive.Root+ data-slot="label"+ className={cn(+ 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',+ className,+ )}+ {...props}+ />+ )+}++export { Label }diff --git a/web/src/components/ui/separator.tsx b/web/src/components/ui/separator.tsxnew file mode 100644index 00000000..2619c9c5--- /dev/null+++ b/web/src/components/ui/separator.tsx@@ -0,0 +1,28 @@+'use client'++import * as React from 'react'+import { Separator as SeparatorPrimitive } from 'radix-ui'++import { cn } from '@/lib/utils'++function Separator({+ className,+ orientation = 'horizontal',+ decorative = true,+ ...props+}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {+ return (+ <SeparatorPrimitive.Root+ data-slot="separator"+ decorative={decorative}+ orientation={orientation}+ className={cn(+ 'bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',+ className,+ )}+ {...props}+ />+ )+}++export { Separator }diff --git a/web/src/components/ui/skeleton.tsx b/web/src/components/ui/skeleton.tsxnew file mode 100644index 00000000..6756d1d2--- /dev/null+++ b/web/src/components/ui/skeleton.tsx@@ -0,0 +1,13 @@+import { cn } from '@/lib/utils'++function Skeleton({ className, ...props }: React.ComponentProps<'div'>) {+ return (+ <div+ data-slot="skeleton"+ className={cn('bg-muted animate-pulse rounded-md', className)}+ {...props}+ />+ )+}++export { Skeleton }diff --git a/web/src/components/ui/table.tsx b/web/src/components/ui/table.tsxnew file mode 100644index 00000000..22dca015--- /dev/null+++ b/web/src/components/ui/table.tsx@@ -0,0 +1,114 @@+import * as React from 'react'++import { cn } from '@/lib/utils'++function Table({ className, ...props }: React.ComponentProps<'table'>) {+ return (+ <div+ data-slot="table-container"+ className="relative w-full overflow-x-auto"+ >+ <table+ data-slot="table"+ className={cn('w-full caption-bottom text-sm', className)}+ {...props}+ />+ </div>+ )+}++function TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {+ return (+ <thead+ data-slot="table-header"+ className={cn('[&_tr]:border-b', className)}+ {...props}+ />+ )+}++function TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {+ return (+ <tbody+ data-slot="table-body"+ className={cn('[&_tr:last-child]:border-0', className)}+ {...props}+ />+ )+}++function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {+ return (+ <tfoot+ data-slot="table-footer"+ className={cn(+ 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0',+ className,+ )}+ {...props}+ />+ )+}++function TableRow({ className, ...props }: React.ComponentProps<'tr'>) {+ return (+ <tr+ data-slot="table-row"+ className={cn(+ 'hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors',+ className,+ )}+ {...props}+ />+ )+}++function TableHead({ className, ...props }: React.ComponentProps<'th'>) {+ return (+ <th+ data-slot="table-head"+ className={cn(+ 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0',+ className,+ )}+ {...props}+ />+ )+}++function TableCell({ className, ...props }: React.ComponentProps<'td'>) {+ return (+ <td+ data-slot="table-cell"+ className={cn(+ 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0',+ className,+ )}+ {...props}+ />+ )+}++function TableCaption({+ className,+ ...props+}: React.ComponentProps<'caption'>) {+ return (+ <caption+ data-slot="table-caption"+ className={cn('text-muted-foreground mt-4 text-sm', className)}+ {...props}+ />+ )+}++export {+ Table,+ TableHeader,+ TableBody,+ TableFooter,+ TableHead,+ TableRow,+ TableCell,+ TableCaption,+}diff --git a/web/src/components/ui/tooltip.tsx b/web/src/components/ui/tooltip.tsxnew file mode 100644index 00000000..c6f5cefc--- /dev/null+++ b/web/src/components/ui/tooltip.tsx@@ -0,0 +1,57 @@+'use client'++import * as React from 'react'+import { Tooltip as TooltipPrimitive } from 'radix-ui'++import { cn } from '@/lib/utils'++function TooltipProvider({+ delayDuration = 0,+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {+ return (+ <TooltipPrimitive.Provider+ data-slot="tooltip-provider"+ delayDuration={delayDuration}+ {...props}+ />+ )+}++function Tooltip({+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Root>) {+ return <TooltipPrimitive.Root data-slot="tooltip" {...props} />+}++function TooltipTrigger({+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {+ return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />+}++function TooltipContent({+ className,+ sideOffset = 0,+ children,+ ...props+}: React.ComponentProps<typeof TooltipPrimitive.Content>) {+ return (+ <TooltipPrimitive.Portal>+ <TooltipPrimitive.Content+ data-slot="tooltip-content"+ sideOffset={sideOffset}+ className={cn(+ 'bg-foreground text-background data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm',+ className,+ )}+ {...props}+ >+ {children}+ <TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />+ </TooltipPrimitive.Content>+ </TooltipPrimitive.Portal>+ )+}++export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }diff --git a/web/src/main.tsx b/web/src/main.tsxindex d209184e..1af33c02 100644--- a/web/src/main.tsx+++ b/web/src/main.tsx@@ -5,6 +5,7 @@ import { BrowserRouter } from 'react-router-dom'import posthog from 'posthog-js'import { PostHogProvider } from '@posthog/react'import App from './App'+import { Toaster } from './components/ui/sonner'import './index.css'import './styles/theme.css'@@ -33,6 +34,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(<QueryClientProvider client={queryClient}><BrowserRouter><App />+ <Toaster theme="light" richColors closeButton /></BrowserRouter></QueryClientProvider></PostHogProvider>