light mode #4
Mergedjuliusmarmingemerged 3 commits into
main fromjuliusmarminge/use-base-componentsmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub- @@ -204,7 +224,7 @@204224 {api && (205225 <button206226 type="button"207- className="mb-2 flex w-full items-center justify-center rounded-md border border-white/[0.1] px-2 py-1.5 text-xs text-[#a0a0a0]/70 transition-colors duration-150 hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-60"227+ className="mb-2 flex w-full items-center justify-center rounded-md border border-border px-2 py-1.5 text-xs text-muted-foreground transition-colors duration-150 hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-60"208228 onClick={() => void handlePickFolder()}209229 disabled={isPickingFolder}210230 >@@ -0,0 +194,21 @@194+ {...props}195+ >196+ <ComboboxPrimitive.ItemIndicator className="col-start-1">197+ <svg198+ fill="none"199+ height="24"200+ stroke="currentColor"201+ strokeLinecap="round"202+ strokeLinejoin="round"203+ strokeWidth="2"204+ viewBox="0 0 24 24"205+ width="24"206+ xmlns="http://www.w3.org/1500/svg"207+ >208+ <path d="M5.252 12.7 10.2 18.63 18.748 5.37" />209+ </svg>210+ </ComboboxPrimitive.ItemIndicator>211+ <div className="col-start-2">{children}</div>212+ </ComboboxPrimitive.Item>213+ );214+}@@ -0,0 +85,21 @@85+ return (86+ <div87+ className={cn("font-heading font-semibold text-xl", className)}88+ data-slot="empty-title"89+ {...props}90+ />91+ );92+}93+94+function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {95+ return (96+ <div97+ className={cn(98+ "text-muted-foreground text-sm [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-slot=empty-title]+&]:mt-1",99+ className,100+ )}101+ data-slot="empty-description"102+ {...props}103+ />104+ );105+}@@ -0,0 +15,21 @@15+ return (16+ <ScrollAreaPrimitive.Root17+ className={cn("size-full min-h-0", className)}18+ {...props}19+ >20+ <ScrollAreaPrimitive.Viewport21+ className={cn(22+ "h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-x:overscroll-x-contain",23+ scrollFade &&24+ "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",25+ scrollbarGutter &&26+ "data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5",27+ )}28+ data-slot="scroll-area-viewport"29+ >30+ {children}31+ </ScrollAreaPrimitive.Viewport>32+ <ScrollBar orientation="vertical" />33+ <ScrollBar orientation="horizontal" />34+ <ScrollAreaPrimitive.Corner data-slot="scroll-area-corner" />35+ </ScrollAreaPrimitive.Root>@@ -0,0 +122,21 @@122+ "grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",123+ className,124+ )}125+ data-slot="select-item"126+ {...props}127+ >128+ <SelectPrimitive.ItemIndicator className="col-start-1">129+ <svg130+ fill="none"131+ height="24"132+ stroke="currentColor"133+ strokeLinecap="round"134+ strokeLinejoin="round"135+ strokeWidth="2"136+ viewBox="0 0 24 24"137+ width="24"138+ xmlns="http://www.w3.org/1500/svg"139+ >140+ <path d="M5.252 12.7 10.2 18.63 18.748 5.37" />141+ </svg>142+ </SelectPrimitive.ItemIndicator>@@ -0,0 +1,3 @@1+import { cn } from "#/lib/utils";2+3+function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
- @@ -527,4 +466,17 @@527- </div>528- </div>529- )}530- </div>466+ {/* Reasoning effort */}467+ <Select468+ value={selectedEffort}469+ onValueChange={(val) => val && setSelectedEffort(val)}470+ >471+ <SelectTrigger472+ size="sm"473+ className="w-auto min-w-0 border-0 shadow-none bg-transparent dark:bg-transparent before:hidden data-[popup-open]:bg-accent dark:data-[popup-open]:bg-accent capitalize"474+ >475+ <SelectValue />476+ </SelectTrigger>477+ <SelectPopup side="top" align="start">478+ {REASONING_OPTIONS.map((effort) => (479+ <SelectItem key={effort} value={effort}>480+ {effort.charAt(0).toUpperCase() + effort.slice(1)}481+ {effort === DEFAULT_REASONING ? " (default)" : ""}482+ </SelectItem>
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Walkthrough#
Adds a large set of new UI components and utilities to the renderer, introduces a CSS-variable based theme (light/dark/system) and a useTheme hook, replaces hard-coded color tokens with semantic tokens across core renderer components, adds a cn utility and components.json, adjusts deps/config and a small smoke-test script tweak.
Changes#
apps/renderer/src/components/ui/*@base-ui/reactprimitives, applies data-slot attributes, CVA variants and composed Tailwind classes. Review API shapes, typings, and consistent class/slot usage.apps/renderer/src/App.tsx,apps/renderer/src/components/ChatView.tsx,apps/renderer/src/components/ChatMarkdown.tsx,apps/renderer/src/components/DiffPanel.tsx,apps/renderer/src/components/Sidebar.tsxapps/renderer/src/index.css,apps/renderer/src/hooks/useTheme.tsapps/renderer/src/lib/utils.ts,apps/renderer/components.jsoncn(...inputs)util combiningclsx+twMerge. Addscomponents.jsonwith UI framework config, aliases, Tailwind/tokens and registries. Confirm imports use the new alias and utility.apps/renderer/tsconfig.json,apps/renderer/vite.config.ts,biome.json#/*path alias and resolves#in Vite; setsexactOptionalPropertyTypes: falsein tsconfig; relaxes biome a11y rulenoSvgWithoutTitle.apps/renderer/package.json@base-ui/react,class-variance-authority,clsx,lucide-react,tailwind-mergeand reordersreact-markdown. Verify lockfile and install.apps/renderer/index.html,apps/desktop/scripts/smoke-test.mjsnode:child_processand use template literal for error output. Minor script change.Estimated code review effort#
🎯 4 (Complex) | ⏱️ ~60 minutes
🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉
🧹 Recent nitpick comments
Comment `@coderabbitai help` to get the list of available commands and usage tips.