:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(desktop): small UI imperfections across the app (#89829)
Charles Vien80404ffc8a3e
diff --git a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/AgentsPanel.tsx b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/AgentsPanel.tsxindex f8a73ff0b5f8..6ae9c7526035 100644--- a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/AgentsPanel.tsx+++ b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/AgentsPanel.tsx@@ -55,15 +55,15 @@ export function AgentsPanel({ enabled }: AgentsPanelProps) {<Text size="1" weight="medium" color="gray">Active sessions</Text>- <div className="overflow-hidden rounded-md border border-(--gray-5) bg-(--gray-1)">- <div className="grid grid-cols-[1fr_90px_70px_80px_80px] gap-x-3 border-(--gray-5) border-b bg-(--gray-2) px-3 py-1.5 font-mono text-(--gray-10) text-[10px] uppercase tracking-wide">+ <div className="overflow-hidden rounded-md border border-border bg-background">+ <div className="grid grid-cols-[1fr_90px_70px_80px_80px] gap-x-3 border-border border-b bg-chrome px-3 py-1.5 font-mono text-[10px] text-muted-foreground uppercase tracking-wide"><span>Task</span><span>Adapter</span><span>State</span><span>Activity</span><span>Idle in</span></div>- <div className="divide-y divide-(--gray-4)">+ <div className="divide-y divide-border">{sessions.map((s) => (<SessionRow key={s.taskRunId} session={s} now={now} />))}@@ -87,7 +87,7 @@ export function AgentsPanel({ enabled }: AgentsPanelProps) {size={12}className="shrink-0 text-(--amber-11)"/>- <Text size="1" className="truncate text-(--gray-12)">+ <Text size="1" className="truncate text-foreground">task={p.taskRunId.slice(0, 8)}… toolCall={p.toolCallId}</Text><Button@@ -133,7 +133,7 @@ function SessionRow({ session, now }: { session: DevSession; now: number }) {return (<div className="grid grid-cols-[1fr_90px_70px_80px_80px] items-center gap-x-3 px-3 py-1 font-mono text-[11px]"><Flex direction="column" className="min-w-0">- <Text size="1" className="truncate text-(--gray-12)">+ <Text size="1" className="truncate text-foreground">{session.taskId.slice(0, 12)}</Text><Text size="1" color="gray" className="truncate text-[10px]">@@ -162,7 +162,7 @@ function SessionRow({ session, now }: { session: DevSession; now: number }) {)}</Flex><Flex align="center" gap="1">- <Clock size={10} className="text-(--gray-10)" />+ <Clock size={10} className="text-muted-foreground" /><Text size="1" color="gray">{formatDuration(ageMs)}</Text>diff --git a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/CpuPanel.tsx b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/CpuPanel.tsxindex e52f441f80de..1de6bd1629d0 100644--- a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/CpuPanel.tsx+++ b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/CpuPanel.tsx@@ -39,7 +39,7 @@ const STATUS_META: Record<idle: {label: "Idle",level: "ok",- valueColor: "text-(--gray-12)",+ valueColor: "text-foreground",lineClass: "text-(--accent-9)",barClass: "bg-(--accent-9)",hint: "Plenty of headroom.",@@ -47,7 +47,7 @@ const STATUS_META: Record<normal: {label: "Normal",level: "ok",- valueColor: "text-(--gray-12)",+ valueColor: "text-foreground",lineClass: "text-(--accent-9)",barClass: "bg-(--accent-9)",hint: "Healthy steady-state load.",@@ -107,20 +107,24 @@ export function CpuPanel({ enabled }: CpuPanelProps) {return (<Flex direction="column" gap="3" className="h-full overflow-y-auto p-4">- <div className="shrink-0 overflow-hidden rounded-md border border-(--gray-5) bg-(--gray-1)">+ <div className="shrink-0 overflow-hidden rounded-md border border-border bg-background"><Flexalign="center"gap="2"- className="border-(--gray-5) border-b bg-(--gray-2) px-3 py-1.5"+ className="border-border border-b bg-chrome px-3 py-1.5">- <span className="text-(--gray-10)">+ <span className="text-muted-foreground"><Cpu size={14} /></span>- <Text size="1" weight="medium" className="text-(--gray-11) uppercase">+ <Text+ size="1"+ weight="medium"+ className="text-muted-foreground uppercase"+ >CPU</Text><StatusBadge level={meta.level}>{meta.label}</StatusBadge>- <Text size="1" className="ml-auto font-mono text-(--gray-10)">+ <Text size="1" className="ml-auto font-mono text-muted-foreground">{trendLabel}</Text></Flex>@@ -133,7 +137,7 @@ export function CpuPanel({ enabled }: CpuPanelProps) {>{sample.totalCpuPercent.toFixed(1)}%</Text>- <Text size="1" className="text-(--gray-10) leading-tight">+ <Text size="1" className="text-muted-foreground leading-tight">{meta.hint}</Text></Flex>@@ -145,7 +149,7 @@ export function CpuPanel({ enabled }: CpuPanelProps) {unit="%"height={80}/>- <div className="h-1 overflow-hidden rounded-full bg-(--gray-4)">+ <div className="h-1 overflow-hidden rounded-full bg-fill-selected"><divclassName={`h-full rounded-full ${meta.barClass}`}style={{ width: `${barWidth}%` }}@@ -153,7 +157,7 @@ export function CpuPanel({ enabled }: CpuPanelProps) {</div></Flex></div>- <div className="grid grid-cols-4 gap-3 border-(--gray-5) border-t bg-(--gray-2) px-3 py-2">+ <div className="grid grid-cols-4 gap-3 border-border border-t bg-chrome px-3 py-2"><InfoStat label="Peak" value={`${cpuPeak.toFixed(1)}%`} /><InfoStat label="Avg" value={`${cpuAvg.toFixed(1)}%`} /><InfoStat label="Procs" value={String(sample.processes.length)} />diff --git a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/DevToolbar.tsx b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/DevToolbar.tsxindex ba42b7d7fd38..7b6a1d92b231 100644--- a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/DevToolbar.tsx+++ b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/DevToolbar.tsx@@ -105,7 +105,7 @@ export function DevToolbar() {return (// Above the Mission Control overlay (z-300), so forcing the overlay on// cannot hide the toggle that turns it back off.- <div className="relative z-[400] h-10 shrink-0 border-(--gray-6) border-t bg-(--gray-2)">+ <div className="relative z-[400] h-10 shrink-0 border-border border-t bg-chrome">{openPanel && (<PanelChromeopenPanel={openPanel}@@ -159,7 +159,7 @@ export function DevToolbar() {void setDevMode(false);}}aria-label="Disable dev mode"- className="flex h-7 w-7 cursor-pointer items-center justify-center rounded-md text-(--gray-11) hover:bg-(--gray-3) hover:text-(--gray-12)"+ className="flex h-7 w-7 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-fill-hover hover:text-foreground"><X size={14} /></button>@@ -171,7 +171,7 @@ export function DevToolbar() {}function Divider() {- return <div className="h-3 w-px bg-(--gray-6)" />;+ return <div className="h-3 w-px bg-border" />;}const PANEL_HEADERS: Record<@@ -224,19 +224,19 @@ function PanelChrome({return (<divstyle={{ height }}- className="absolute right-0 bottom-full left-0 z-50 flex flex-col overflow-hidden border-(--gray-6) border-t border-b bg-(--gray-2) shadow-[0_-8px_24px_-8px_rgba(0,0,0,0.3)]"+ className="absolute right-0 bottom-full left-0 z-50 flex flex-col overflow-hidden border-border border-t border-b bg-chrome shadow-[0_-8px_24px_-8px_rgba(0,0,0,0.3)]"><ResizeHandle height={height} onResize={onResize} /><Flexalign="center"justify="between"- className="shrink-0 border-(--gray-5) border-b bg-(--gray-3) px-3 py-1.5"+ className="shrink-0 border-border border-b bg-fill-hover px-3 py-1.5"><Flex align="baseline" gap="2" className="min-w-0">- <Text size="2" weight="medium" className="text-(--gray-12)">+ <Text size="2" weight="medium" className="text-foreground">{PANEL_HEADERS[openPanel].title}</Text>- <Text size="1" className="truncate text-(--gray-10)">+ <Text size="1" className="truncate text-muted-foreground">{PANEL_HEADERS[openPanel].subtitle}</Text></Flex>@@ -245,7 +245,7 @@ function PanelChrome({type="button"onClick={onClose}aria-label="Close panel"- className="flex h-7 w-7 cursor-pointer items-center justify-center rounded-md text-(--gray-11) hover:bg-(--gray-3) hover:text-(--gray-12)"+ className="flex h-7 w-7 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-fill-hover hover:text-foreground"><X size={14} /></button>@@ -324,7 +324,7 @@ function EnvironmentBadge() {return (<Flex align="center" gap="2" className="pr-1"><span className={`h-2 w-2 rounded-full ${dot}`} />- <Text size="1" className="font-mono text-(--gray-12)">+ <Text size="1" className="font-mono text-foreground">{label}</Text></Flex>@@ -338,7 +338,7 @@ function RegionBadge() {return (<Flex align="center" gap="1" aria-label={entry.label}><span className="text-[12px] leading-none">{entry.flag}</span>- <Text size="1" className="font-mono text-(--gray-10)">+ <Text size="1" className="font-mono text-muted-foreground">{cloudRegion.toUpperCase()}</Text></Flex>@@ -378,11 +378,11 @@ function UserMenu() {render={<buttontype="button"- className="flex h-7 cursor-pointer items-center gap-1 rounded-md px-1 font-mono text-(--gray-12) hover:bg-(--gray-3)"+ className="flex h-7 cursor-pointer items-center gap-1 rounded-md px-1 font-mono text-foreground hover:bg-fill-hover"aria-label="User menu"><span>{emailShort}</span>- <ChevronDown size={12} className="text-(--gray-9)" />+ <ChevronDown size={12} className="text-muted-foreground" /></button>}/>@@ -407,15 +407,15 @@ function UserMenu() {)}<DropdownMenuGroup><DropdownMenuItem onClick={() => openSettings("advanced")}>- <Bug size={12} className="mr-2 text-(--gray-9)" />+ <Bug size={12} className="mr-2 text-muted-foreground" />Open advanced settings</DropdownMenuItem><DropdownMenuItem onClick={handleResetOnboarding}>- <RotateCcw size={12} className="mr-2 text-(--gray-9)" />+ <RotateCcw size={12} className="mr-2 text-muted-foreground" />Reset onboarding</DropdownMenuItem><DropdownMenuItem onClick={handleResetTours}>- <RotateCcw size={12} className="mr-2 text-(--gray-9)" />+ <RotateCcw size={12} className="mr-2 text-muted-foreground" />Reset product tours</DropdownMenuItem></DropdownMenuGroup>@@ -510,7 +510,7 @@ function GadgetButton({className={`flex h-7 w-7 cursor-pointer items-center justify-center rounded-md ${active? "bg-(--accent-3) text-(--accent-11)"- : "text-(--gray-11) hover:bg-(--gray-3) hover:text-(--gray-12)"+ : "text-muted-foreground hover:bg-fill-hover hover:text-foreground"}`}>{children}@@ -532,7 +532,7 @@ function DebugLogsToggle() {return (<Tooltip content="Show debug-level console output in the conversation view for cloud-executed runs">- <Flex align="center" gap="2" className="text-(--gray-11)">+ <Flex align="center" gap="2" className="text-muted-foreground"><Text size="1">Debug logs</Text><Switchchecked={debugLogsCloudRuns}@@ -671,7 +671,7 @@ function LiveStats({const logsEmphasis = logWarnings > 0 ? ("amber" as const) : undefined;return (- <Flex align="center" gap="1" className="text-(--gray-11) text-[12px]">+ <Flex align="center" gap="1" className="text-[12px] text-muted-foreground"><StatPilllabel="CPU"value={sample ? `${sample.totalCpuPercent.toFixed(1)}%` : "—"}@@ -771,7 +771,7 @@ function StatPill({? "text-(--red-11)": emphasis === "amber"? "text-(--amber-11)"- : "text-(--gray-12)";+ : "text-foreground";const pill = (<buttontype="button"@@ -779,12 +779,12 @@ function StatPill({className={`flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2.5 font-mono ${active? "bg-(--accent-3) text-(--accent-11)"- : "hover:bg-(--gray-3) hover:text-(--gray-12)"+ : "hover:bg-fill-hover hover:text-foreground"}`}aria-pressed={active}>- <span className="text-(--gray-10)">{icon}</span>- <span className="text-(--gray-10)">{label}</span>+ <span className="text-muted-foreground">{icon}</span>+ <span className="text-muted-foreground">{label}</span><span className={`font-medium ${valueColor}`}>{value}</span></button>);@@ -897,11 +897,11 @@ function QuickActionsMenu() {render={<buttontype="button"- className="flex h-7 cursor-pointer items-center gap-1 rounded-md px-1.5 text-(--gray-11) hover:bg-(--gray-3) hover:text-(--gray-12)"+ className="flex h-7 cursor-pointer items-center gap-1 rounded-md px-1.5 text-muted-foreground hover:bg-fill-hover hover:text-foreground"aria-label="Quick actions"><Wrench size={14} />- <ChevronDown size={12} className="text-(--gray-9)" />+ <ChevronDown size={12} className="text-muted-foreground" /></button>}/>@@ -911,13 +911,13 @@ function QuickActionsMenu() {<DropdownMenuItemonClick={() => void trpcClient.dev.openUserDataDir.mutate()}>- <FolderOpen size={12} className="mr-2 text-(--gray-9)" />+ <FolderOpen size={12} className="mr-2 text-muted-foreground" />Open user data dir</DropdownMenuItem><DropdownMenuItemonClick={() => void trpcClient.dev.openLogFile.mutate()}>- <FileText size={12} className="mr-2 text-(--gray-9)" />+ <FileText size={12} className="mr-2 text-muted-foreground" />Open log file</DropdownMenuItem></DropdownMenuGroup>@@ -927,11 +927,11 @@ function QuickActionsMenu() {<DropdownMenuItemonClick={() => void trpcClient.dev.reloadRenderer.mutate()}>- <RefreshCw size={12} className="mr-2 text-(--gray-9)" />+ <RefreshCw size={12} className="mr-2 text-muted-foreground" />Reload renderer</DropdownMenuItem><DropdownMenuItem onClick={handleRestart}>- <Power size={12} className="mr-2 text-(--gray-9)" />+ <Power size={12} className="mr-2 text-muted-foreground" />Restart main process</DropdownMenuItem><DropdownMenuItem variant="destructive" onClick={handleCrash}>@@ -945,7 +945,7 @@ function QuickActionsMenu() {<DropdownMenuItem onClick={() => setOffline(!offline)}><ZapOffsize={12}- className={`mr-2 ${offline ? "text-(--amber-11)" : "text-(--gray-9)"}`}+ className={`mr-2 ${offline ? "text-(--amber-11)" : "text-muted-foreground"}`}/>{offline ? "Disable offline mode" : "Simulate offline"}</DropdownMenuItem>@@ -954,7 +954,7 @@ function QuickActionsMenu() {<Timersize={12}className={`mr-2 ${- ms === slowMs ? "text-(--accent-11)" : "text-(--gray-9)"+ ms === slowMs ? "text-(--accent-11)" : "text-muted-foreground"}`}/>{ms === 0 ? "Disable network delay" : `Add ${ms}ms network delay`}@@ -970,7 +970,7 @@ function QuickActionsMenu() {<DropdownMenuGroup><DropdownMenuLabel>Toasts</DropdownMenuLabel><DropdownMenuItem onClick={triggerInfoToast}>- <Activity size={12} className="mr-2 text-(--gray-9)" />+ <Activity size={12} className="mr-2 text-muted-foreground" />Trigger info toast</DropdownMenuItem><DropdownMenuItem variant="destructive" onClick={triggerErrorToast}>@@ -985,7 +985,9 @@ function QuickActionsMenu() {<LayoutGridsize={12}className={`mr-2 ${- missionControlForced ? "text-(--accent-11)" : "text-(--gray-9)"+ missionControlForced+ ? "text-(--accent-11)"+ : "text-muted-foreground"}`}/>{missionControlForced ? "Hide overlay" : "Force overlay on"}@@ -996,7 +998,7 @@ function QuickActionsMenu() {><ScrollTextsize={12}- className={`mr-2 ${probing ? "text-(--accent-11)" : "text-(--gray-9)"}`}+ className={`mr-2 ${probing ? "text-(--accent-11)" : "text-muted-foreground"}`}/>{probing? "Recording, run the gestures now"diff --git a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/HealthPanel.tsx b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/HealthPanel.tsxindex 5cfc905a401d..8dc2a0ff1582 100644--- a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/HealthPanel.tsx+++ b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/HealthPanel.tsx@@ -171,7 +171,7 @@ function HealthCard({? "text-(--red-11)": accent === "amber"? "text-(--amber-11)"- : "text-(--gray-12)";+ : "text-foreground";const lineClass =accent === "red"? "text-(--red-9)"@@ -179,14 +179,18 @@ function HealthCard({? "text-(--amber-9)": "text-(--accent-9)";return (- <div className="overflow-hidden rounded-md border border-(--gray-5) bg-(--gray-1)">+ <div className="overflow-hidden rounded-md border border-border bg-background"><Flexalign="center"gap="2"- className="border-(--gray-5) border-b bg-(--gray-2) px-3 py-1.5"+ className="border-border border-b bg-chrome px-3 py-1.5">- <span className="text-(--gray-10)">{icon}</span>- <Text size="1" weight="medium" className="text-(--gray-11) uppercase">+ <span className="text-muted-foreground">{icon}</span>+ <Text+ size="1"+ weight="medium"+ className="text-muted-foreground uppercase"+ >{title}</Text></Flex>diff --git a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/IpcTimingsPanel.tsx b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/IpcTimingsPanel.tsxindex c1beecddc58d..a97360463469 100644--- a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/IpcTimingsPanel.tsx+++ b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/IpcTimingsPanel.tsx@@ -212,7 +212,7 @@ function StatChip({? "text-(--red-11) bg-(--red-3)": tone === "amber"? "text-(--amber-11) bg-(--amber-3)"- : "text-(--gray-11) bg-(--gray-3)";+ : "text-muted-foreground bg-fill-hover";return (<spanclassName={`inline-flex items-center gap-1 rounded-full px-2 py-0.5 font-mono text-[10px] ${color}`}diff --git a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/LogsPanel.tsx b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/LogsPanel.tsxindex 435e133c379d..14c5525d7d97 100644--- a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/LogsPanel.tsx+++ b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/LogsPanel.tsx@@ -150,7 +150,7 @@ export function LogsPanel({ enabled }: LogsPanelProps) {<divref={scrollRef}- className="min-h-0 flex-1 overflow-y-auto rounded-md border border-(--gray-5) bg-(--gray-1)"+ className="min-h-0 flex-1 overflow-y-auto rounded-md border border-border bg-background"><div className="grid grid-cols-[60px_55px_90px_1fr] gap-x-2 font-mono text-[11px]">{filtered.map((entry) => (@@ -173,16 +173,19 @@ function LogRow({ entry }: { entry: LogEntry }) {: entry.level === "warn"? "text-(--amber-11)": entry.level === "debug" || entry.level === "verbose"- ? "text-(--gray-10)"- : "text-(--gray-12)";+ ? "text-muted-foreground"+ : "text-foreground";return (<>- <span className="px-2 py-0.5 text-(--gray-10)">{time}</span>+ <span className="px-2 py-0.5 text-muted-foreground">{time}</span><span className={`py-0.5 ${levelColor}`}>{entry.level}</span>- <span className="truncate py-0.5 text-(--gray-11)" title={entry.scope}>+ <span+ className="truncate py-0.5 text-muted-foreground"+ title={entry.scope}+ >{entry.scope ?? "—"}</span>- <span className="break-words py-0.5 pr-2 text-(--gray-12)">+ <span className="break-words py-0.5 pr-2 text-foreground">{entry.message}</span></>diff --git a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/MemoryPanel.tsx b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/MemoryPanel.tsxindex 3f14b6541f71..8b0511939d9f 100644--- a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/MemoryPanel.tsx+++ b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/MemoryPanel.tsx@@ -40,7 +40,7 @@ const STATUS_META: Record<healthy: {label: "Healthy",level: "ok",- valueColor: "text-(--gray-12)",+ valueColor: "text-foreground",lineClass: "text-(--accent-9)",barClass: "bg-(--accent-9)",hint: "Heap has room to grow.",@@ -48,7 +48,7 @@ const STATUS_META: Record<warm: {label: "Warm",level: "ok",- valueColor: "text-(--gray-12)",+ valueColor: "text-foreground",lineClass: "text-(--accent-9)",barClass: "bg-(--accent-9)",hint: "Half the heap in use. Normal for active sessions.",@@ -118,20 +118,24 @@ export function MemoryPanel({ enabled }: MemoryPanelProps) {return (<Flex direction="column" gap="3" className="h-full overflow-y-auto p-4">- <div className="shrink-0 overflow-hidden rounded-md border border-(--gray-5) bg-(--gray-1)">+ <div className="shrink-0 overflow-hidden rounded-md border border-border bg-background"><Flexalign="center"gap="2"- className="border-(--gray-5) border-b bg-(--gray-2) px-3 py-1.5"+ className="border-border border-b bg-chrome px-3 py-1.5">- <span className="text-(--gray-10)">+ <span className="text-muted-foreground"><MemoryStick size={14} /></span>- <Text size="1" weight="medium" className="text-(--gray-11) uppercase">+ <Text+ size="1"+ weight="medium"+ className="text-muted-foreground uppercase"+ >Memory</Text><StatusBadge level={meta.level}>{meta.label}</StatusBadge>- <Text size="1" className="ml-auto font-mono text-(--gray-10)">+ <Text size="1" className="ml-auto font-mono text-muted-foreground">{trendLabel}</Text></Flex>@@ -144,7 +148,7 @@ export function MemoryPanel({ enabled }: MemoryPanelProps) {>{formatMemory(sample.totalMemoryMb)}</Text>- <Text size="1" className="text-(--gray-10) leading-tight">+ <Text size="1" className="text-muted-foreground leading-tight">{meta.hint}</Text></Flex>@@ -158,19 +162,19 @@ export function MemoryPanel({ enabled }: MemoryPanelProps) {height={80}/><Flex align="center" gap="2">- <div className="h-1 flex-1 overflow-hidden rounded-full bg-(--gray-4)">+ <div className="h-1 flex-1 overflow-hidden rounded-full bg-fill-selected"><divclassName={`h-full rounded-full ${meta.barClass}`}style={{ width: `${Math.min(100, heapPct)}%` }}/></div>- <Text size="1" className="font-mono text-(--gray-10)">+ <Text size="1" className="font-mono text-muted-foreground">{heapPct.toFixed(0)}% heap</Text></Flex></Flex></div>- <div className="grid grid-cols-4 gap-3 border-(--gray-5) border-t bg-(--gray-2) px-3 py-2">+ <div className="grid grid-cols-4 gap-3 border-border border-t bg-chrome px-3 py-2"><InfoStat label="Peak" value={formatMemory(memPeak)} /><InfoStat label="Avg" value={formatMemory(memAvg)} /><InfoStatdiff --git a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/MetricsCommon.tsx b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/MetricsCommon.tsxindex 183448ce550e..86a3c30735a0 100644--- a/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/MetricsCommon.tsx+++ b/products/desktop/apps/code/src/renderer/features/dev-toolbar/components/MetricsCommon.tsx@@ -121,17 +121,17 @@ export function InfoStat({ label, value, hint, emphasis }: InfoStatProps) {? "text-(--red-11)": emphasis === "amber"? "text-(--amber-11)"- : "text-(--gray-12)";+ : "text-foreground";return (<Flex direction="column" gap="0">- <Text size="1" className="text-(--gray-9) uppercase tracking-wide">+ <Text size="1" className="text-muted-foreground uppercase tracking-wide">{label}</Text><Text size="2" className={`font-mono ${valueColor}`}>{value}</Text>{hint && (- <Text size="1" className="text-(--gray-9)">+ <Text size="1" className="text-muted-foreground">{hint}</Text>)}@@ -202,7 +202,7 @@ export function CardSparkline({stroke="currentColor"strokeWidth="1"strokeDasharray="2 2"- className="text-(--gray-9)"+ className="text-muted-foreground"/>)}</svg>@@ -223,14 +223,14 @@ export function ProcessTable({ processes, sortBy }: ProcessTableProps) {<Text size="1" weight="medium" color="gray" className="px-1">Processes</Text>- <div className="overflow-hidden rounded-md border border-(--gray-5) bg-(--gray-1)">- <div className="grid grid-cols-[1fr_70px_90px_70px] gap-x-3 border-(--gray-5) border-b bg-(--gray-2) px-3 py-1.5 font-mono text-(--gray-10) text-[10px] uppercase tracking-wide">+ <div className="overflow-hidden rounded-md border border-border bg-background">+ <div className="grid grid-cols-[1fr_70px_90px_70px] gap-x-3 border-border border-b bg-chrome px-3 py-1.5 font-mono text-[10px] text-muted-foreground uppercase tracking-wide"><span>Process</span><span>PID</span><span>Memory</span><span className="text-right">CPU</span></div>- <div className="divide-y divide-(--gray-4)">+ <div className="divide-y divide-border">{ranked.map((p) => (<ProcessRow key={`${p.pid}-${p.type}`} {...p} />))}@@ -243,13 +243,13 @@ export function ProcessTable({ processes, sortBy }: ProcessTableProps) {function ProcessRow({ pid, type, name, cpuPercent, memoryMb }: ProcessSample) {return (<div className="grid grid-cols-[1fr_70px_90px_70px] items-center gap-x-3 px-3 py-1 font-mono text-[11px]">- <Text size="1" className="truncate text-(--gray-12)">+ <Text size="1" className="truncate text-foreground">{name ? `${type}: ${name}` : type}</Text><Text size="1" color="gray" className="font-mono">{pid}</Text>- <Text size="1" className="font-mono text-(--gray-11)">+ <Text size="1" className="font-mono text-muted-foreground">{memoryMb.toFixed(0)} MB</Text><Text@@ -289,7 +289,7 @@ export function ProfilingTip({ topic }: ProfilingTipProps) {className="rounded bg-(--amber-1) px-2 py-1.5 text-[11px] leading-snug"><div className="font-medium text-(--amber-12)">{tip.label}</div>- <div className="text-(--gray-11)">{tip.detail}</div>+ <div className="text-muted-foreground">{tip.detail}</div></div>))}</div>diff --git a/products/desktop/packages/shared/src/analytics-events.ts b/products/desktop/packages/shared/src/analytics-events.tsindex 84c1732067f8..d5c3b2eaf9b3 100644--- a/products/desktop/packages/shared/src/analytics-events.ts+++ b/products/desktop/packages/shared/src/analytics-events.ts@@ -277,8 +277,7 @@ export type SidebarNavItem =| "activity"| "configure"| "loops"- | "more"- | "customize_sidebar";+ | "more";/** Which sidebar shell the click came from, so the two can be compared. */export type SidebarLayout = "code" | "channels";@@ -295,18 +294,6 @@ export interface SidebarNavItemClickedProperties {layout?: SidebarLayout;}-export interface SidebarCustomizedProperties {- item: SidebarNavItem;- /** True when the item was promoted to the top level, false when moved under More. */- visible: boolean;-}--export interface SidebarReorderedProperties {- item: SidebarNavItem;- /** Zero-based position of the item in the nav after the drag. */- to_index: number;-}-export interface TaskListGroupingChangedProperties {group_by: "repository" | "date";sort_by: "updated" | "created" | "alpha";@@ -1439,8 +1426,6 @@ export const ANALYTICS_EVENTS = {BRAINROT_PLAYER_ERROR: "Brainrot player error",POSTHOG_WEB_OPENED: "PostHog web opened",SIDEBAR_NAV_ITEM_CLICKED: "Sidebar nav item clicked",- SIDEBAR_CUSTOMIZED: "Sidebar customized",- SIDEBAR_REORDERED: "Sidebar reordered",TASK_LIST_GROUPING_CHANGED: "Task list grouping changed",TASK_LIST_APPEARANCE_CHANGED: "Task list appearance changed",@@ -1633,8 +1618,6 @@ export type EventPropertyMap = {[ANALYTICS_EVENTS.BRAINROT_PLAYER_ERROR]: BrainrotPlayerErrorProperties;[ANALYTICS_EVENTS.POSTHOG_WEB_OPENED]: never;[ANALYTICS_EVENTS.SIDEBAR_NAV_ITEM_CLICKED]: SidebarNavItemClickedProperties;- [ANALYTICS_EVENTS.SIDEBAR_CUSTOMIZED]: SidebarCustomizedProperties;- [ANALYTICS_EVENTS.SIDEBAR_REORDERED]: SidebarReorderedProperties;[ANALYTICS_EVENTS.TASK_LIST_GROUPING_CHANGED]: TaskListGroupingChangedProperties;[ANALYTICS_EVENTS.TASK_LIST_APPEARANCE_CHANGED]: TaskListAppearanceChangedProperties;diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelFeedView.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelFeedView.tsxindex 1aa41951b263..3097286de8c1 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelFeedView.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelFeedView.tsx@@ -1480,7 +1480,7 @@ export function ChannelFeedView({<TabsTriggerkey={value}value={value}- className="rounded-sm px-1 py-0.5 text-[13px]"+ className="rounded-sm px-2 py-0.5 text-[13px]">{label}{value === "reports" &&diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelFilterMenu.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelFilterMenu.tsxindex 45f43f76e8df..545976e38414 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelFilterMenu.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelFilterMenu.tsx@@ -216,7 +216,7 @@ export function ChannelFilterMenu({aria-label="Filter"className={cn("relative", cnHeaderButton(active))}>- <FunnelSimpleIcon size={12} />+ <FunnelSimpleIcon size={14} />{active && (<spanaria-hiddendiff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelHomeComposer.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelHomeComposer.tsxindex 2eb0c08389ca..a77dcbfbc2e4 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelHomeComposer.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelHomeComposer.tsx@@ -390,7 +390,7 @@ export const ChannelHomeComposer = forwardRef<{/* The row sits in normal flow above the input, mirroring the new-taskpage's composer (the composer scrolls with the feed, so nothing mayfloat over the cards below). */}- <div className="mb-1 flex min-w-0 items-center gap-1">+ <div className="mb-2 flex min-w-0 items-center gap-1"><WorkspaceModeSelectvalue={workspaceMode}onChange={setWorkspaceMode}diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.tsxindex e9b74a88536f..5455ae3a53f3 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.tsx@@ -191,7 +191,7 @@ function RecentSectionHeader({<TabsTriggerkey={value}value={value}- className="shrink-0 rounded-sm px-1 py-0.5 text-[13px]"+ className="shrink-0 rounded-sm px-2 py-0.5 text-[13px]"><span className="whitespace-nowrap">{label}</span></TabsTrigger>@@ -207,7 +207,7 @@ function RecentSectionHeader({onClick={onToggleSearch}className={cnHeaderButton(searchOpen)}>- <MagnifyingGlass size={12} />+ <MagnifyingGlass size={14} /></Button><ChannelFilterMenufilters={filters}@@ -333,7 +333,7 @@ function listStateOf({export function ChannelSidebar({ channelId }: { channelId: string }) {const navigate = useNavigate();const pathname = useRouterState({ select: (s) => s.location.pathname });- const loopsEnabled = useFeatureFlag(LOOPS_FLAG, import.meta.env.DEV);+ const loopsEnabled = useFeatureFlag(LOOPS_FLAG);const { items, actions, me, isLoading, channelMissing } =useChannelItems(channelId);diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelTabs.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelTabs.tsxindex 72ff3064a4ee..2e25af8b912f 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelTabs.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelTabs.tsx@@ -16,7 +16,7 @@ const TABS = CHANNEL_SECTIONS.map((s) => ({// codebase's convention) rather than Link's activeProps.export function ChannelTabs({ channelId }: { channelId: string }) {const pathname = useRouterState({ select: (s) => s.location.pathname });- const loopsEnabled = useFeatureFlag(LOOPS_FLAG, import.meta.env.DEV);+ const loopsEnabled = useFeatureFlag(LOOPS_FLAG);const tabs = loopsEnabled ? TABS : TABS.filter((tab) => tab.key !== "loops");return (diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsxindex 5f923255730d..d14987da5242 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx@@ -103,7 +103,7 @@ export function ChannelsFab({ channelId }: { channelId?: string }) {{/* The draft dot needs saying out loud, and the button is wherethe create shortcut is worth advertising. */}{hasDraft ? `${label} — you have a draft` : label}- <Kbd className="ml-1.5">{formatHotkey(SHORTCUTS.NEW_TASK)}</Kbd>+ <Kbd>{formatHotkey(SHORTCUTS.NEW_TASK)}</Kbd></>) : ("Create something new"diff --git a/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsxindex 8f9f492353d0..3575f643728f 100644--- a/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx@@ -88,7 +88,6 @@ import {useChannelPaneStore,} from "@posthog/ui/features/canvas/stores/channelPaneStore";import { useCurrentChannelStore } from "@posthog/ui/features/canvas/stores/currentChannelStore";-import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";import { NavRail } from "./NavRail";it("stays above floating sidebar layers", () => {@@ -132,7 +131,6 @@ describe("NavRail", () => {mocks.featureFlags.set(DESKTOP_HOME_FLAG, true);mocks.fullPath = "/";mocks.href = "/";- useSidebarStore.setState({ navItemOverrides: {}, navItemOrder: [] });useActivityFilterStore.setState({ mentionsEnabled: true });useCurrentChannelStore.setState({ currentChannelId: null });useChannelPaneStore.setState({ pane: "channel" });@@ -420,51 +418,6 @@ describe("NavRail", () => {expect(screen.queryByText("Recent activity card")).not.toBeInTheDocument();});- it("drops an item hidden in the sidebar settings", () => {- useSidebarStore.setState({ navItemOverrides: { "command-center": false } });- render(<NavRail />);-- expect(screen.queryByLabelText("Command Center")).not.toBeInTheDocument();- expect(screen.getByLabelText("Self-driving")).toBeInTheDocument();- });-- it("keeps the column's own destinations when everything else is hidden", () => {- useSidebarStore.setState({- navItemOverrides: {- inbox: false,- activity: false,- "command-center": false,- loops: false,- configure: false,- },- });- render(<NavRail />);-- expect(screen.getByLabelText("Home")).toBeInTheDocument();- expect(screen.getByLabelText("Spaces")).toBeInTheDocument();- expect(screen.queryByLabelText("Settings")).not.toBeInTheDocument();- });-- it("follows a stored order without moving the pinned destinations", () => {- useSidebarStore.setState({- navItemOrder: ["command-center", "inbox", "activity"],- });- const { container } = render(<NavRail />);-- // Search leads the rail and is not a destination, so it sits outside the- // customizable order.- const labels = [...container.querySelectorAll("button")]- .map((button) => button.getAttribute("aria-label"))- .filter((label) => label !== "Search");- expect(labels.slice(0, 5)).toEqual([- "Home",- "Spaces",- "Command Center",- "Self-driving",- "Activity",- ]);- });-it("lights the last square of the Spaces mark while a space is open", () => {useCurrentChannelStore.setState({ currentChannelId: "chan-1" });useChannelPaneStore.setState({ pane: "channel" });diff --git a/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx b/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsxindex 9dfde38e0eba..caa85d63d612 100644--- a/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx@@ -36,11 +36,7 @@ import { useSpacesTabs } from "@posthog/ui/features/feature-flags/useSpacesTabs"import { useInboxDecisionCount } from "@posthog/ui/features/inbox/hooks/useInboxDecisionCount";import { openSettings } from "@posthog/ui/features/settings/hooks/useOpenSettings";import { ProjectSwitcher } from "@posthog/ui/features/sidebar/components/ProjectSwitcher";-import {- isNavItemVisible,- NAV_RAIL_WIDTH,-} from "@posthog/ui/features/sidebar/constants";-import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";+import { NAV_RAIL_WIDTH } from "@posthog/ui/features/sidebar/constants";import { CountBadge } from "@posthog/ui/primitives/CountBadge";import { track } from "@posthog/ui/shell/analytics";import { useCommandMenuStore } from "@posthog/ui/shell/commandMenuStore";@@ -91,7 +87,7 @@ function NavIcon({/><TooltipContent side="right">{label}- {shortcut && <Kbd className="ml-1.5">{shortcut}</Kbd>}+ {shortcut && <Kbd>{shortcut}</Kbd>}</TooltipContent></Tooltip>);@@ -185,7 +181,7 @@ function ActivityNavItem({*/export function NavRail() {const homeEnabled = useFeatureFlag(DESKTOP_HOME_FLAG);- const loopsEnabled = useFeatureFlag(LOOPS_FLAG, import.meta.env.DEV);+ const loopsEnabled = useFeatureFlag(LOOPS_FLAG);const contextEnabled = useContextLayerFlag();const channelReportsEnabled = useChannelReportsEnabled();const reportsInboxEnabled = useReportsInboxEnabled();@@ -195,12 +191,8 @@ export function NavRail() {(state) => state.mentionsEnabled,);- const navItemOverrides = useSidebarStore((s) => s.navItemOverrides);- const navItemOrder = useSidebarStore((s) => s.navItemOrder);const inboxAvailable = !channelReportsEnabled || reportsInboxEnabled;const destinations = visibleRailDestinations({- overrides: navItemOverrides,- order: navItemOrder,home: homeEnabled,inbox: inboxAvailable,loops: loopsEnabled,@@ -224,7 +216,6 @@ export function NavRail() {// light a destination the screen isn't on.const railPane = useRailPane();const toggleCommandMenu = useCommandMenuStore((s) => s.toggle);- const settingsVisible = isNavItemVisible(navItemOverrides, "configure");const pick =(destination: RailDestination): MouseEventHandler<HTMLButtonElement> =>@@ -313,21 +304,20 @@ export function NavRail() {isActive={false}onClick={toggleCommandMenu}/>- {settingsVisible && (- <NavIcon- icon={<GearSix size={16} />}- label="Settings"- isActive={false}- onClick={() => {- track(ANALYTICS_EVENTS.SIDEBAR_NAV_ITEM_CLICKED, {- item: "configure",- in_more: false,- layout: "channels",- });- openSettings();- }}- />- )}+ <NavIcon+ icon={<GearSix size={16} />}+ label="Settings"+ shortcut={formatHotkey(SHORTCUTS.SETTINGS)}+ isActive={false}+ onClick={() => {+ track(ANALYTICS_EVENTS.SIDEBAR_NAV_ITEM_CLICKED, {+ item: "configure",+ in_more: false,+ layout: "channels",+ });+ openSettings();+ }}+ /><div className="my-0.5 w-5 shrink-0 border-border border-t" /><ProjectSwitcher appearance="icon" /></div>diff --git a/products/desktop/packages/ui/src/features/canvas/components/railDestinations.ts b/products/desktop/packages/ui/src/features/canvas/components/railDestinations.tsindex 1bcc2e382cfa..5845cc316725 100644--- a/products/desktop/packages/ui/src/features/canvas/components/railDestinations.ts+++ b/products/desktop/packages/ui/src/features/canvas/components/railDestinations.ts@@ -20,11 +20,6 @@ import {formatHotkey,SHORTCUTS,} from "@posthog/ui/features/command/keyboard-shortcuts";-import {- type CustomizableNavItemId,- isNavItemVisible,- type NavItemOverrides,-} from "@posthog/ui/features/sidebar/constants";import type { CountBadgeTone } from "@posthog/ui/primitives/CountBadge";import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";import {@@ -60,7 +55,6 @@ export interface RailDestination {* from landing on its root. Defaults to `onPick`.*/onReclick?: () => void;- customizableId?: CustomizableNavItemId;shortcut?: string;count?: (counts: RailCounts) => number;countTone?: CountBadgeTone;@@ -163,7 +157,6 @@ export const RAIL_DESTINATIONS: readonly RailDestination[] = [},{pane: "activity",- customizableId: "activity",label: "Activity",analyticsId: "activity",Icon: BellIcon,@@ -173,7 +166,6 @@ export const RAIL_DESTINATIONS: readonly RailDestination[] = [},{pane: "inbox",- customizableId: "inbox",label: "Self-driving",analyticsId: "inbox",Icon: EnvelopeSimple,@@ -185,7 +177,6 @@ export const RAIL_DESTINATIONS: readonly RailDestination[] = [},{pane: "command-center",- customizableId: "command-center",label: "Command Center",analyticsId: "command_center",Icon: Lightning,@@ -196,7 +187,6 @@ export const RAIL_DESTINATIONS: readonly RailDestination[] = [},{pane: "loops",- customizableId: "loops",label: "Loops",analyticsId: "loops",Icon: LoopIcon,@@ -206,7 +196,6 @@ export const RAIL_DESTINATIONS: readonly RailDestination[] = [},{pane: "context",- customizableId: "contexts",label: "Context",analyticsId: "contexts",Icon: BookOpenTextIcon,@@ -216,47 +205,11 @@ export const RAIL_DESTINATIONS: readonly RailDestination[] = [},];-// Deliberately not the shared `orderedNavItems`: its adjacency rule pins-// Activity below Inbox, and the rail puts Activity first.-export function visibleRailDestinations({- overrides,- order,- home,- inbox,- loops,- context,-}: {- overrides: NavItemOverrides;- order: readonly CustomizableNavItemId[];+export function visibleRailDestinations(flags: {home: boolean;inbox: boolean;loops: boolean;context: boolean;}): readonly RailDestination[] {- const shown = RAIL_DESTINATIONS.filter(- ({ customizableId, enabled }) =>- (enabled?.({ home, inbox, loops, context }) ?? true) &&- (!customizableId || isNavItemVisible(overrides, customizableId)),- );- if (order.length === 0) return shown;-- const rank = new Map(order.map((id, index) => [id, index]));- const positions = shown- .map((_, index) => index)- .filter((index) => {- const id = shown[index].customizableId;- return id !== undefined && rank.has(id);- });- const reordered = positions- .map((index) => shown[index])- .sort(- (a, b) =>- (rank.get(a.customizableId as CustomizableNavItemId) ?? 0) -- (rank.get(b.customizableId as CustomizableNavItemId) ?? 0),- );- const result = [...shown];- positions.forEach((position, i) => {- result[position] = reordered[i];- });- return result;+ return RAIL_DESTINATIONS.filter(({ enabled }) => enabled?.(flags) ?? true);}diff --git a/products/desktop/packages/ui/src/features/command/CommandMenu.tsx b/products/desktop/packages/ui/src/features/command/CommandMenu.tsxindex 173d1399d8e3..fe95fd393e86 100644--- a/products/desktop/packages/ui/src/features/command/CommandMenu.tsx+++ b/products/desktop/packages/ui/src/features/command/CommandMenu.tsx@@ -219,7 +219,7 @@ export function CommandMenu({ open, onOpenChange }: CommandMenuProps) {PROJECT_BLUEBIRD_FLAG,import.meta.env.DEV,);- const loopsEnabled = useFeatureFlag(LOOPS_FLAG, import.meta.env.DEV);+ const loopsEnabled = useFeatureFlag(LOOPS_FLAG);// With channel reports on, spaces own reports and the inbox entry goes away.const channelReportsEnabled = useChannelReportsEnabled();const spendAnalysisEnabled = useSpendAnalysisEnabled();diff --git a/products/desktop/packages/ui/src/features/integrations/components/GithubRepoSummary.tsx b/products/desktop/packages/ui/src/features/integrations/components/GithubRepoSummary.tsxindex 4a3abf2434c6..278cad431055 100644--- a/products/desktop/packages/ui/src/features/integrations/components/GithubRepoSummary.tsx+++ b/products/desktop/packages/ui/src/features/integrations/components/GithubRepoSummary.tsx@@ -86,7 +86,7 @@ export function GithubRepoSummary({<span className="min-w-0">{summary.label}{": "}- <span className="text-gray-12">{formatRepoPreview(repos)}</span>+ <span className="text-foreground">{formatRepoPreview(repos)}</span></span></button>{meta ? <span className="min-w-0">{metaSuffix}</span> : null}@@ -107,7 +107,7 @@ export function GithubRepoSummary({</div><div className="flex min-w-0 flex-col gap-0.5"><div className="flex min-w-0 items-center gap-1.5">- <span className="truncate font-medium text-[13px] text-gray-12 leading-5">+ <span className="truncate font-medium text-[13px] text-foreground leading-snug">{accountLabel}</span>{isUnavailable ? (@@ -116,7 +116,7 @@ export function GithubRepoSummary({</span>) : null}</div>- <div className="flex min-w-0 items-center gap-1 text-[12px] text-gray-10 leading-snug">+ <div className="flex min-w-0 items-center gap-1 text-[12px] text-muted-foreground leading-snug">{status === "loading" ? <Spinner /> : descriptionLine}</div></div>diff --git a/products/desktop/packages/ui/src/features/message-editor/components/message-editor.css b/products/desktop/packages/ui/src/features/message-editor/components/message-editor.cssindex 0f067b685062..41c41af6d267 100644--- a/products/desktop/packages/ui/src/features/message-editor/components/message-editor.css+++ b/products/desktop/packages/ui/src/features/message-editor/components/message-editor.css@@ -97,10 +97,10 @@}.cli-editor-scroll::-webkit-scrollbar-thumb {- background: var(--gray-a5);+ background: var(--scrollbar-thumb);border-radius: 3px;}.cli-editor-scroll::-webkit-scrollbar-thumb:hover {- background: var(--gray-a7);+ background: var(--scrollbar-thumb-hover);}diff --git a/products/desktop/packages/ui/src/features/settings/FolderSettingsView.tsx b/products/desktop/packages/ui/src/features/settings/FolderSettingsView.tsxindex b74b7b3c3e81..ada1ba8c6c74 100644--- a/products/desktop/packages/ui/src/features/settings/FolderSettingsView.tsx+++ b/products/desktop/packages/ui/src/features/settings/FolderSettingsView.tsx@@ -188,7 +188,7 @@ export function FolderSettingsView() {</Card></Flex>- <Box className="border-gray-6 border-t" />+ <Box className="border-border border-t" /><Flex direction="column" gap="3"><Heading className="text-base">Danger zone</Heading>diff --git a/products/desktop/packages/ui/src/features/settings/SettingRow.tsx b/products/desktop/packages/ui/src/features/settings/SettingRow.tsxdeleted file mode 100644index 4d5480eb3001..000000000000--- a/products/desktop/packages/ui/src/features/settings/SettingRow.tsx+++ /dev/null@@ -1,41 +0,0 @@-import { Flex, Text } from "@radix-ui/themes";-import type { ReactNode } from "react";--interface SettingRowProps {- label: string;- description?: ReactNode;- children: ReactNode;- noBorder?: boolean;-}--export function SettingRow({- label,- description,- children,- noBorder = false,-}: SettingRowProps) {- return (- <Flex- align="center"- justify="between"- py="4"- gap="6"- style={{- borderBottom: noBorder ? undefined : "1px solid var(--gray-5)",- }}- >- <Flex direction="column" gap="1" className="max-w-[60%]">- <Text className="font-medium text-sm">{label}</Text>- {description &&- (typeof description === "string" ? (- <Text color="gray" className="text-[13px]">- {description}- </Text>- ) : (- description- ))}- </Flex>- <div className="shrink-0">{children}</div>- </Flex>- );-}diff --git a/products/desktop/packages/ui/src/features/settings/components/NotificationDeliveryCard.tsx b/products/desktop/packages/ui/src/features/settings/components/NotificationDeliveryCard.tsxindex 8cb43fb0a93a..3f7d9a32980d 100644--- a/products/desktop/packages/ui/src/features/settings/components/NotificationDeliveryCard.tsx+++ b/products/desktop/packages/ui/src/features/settings/components/NotificationDeliveryCard.tsx@@ -49,7 +49,7 @@ function Illustration({ kind }: { kind: DeliveryIllustration }) {case "push":return (<div className="relative h-full w-full overflow-hidden">- <div className="absolute top-2.5 right-2.5 flex w-24 items-center gap-1.5 rounded-md border border-(--gray-6) bg-(--color-panel-solid) p-1.5 shadow-sm">+ <div className="absolute top-2.5 right-2.5 flex w-24 items-center gap-1.5 rounded-md border border-(--gray-6) bg-card p-1.5 shadow-sm"><div className="size-4 shrink-0 rounded-[5px] bg-(--gray-6)" /><div className="flex min-w-0 flex-1 flex-col gap-1"><div className="h-1 w-3/4 rounded-full bg-(--gray-8)" />@@ -61,7 +61,7 @@ function Illustration({ kind }: { kind: DeliveryIllustration }) {case "toast":return (<div className="relative flex h-full w-full items-center justify-center">- <div className="relative h-12 w-24 rounded-md border border-(--gray-6) bg-(--color-panel-solid)">+ <div className="relative h-12 w-24 rounded-md border border-(--gray-6) bg-card"><div className="absolute top-1.5 left-1.5 flex gap-0.5"><div className="size-1 rounded-full bg-(--gray-7)" /><div className="size-1 rounded-full bg-(--gray-7)" />@@ -127,7 +127,7 @@ export function NotificationDeliveryCard({disabled={disabled}onClick={() => onCheckedChange(!checked)}className={cn(- "flex cursor-pointer flex-col overflow-hidden rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid) p-0 text-left transition-colors hover:border-(--gray-8)",+ "flex cursor-pointer flex-col overflow-hidden rounded-(--radius-3) border border-border bg-card p-0 text-left transition-colors hover:border-(--gray-8)",disabled && "cursor-not-allowed opacity-50",)}>@@ -141,10 +141,10 @@ export function NotificationDeliveryCard({</div><div className="flex w-full flex-1 items-start justify-between gap-2 px-2.5 py-2"><div className="flex min-w-0 flex-col gap-0.5">- <span className="font-medium text-[12px] text-gray-12 leading-4">+ <span className="font-medium text-[12px] text-foreground leading-snug">{title}</span>- <span className="text-[11px] text-gray-10 leading-snug">+ <span className="text-[11px] text-muted-foreground leading-snug">{caption}</span></div>diff --git a/products/desktop/packages/ui/src/features/settings/components/SettingsCard.stories.tsx b/products/desktop/packages/ui/src/features/settings/components/SettingsCard.stories.tsxindex d8bb490e5fd7..f325d27e127c 100644--- a/products/desktop/packages/ui/src/features/settings/components/SettingsCard.stories.tsx+++ b/products/desktop/packages/ui/src/features/settings/components/SettingsCard.stories.tsx@@ -65,7 +65,7 @@ export const GeneralPage: Story = {><div className="flex items-center gap-5"><div className="flex flex-col items-start gap-1">- <span className="text-[10px] text-gray-9 uppercase tracking-wide">+ <span className="text-[10px] text-muted-foreground uppercase tracking-wide">Local</span><SettingsSegmented@@ -79,7 +79,7 @@ export const GeneralPage: Story = {/></div><div className="flex flex-col items-start gap-1">- <span className="text-[10px] text-gray-9 uppercase tracking-wide">+ <span className="text-[10px] text-muted-foreground uppercase tracking-wide">Cloud</span><SettingsSegmented@@ -141,6 +141,31 @@ export const GeneralPage: Story = {</SettingsCardRow></SettingsCard></SettingsSection>++ <SettingsSection label="Updates">+ <SettingsCard>+ <SettingsCardRow+ label={+ <span className="inline-flex items-baseline gap-2">+ Version+ <span className="font-mono font-normal text-[12px] text-muted-foreground">+ 0.61.61+ </span>+ </span>+ }+ description="You're on the latest version"+ >+ <div className="flex items-center gap-2">+ <Button type="button" variant="link-muted" size="sm">+ Changelog+ </Button>+ <Button type="button" variant="outline" size="sm">+ Check now+ </Button>+ </div>+ </SettingsCardRow>+ </SettingsCard>+ </SettingsSection></div>);},diff --git a/products/desktop/packages/ui/src/features/settings/components/SettingsCard.tsx b/products/desktop/packages/ui/src/features/settings/components/SettingsCard.tsxindex 591747c64025..442081db07e4 100644--- a/products/desktop/packages/ui/src/features/settings/components/SettingsCard.tsx+++ b/products/desktop/packages/ui/src/features/settings/components/SettingsCard.tsx@@ -21,15 +21,15 @@ export function SettingsSection({return (<section className="flex flex-col gap-2">{(label || action) && (- <div className="flex items-end justify-between gap-3 px-0.5">+ <div className="flex items-center justify-between gap-3 px-0.5"><div className="flex flex-col gap-0.5">{label && (- <h3 className="font-semibold text-[11px] text-gray-9 uppercase tracking-[0.08em]">+ <h3 className="font-semibold text-[12px] text-foreground">{label}</h3>)}{description && (- <p className="m-0 text-[12px] text-gray-10 leading-snug">+ <p className="m-0 text-[12px] text-muted-foreground leading-snug">{description}</p>)}@@ -52,7 +52,7 @@ export function SettingsCard({return (<divclassName={cn(- "divide-y divide-(--gray-4) rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid)",+ "divide-y divide-border rounded-(--radius-3) border border-border bg-card",className,)}>@@ -82,17 +82,24 @@ export function SettingsCardRow({)}><div className="flex min-w-0 flex-col gap-0.5 py-0.5">- <span className="font-medium text-[13px] text-gray-12 leading-5">+ <span className="font-medium text-[13px] text-foreground leading-snug">{label}</span>{description && (- <span className="text-[12px] text-gray-10 leading-snug">+ <span className="text-[12px] text-muted-foreground leading-snug">{description}</span>)}</div>{children && (- <div className={cn("min-w-0", !stacked && "shrink-0")}>{children}</div>+ <div+ className={cn(+ "min-w-0",+ !stacked && "flex shrink-0 items-center justify-end",+ )}+ >+ {children}+ </div>)}</div>);diff --git a/products/desktop/packages/ui/src/features/settings/components/SettingsPageContent.tsx b/products/desktop/packages/ui/src/features/settings/components/SettingsPageContent.tsxindex 19e7395dd3b9..372816905610 100644--- a/products/desktop/packages/ui/src/features/settings/components/SettingsPageContent.tsx+++ b/products/desktop/packages/ui/src/features/settings/components/SettingsPageContent.tsx@@ -18,7 +18,6 @@ import { TerminalSettings } from "@posthog/ui/features/settings/sections/Terminaimport { WorkspacesSettings } from "@posthog/ui/features/settings/sections/WorkspacesSettings";import { WorktreesSettings } from "@posthog/ui/features/settings/sections/worktrees/WorktreesSettings";import type { SettingsCategory } from "@posthog/ui/features/settings/types";-import { CustomizeSidebarSettings } from "@posthog/ui/features/sidebar/components/CustomizeSidebarDialog";import { SkillsView } from "@posthog/ui/features/skills/SkillsView";import type { ComponentType, ReactNode } from "react";@@ -74,7 +73,6 @@ const SETTINGS_PAGES: Record<SettingsCategory, SettingsPageDefinition> = {"Personalization",PersonalizationSettings,),- sidebar: defineSettingsPage("Sidebar", CustomizeSidebarSettings),terminal: defineSettingsPage("Terminal", TerminalSettings),harness: defineSettingsPage("Harness", HarnessSettings),shortcuts: defineSettingsPage("Shortcuts", ShortcutsSettings),@@ -108,10 +106,10 @@ function SettingsPageHeader({return (<divclassName={`flex items-center gap-2 ${- bordered ? "shrink-0 border-gray-5 border-b px-6 py-4" : ""+ bordered ? "h-14 shrink-0 border-border border-b px-6" : ""}`}>- {icon && <span className="text-gray-10">{icon}</span>}+ {icon && <span className="text-muted-foreground">{icon}</span>}<span className="font-medium text-lg leading-6.5">{title}</span></div>);diff --git a/products/desktop/packages/ui/src/features/settings/components/SettingsPanel.tsx b/products/desktop/packages/ui/src/features/settings/components/SettingsPanel.tsxindex dfc0489b46ab..b0d45e98761e 100644--- a/products/desktop/packages/ui/src/features/settings/components/SettingsPanel.tsx+++ b/products/desktop/packages/ui/src/features/settings/components/SettingsPanel.tsx@@ -13,12 +13,9 @@ import {Keyboard,Lightbulb,Lightning,- MagnifyingGlass,Palette,Plugs,Robot,- SidebarSimple,- SignOut,SlackLogo,Terminal,TrafficSignal,@@ -30,7 +27,6 @@ import { BILLING_FLAG } from "@posthog/shared";import { useOptionalAuthenticatedClient } from "@posthog/ui/features/auth/authClient";import { useAuthStateValue } from "@posthog/ui/features/auth/store";import { UserAvatar } from "@posthog/ui/features/auth/UserAvatar";-import { useLogoutMutation } from "@posthog/ui/features/auth/useAuthMutations";import { useCurrentUser } from "@posthog/ui/features/auth/useCurrentUser";import { useFeatureFlag } from "@posthog/ui/features/feature-flags/useFeatureFlag";import { useQuickAskAvailable } from "@posthog/ui/features/quick-ask/useQuickAskAvailable";@@ -46,6 +42,7 @@ import {SETTINGS_PAGE_LABELS,type SettingsCategory,} from "@posthog/ui/features/settings/types";+import { ProjectSwitcher } from "@posthog/ui/features/sidebar/components/ProjectSwitcher";import { useSpendAnalysisEnabled } from "@posthog/ui/features/usage/useSpendAnalysisEnabled";import * as nav from "@posthog/ui/router/navigationBridge";import { useHostCapabilities } from "@posthog/ui/shell/useHostCapabilities";@@ -73,7 +70,6 @@ const SIDEBAR_GROUPS: SidebarGroup[] = [{ id: "general", icon: <GearSix size={16} /> },{ id: "notifications", icon: <Bell size={16} /> },{ id: "personalization", icon: <Palette size={16} /> },- { id: "sidebar", icon: <SidebarSimple size={16} /> },{ id: "shortcuts", icon: <Keyboard size={16} /> },{ id: "quick-ask", icon: <Lightning size={16} /> },],@@ -152,7 +148,6 @@ export function SettingsPanel({const { data: user } = useCurrentUser({ client });const billingEnabled = useFeatureFlag(BILLING_FLAG);const { localWorkspaces } = useHostCapabilities();- const logoutMutation = useLogoutMutation();const quickAskAvailable = useQuickAskAvailable();const spendAnalysisEnabled = useSpendAnalysisEnabled();@@ -193,15 +188,12 @@ export function SettingsPanel({)?.icon;return (- <div- className="flex h-full w-full bg-(--color-background)"- data-page="settings"- >- <div className="flex h-full w-[256px] shrink-0 flex-col border-gray-6 border-r">- <div className="drag h-[36px] shrink-0 border-b border-b-(--gray-6)" />+ <div className="flex h-full w-full bg-background" data-page="settings">+ <div className="flex h-full w-[256px] shrink-0 flex-col border-border border-r bg-chrome">+ <div className="drag h-[36px] shrink-0 border-b border-b-border" />{isAuthenticated && user && (- <div className="flex items-center gap-3 border-b border-b-(--gray-5) px-3 py-3">+ <div className="flex h-14 items-center gap-3 border-b border-b-border px-3"><UserAvatar user={user} /><div className="flex min-w-0 flex-col"><span className="truncate font-medium text-sm">{user.email}</span>@@ -211,7 +203,7 @@ export function SettingsPanel({<buttontype="button"- className="mt-2 flex cursor-pointer items-center gap-2 border-0 bg-transparent px-3 py-2 text-left text-[13px] text-gray-11 transition-colors hover:bg-gray-3"+ className="mt-2 flex cursor-pointer items-center gap-2 border-0 bg-transparent px-3 py-2 text-left text-[13px] text-foreground transition-colors hover:bg-fill-hover"onClick={close}><ArrowLeft size={14} />@@ -243,7 +235,7 @@ export function SettingsPanel({<div className="flex flex-col gap-3 py-2">{sidebarGroups.map((group) => (<div key={group.label}>- <MenuLabel className="px-3 pb-1 text-gray-9">+ <MenuLabel className="px-3 pb-1 text-muted-foreground">{group.label}</MenuLabel>{group.items.map((item) => {@@ -264,23 +256,14 @@ export function SettingsPanel({</div>{isAuthenticated && (- <button- type="button"- disabled={logoutMutation.isPending}- className="flex cursor-pointer items-center gap-2 border-0 border-gray-5 border-t bg-transparent px-3 py-2.5 text-left font-mono text-[12px] text-gray-9 transition-colors hover:bg-gray-3 hover:text-gray-11 disabled:pointer-events-none disabled:opacity-50"- onClick={() => {- close();- logoutMutation.mutate();- }}- >- <SignOut size={14} />- <span>Sign out</span>- </button>+ <div className="border-border border-t p-2">+ <ProjectSwitcher onNavigateToSettings={setCategory} />+ </div>)}</div><div className="relative flex flex-1 flex-col overflow-hidden">- <div className="drag h-[36px] shrink-0 border-b border-b-(--gray-6)" />+ <div className="drag h-[36px] shrink-0 border-b border-b-border" /><div className="relative flex flex-1 justify-center overflow-hidden"><svgaria-hidden="true"@@ -332,11 +315,7 @@ function SettingsSearchInput({onSubmit: () => void;}) {return (- <div className="relative px-3 pt-1 pb-2">- <MagnifyingGlass- size={13}- className="pointer-events-none absolute top-2.5 left-5 text-gray-9"- />+ <div className="px-3 py-2"><Inputvalue={query}onChange={(e) => onQueryChange(e.currentTarget.value)}@@ -353,9 +332,9 @@ function SettingsSearchInput({onSubmit();}}}- placeholder="Search settings"+ placeholder="Search settings..."aria-label="Search settings"- className="h-7 pl-7 text-[13px]"+ className="h-7 text-[13px] hover:bg-fill-hover"/></div>);@@ -370,7 +349,7 @@ function SettingsSearchResults({}) {if (results.length === 0) {return (- <p className="m-0 px-3 py-2 text-[12.5px] text-gray-10">+ <p className="m-0 px-3 py-2 text-[12.5px] text-muted-foreground">No settings match. Try another word, like "sound" or "theme".</p>);@@ -382,13 +361,13 @@ function SettingsSearchResults({<buttonkey={`${result.category}:${result.label}`}type="button"- className="flex w-full cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-3 py-1.5 text-left transition-colors hover:bg-gray-3"+ className="flex w-full cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-3 py-1.5 text-left transition-colors hover:bg-fill-hover"onClick={() => onSelect(result.category)}>- <span className="min-w-0 truncate text-[13px] text-gray-12">+ <span className="min-w-0 truncate text-[13px] text-foreground">{result.label}</span>- <span className="shrink-0 text-[11px] text-gray-9">+ <span className="shrink-0 text-[11px] text-muted-foreground">{SETTINGS_PAGE_LABELS[result.category]}</span></button>@@ -407,15 +386,17 @@ function SidebarNavItem({ item, isActive, onClick }: SidebarNavItemProps) {return (<buttontype="button"- className="flex w-full cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-3 py-1.5 text-left text-[13px] text-gray-11 transition-colors hover:bg-gray-3 data-[active]:bg-accent-4 data-[active]:text-gray-12"+ className="flex w-full cursor-pointer items-center justify-between gap-2 border-0 bg-transparent px-3 py-1.5 text-left text-[13px] text-foreground transition-colors hover:bg-fill-hover data-[active]:bg-fill-selected"data-active={isActive || undefined}onClick={onClick}><span className="flex items-center gap-2">- <span className="text-gray-10">{item.icon}</span>+ <span className="text-muted-foreground">{item.icon}</span><span>{SETTINGS_PAGE_LABELS[item.id]}</span></span>- {item.hasChevron && <CaretRight size={12} className="text-gray-9" />}+ {item.hasChevron && (+ <CaretRight size={12} className="text-muted-foreground" />+ )}</button>);}diff --git a/products/desktop/packages/ui/src/features/settings/components/SettingsSegmented.tsx b/products/desktop/packages/ui/src/features/settings/components/SettingsSegmented.tsxindex d4da3c8de002..392b18e76423 100644--- a/products/desktop/packages/ui/src/features/settings/components/SettingsSegmented.tsx+++ b/products/desktop/packages/ui/src/features/settings/components/SettingsSegmented.tsx@@ -1,4 +1,4 @@-import { cn, ToggleGroup, ToggleGroupItem } from "@posthog/quill";+import { ToggleGroup, ToggleGroupItem } from "@posthog/quill";import type { ReactNode } from "react";export interface SettingsSegmentedOption {@@ -15,6 +15,10 @@ interface SettingsSegmentedProps {className?: string;}+// Quill toggles sink 2px when pressed, which reads as misalignment inside a settings row.+export const settingsToggleItemClassName =+ "h-6 translate-y-0 px-2.5 text-[12px] text-muted-foreground shadow-none data-[pressed]:translate-y-0 data-[pressed]:border-(--accent-9) data-[pressed]:bg-(--accent-3) data-[pressed]:text-(--accent-11) data-[pressed]:shadow-none";+/*** Single-select segmented control for settings with two or three options,* so the choices read at a glance instead of hiding behind a dropdown.@@ -36,7 +40,7 @@ export function SettingsSegmented({}}aria-label={ariaLabel}disabled={disabled}- className={cn("gap-1", className)}+ className={className}>{options.map((option) => (<ToggleGroupItem@@ -45,7 +49,7 @@ export function SettingsSegmented({size="sm"variant="outline"disabled={disabled}- className="h-6 px-2.5 text-[12px] text-gray-11 data-[pressed]:border-(--accent-9) data-[pressed]:bg-(--accent-3) data-[pressed]:text-(--accent-11)"+ className={settingsToggleItemClassName}>{option.label}</ToggleGroupItem>diff --git a/products/desktop/packages/ui/src/features/settings/components/SettingsSubsection.tsx b/products/desktop/packages/ui/src/features/settings/components/SettingsSubsection.tsxindex 397a2bfdc3c8..83e46335fe0c 100644--- a/products/desktop/packages/ui/src/features/settings/components/SettingsSubsection.tsx+++ b/products/desktop/packages/ui/src/features/settings/components/SettingsSubsection.tsx@@ -24,17 +24,17 @@ export function SettingsSubsection({<Flexdirection="column"gap="4"- className="border-(--gray-5) border-t pt-8 first:border-t-0 first:pt-0"+ className="border-border border-t pt-8 first:border-t-0 first:pt-0"><Flex align="start" justify="between" gap="4" wrap="wrap"><Flex direction="column" gap="1"><Flex align="center" gap="2" wrap="wrap">- <Text className="font-semibold text-[13px] text-gray-12">+ <Text className="font-semibold text-[13px] text-foreground">{title}</Text></Flex>{description ? (- <Text className="max-w-2xl text-[12.5px] text-gray-11 leading-snug">+ <Text className="max-w-2xl text-[12.5px] text-muted-foreground leading-snug">{description}</Text>) : null}diff --git a/products/desktop/packages/ui/src/features/settings/components/ThemePicker.tsx b/products/desktop/packages/ui/src/features/settings/components/ThemePicker.tsxindex d9dcaeb63bf3..8a92f6bb543e 100644--- a/products/desktop/packages/ui/src/features/settings/components/ThemePicker.tsx+++ b/products/desktop/packages/ui/src/features/settings/components/ThemePicker.tsx@@ -123,10 +123,10 @@ export function ThemePicker({ value, onChange }: ThemePickerProps) {<labelkey={option.value}className={cn(- "flex cursor-pointer flex-col overflow-hidden rounded-(--radius-3) border bg-(--color-panel-solid) transition-colors has-[:focus-visible]:ring-(--accent-8) has-[:focus-visible]:ring-2",+ "flex cursor-pointer flex-col overflow-hidden rounded-(--radius-3) border bg-card transition-colors has-[:focus-visible]:ring-(--accent-8) has-[:focus-visible]:ring-2",selected? "border-(--accent-9)"- : "border-(--gray-5) hover:border-(--gray-8)",+ : "border-border hover:border-(--gray-8)",)}><input@@ -140,7 +140,9 @@ export function ThemePicker({ value, onChange }: ThemePickerProps) {/><ThemeThumbnail theme={option.value} /><div className="flex w-full items-center justify-between border-(--gray-4) border-t px-2.5 py-1.5">- <span className="text-[12px] text-gray-12">{option.label}</span>+ <span className="text-[12px] text-foreground">+ {option.label}+ </span><spanclassName={cn("flex size-3.5 items-center justify-center rounded-full bg-(--primary) text-(--primary-foreground) transition-opacity",diff --git a/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.test.ts b/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.test.tsnew file mode 100644index 000000000000..e080f697cf3c--- /dev/null+++ b/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.test.ts@@ -0,0 +1,38 @@+import { beforeEach, describe, expect, it, vi } from "vitest";++const navigateToSettings = vi.fn();+const isOnSettingsRoute = vi.fn(() => false);++vi.mock("@posthog/ui/router/navigationBridge", () => ({+ navigateToSettings: (...args: unknown[]) => navigateToSettings(...args),+ isOnSettingsRoute: () => isOnSettingsRoute(),+ canGoBackInHistory: vi.fn(),+ goBackInHistory: vi.fn(),+ navigateToNewTask: vi.fn(),+}));++import { openSettings } from "./useOpenSettings";++describe("openSettings", () => {+ beforeEach(() => {+ vi.clearAllMocks();+ isOnSettingsRoute.mockReturnValue(false);+ });++ it("stacks an entry when entering settings from the app", () => {+ openSettings("github");+ expect(navigateToSettings).toHaveBeenCalledWith("github", {+ replace: false,+ });+ });++ // "Back to app" is a single history step, so a category change from inside+ // settings must replace — otherwise it lands on the previous category.+ it("replaces the entry when already inside settings", () => {+ isOnSettingsRoute.mockReturnValue(true);+ openSettings("shortcuts");+ expect(navigateToSettings).toHaveBeenCalledWith("shortcuts", {+ replace: true,+ });+ });+});diff --git a/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.ts b/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.tsindex 0cc61bacbec7..813ac3d64dc2 100644--- a/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.ts+++ b/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.ts@@ -19,7 +19,10 @@ export function openSettings(contextOrAction?: SettingsContext | string,): void {prepareSettingsPage(contextOrAction);- nav.navigateToSettings(category);+ // A caller already inside settings is switching category, so replace rather+ // than stack: one closeSettings() back-step must exit to the app instead of+ // walking back through the categories visited.+ nav.navigateToSettings(category, { replace: nav.isOnSettingsRoute() });}/**diff --git a/products/desktop/packages/ui/src/features/settings/sections/AdvancedSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/AdvancedSettings.tsxindex 7e3c6a0ebbb7..e577b1a70a83 100644--- a/products/desktop/packages/ui/src/features/settings/sections/AdvancedSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/AdvancedSettings.tsx@@ -3,12 +3,15 @@ import { useHostTRPC } from "@posthog/host-router/react";import { ONBOARDING_TEST_TOOLS_FLAG } from "@posthog/shared";import { useFeatureFlag } from "@posthog/ui/features/feature-flags/useFeatureFlag";import { useOnboardingStore } from "@posthog/ui/features/onboarding/onboardingStore";+import {+ SettingsCard,+ SettingsCardRow,+} from "@posthog/ui/features/settings/components/SettingsCard";import {DEV_MODE_CLIENT,type DevModeClient,} from "@posthog/ui/features/settings/devModeClient";import { closeSettings } from "@posthog/ui/features/settings/hooks/useOpenSettings";-import { SettingRow } from "@posthog/ui/features/settings/SettingRow";import { useSettingsStore } from "@posthog/ui/features/settings/settingsStore";import { useSetupStore } from "@posthog/ui/features/setup/setupStore";import { useTourStore } from "@posthog/ui/features/tour/tourStore";@@ -39,59 +42,59 @@ export function AdvancedSettings() {const showOnboardingTools = useFeatureFlag(ONBOARDING_TEST_TOOLS_FLAG);return (- <Flex direction="column">- <SettingRow- label="Always create pull requests for cloud runs"- description="Cloud runs push their changes and open a draft pull request when they finish, without waiting for you to ask"- >- <Switch- checked={autoPublishCloudRuns}- onCheckedChange={setAutoPublishCloudRuns}- size="1"- />- </SettingRow>- <SettingRow- label="Compress command output"- description="Route eligible shell commands through rtk so their verbose output is compressed before it reaches the model, reducing token usage. Local covers local and worktree sessions"- >- <Flex direction="column" gap="1" align="end">- <Flex gap="4" align="center">- <Text as="label" size="1">- <Flex gap="1" align="center">- <Checkbox- checked={rtkEnabledLocal}- onCheckedChange={(checked) =>- setRtkEnabledLocal(checked === true)- }- size="1"- />- Local- </Flex>- </Text>- <Text as="label" size="1">- <Flex gap="1" align="center">- <Checkbox- checked={rtkEnabledCloud}- onCheckedChange={(checked) =>- setRtkEnabledCloud(checked === true)- }- size="1"- />- Cloud- </Flex>- </Text>+ <div className="flex flex-col gap-7">+ <SettingsCard>+ <SettingsCardRow+ label="Always create pull requests for cloud runs"+ description="Cloud runs push their changes and open a draft pull request when they finish, without waiting for you to ask"+ >+ <Switch+ checked={autoPublishCloudRuns}+ onCheckedChange={setAutoPublishCloudRuns}+ size="1"+ />+ </SettingsCardRow>+ <SettingsCardRow+ label="Compress command output"+ description="Route eligible shell commands through rtk so their verbose output is compressed before it reaches the model, reducing token usage; Local covers local and worktree sessions"+ >+ <Flex direction="column" gap="1" align="end">+ <Flex gap="4" align="center">+ <Text as="label" size="1">+ <Flex gap="1" align="center">+ <Checkbox+ checked={rtkEnabledLocal}+ onCheckedChange={(checked) =>+ setRtkEnabledLocal(checked === true)+ }+ size="1"+ />+ Local+ </Flex>+ </Text>+ <Text as="label" size="1">+ <Flex gap="1" align="center">+ <Checkbox+ checked={rtkEnabledCloud}+ onCheckedChange={(checked) =>+ setRtkEnabledCloud(checked === true)+ }+ size="1"+ />+ Cloud+ </Flex>+ </Text>+ </Flex>+ {rtkEnabledLocal && rtkStatus?.available === false && (+ <Text size="1" color="orange">+ rtk binary not found — local sessions run uncompressed until it+ is installed+ </Text>+ )}</Flex>- {rtkEnabledLocal && rtkStatus?.available === false && (- <Text size="1" color="orange">- rtk binary not found — local sessions run uncompressed until it is- installed- </Text>- )}- </Flex>- </SettingRow>- {showOnboardingTools && (- <>- <SettingRow+ </SettingsCardRow>+ {showOnboardingTools && (+ <SettingsCardRowlabel="Reset onboarding and tours"description="Re-run the onboarding tutorial and product tours on next app restart">@@ -107,38 +110,37 @@ export function AdvancedSettings() {>Reset</Button>- </SettingRow>- <OnboardingTestTools />- </>- )}- <SettingRow- label="Clear application storage"- description="This will remove all locally stored application data"- >- <Button- variant="soft"- color="red"- size="1"- onClick={clearApplicationStorage}+ </SettingsCardRow>+ )}+ <SettingsCardRow+ label="Clear application storage"+ description="This will remove all locally stored application data">- Clear all data- </Button>- </SettingRow>- {showDebugLogsToggle && (- <SettingRow- label="Debug logs for cloud runs"- description="Show debug-level console output in the conversation view for cloud-executed runs"- noBorder={!devModeClient}- >- <Switch- checked={debugLogsCloudRuns}- onCheckedChange={setDebugLogsCloudRuns}+ <Button+ variant="soft"+ color="red"size="1"- />- </SettingRow>- )}- {devModeClient && <DevModeRow client={devModeClient} />}- </Flex>+ onClick={clearApplicationStorage}+ >+ Clear all data+ </Button>+ </SettingsCardRow>+ {showDebugLogsToggle && (+ <SettingsCardRow+ label="Debug logs for cloud runs"+ description="Show debug-level console output in the conversation view for cloud-executed runs"+ >+ <Switch+ checked={debugLogsCloudRuns}+ onCheckedChange={setDebugLogsCloudRuns}+ size="1"+ />+ </SettingsCardRow>+ )}+ {devModeClient && <DevModeRow client={devModeClient} />}+ </SettingsCard>+ {showOnboardingTools && <OnboardingTestTools />}+ </div>);}@@ -149,10 +151,9 @@ function DevModeRow({ client }: { client: DevModeClient }) {);return (- <SettingRow+ <SettingsCardRowlabel="Developer mode"description="Show the dev toolbar with live CPU, memory, IPC timings and render tracking"- noBorder><Switchchecked={devMode}@@ -161,6 +162,6 @@ function DevModeRow({ client }: { client: DevModeClient }) {}}size="1"/>- </SettingRow>+ </SettingsCardRow>);}diff --git a/products/desktop/packages/ui/src/features/settings/sections/DailyReportLimitSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/DailyReportLimitSettings.tsxindex d007ec41d582..39cc2cee0c76 100644--- a/products/desktop/packages/ui/src/features/settings/sections/DailyReportLimitSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/DailyReportLimitSettings.tsx@@ -73,7 +73,7 @@ export function DailyReportLimitSettings({};return (- <div className="flex flex-col gap-2 border-(--gray-5) border-t border-dashed pt-3">+ <div className="flex flex-col gap-2 border-border border-t border-dashed pt-3"><div className="flex flex-col gap-1"><Text className="font-medium text-(--gray-12) text-sm">Daily report limitdiff --git a/products/desktop/packages/ui/src/features/settings/sections/DiscordPresencePreview.tsx b/products/desktop/packages/ui/src/features/settings/sections/DiscordPresencePreview.tsxindex 7b4188561b3e..24993fe07a62 100644--- a/products/desktop/packages/ui/src/features/settings/sections/DiscordPresencePreview.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/DiscordPresencePreview.tsx@@ -67,7 +67,7 @@ export function DiscordPresencePreview({return (<SettingsSectionlabel="Preview"- description="What your Discord profile shows while you work."+ description="What your Discord profile shows while you work"action={<SettingsSegmentedvalue={running ? "running" : "idle"}@@ -82,15 +82,19 @@ export function DiscordPresencePreview({}><div- className={`max-w-[380px] rounded-xl border border-gray-5 bg-gray-2 px-4 py-3 ${+ className={`max-w-[380px] rounded-xl border border-border bg-gray-2 px-4 py-3 ${enabled ? "" : "pointer-events-none opacity-50"}`}><Flex align="center" justify="between">- <Text className="font-semibold text-[12px] text-gray-11">+ <Text className="font-semibold text-[12px] text-muted-foreground">Playing</Text>- <DotsThree size={18} weight="bold" className="text-gray-9" />+ <DotsThree+ size={18}+ weight="bold"+ className="text-muted-foreground"+ /></Flex><Flex align="start" gap="3" className="mt-2">@@ -111,11 +115,13 @@ export function DiscordPresencePreview({</div><Flex direction="column" className="min-w-0 gap-0">- <Text className="font-bold text-[15px] text-gray-12">PostHog</Text>- <Text truncate className="text-[13px] text-gray-12">+ <Text className="font-bold text-[15px] text-foreground">+ PostHog+ </Text>+ <Text truncate className="text-[13px] text-foreground">{details}</Text>- <Text truncate className="text-[13px] text-gray-11">+ <Text truncate className="text-[13px] text-muted-foreground">{state}</Text><Flex align="center" gap="1" className="mt-0.5 text-(--green-11)">diff --git a/products/desktop/packages/ui/src/features/settings/sections/DiscordSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/DiscordSettings.tsxindex 12c9d3c0d4d3..ffc12ab9d8fa 100644--- a/products/desktop/packages/ui/src/features/settings/sections/DiscordSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/DiscordSettings.tsx@@ -1,3 +1,4 @@+import { ArrowSquareOutIcon } from "@phosphor-icons/react";import { useService } from "@posthog/di/react";import { Switch } from "@posthog/quill";import { ANALYTICS_EVENTS } from "@posthog/shared";@@ -12,9 +13,13 @@ import {SettingsSection,} from "@posthog/ui/features/settings/components/SettingsCard";import { track } from "@posthog/ui/shell/analytics";+import { openUrlInBrowser } from "@posthog/ui/utils/browser";import { useEffect, useState } from "react";import { DiscordPresencePreview } from "./DiscordPresencePreview";+const DISCORD_DOCS_URL =+ "https://posthog.com/docs/libraries/discord?tab=Desktop";+// Fallback used for optimistic toggle updates that fire before the initial// getState resolves, so the Switch reflects the change immediately instead of// appearing stuck at its default. The status subscription reconciles the@@ -112,7 +117,7 @@ export function DiscordSettings() {{enabled ? (<SettingsSectionlabel="Privacy"- description="What the Rich Presence card reveals about your session."+ description="What the Rich Presence card reveals about your session"><SettingsCard><SettingsCardRow@@ -144,6 +149,17 @@ export function DiscordSettings() {showTaskTitle={state?.showTaskTitle ?? false}showRepoName={state?.showRepoName ?? false}/>++ <div className="flex justify-end">+ <button+ type="button"+ onClick={() => void openUrlInBrowser(DISCORD_DOCS_URL)}+ className="inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-muted-foreground text-xs no-underline hover:text-foreground"+ >+ Learn about the Discord integration+ <ArrowSquareOutIcon size={11} />+ </button>+ </div></div>);}diff --git a/products/desktop/packages/ui/src/features/settings/sections/GeneralSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/GeneralSettings.tsxindex 735262c9ce6a..6ee1ffc7d005 100644--- a/products/desktop/packages/ui/src/features/settings/sections/GeneralSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/GeneralSettings.tsx@@ -276,7 +276,10 @@ export function GeneralSettings() {</SettingsCard>)}- <SettingsSection label="Appearance">+ <SettingsSection+ label="Appearance"+ description="Theme and how the app looks"+ ><ThemePicker value={theme} onChange={handleThemeChange} />{missionControl != null && missionControlSupported === true && (<SettingsCard>@@ -296,10 +299,13 @@ export function GeneralSettings() {<SettingsSectionlabel="New tasks"- description="Defaults for every new task. You can change any of these per task in the composer."+ description="Defaults for every new task; you can change any of these per task in the composer"><SettingsCard>- <SettingsCardRow label="Start in">+ <SettingsCardRow+ label="Start in"+ description="The mode a new task opens in; Plan drafts an approach before any changes"+ ><SettingsSegmentedariaLabel="Initial task mode"value={defaultInitialTaskMode}@@ -315,7 +321,10 @@ export function GeneralSettings() {/></SettingsCardRow>- <SettingsCardRow label="Effort">+ <SettingsCardRow+ label="Effort"+ description="How much reasoning the agent puts into each turn"+ ><ReasoningLevelDropdownvalue={defaultReasoningEffort}options={DEFAULT_EFFORT_OPTIONS}@@ -332,11 +341,11 @@ export function GeneralSettings() {<SettingsCardRowlabel="Messaging"- description="Queue holds messages until the turn ends. Steer applies them mid-turn."+ description="Queue holds messages until the turn ends; Steer applies them mid-turn"><div className="flex items-center gap-5"><div className="flex flex-col items-start gap-1">- <span className="text-[10px] text-gray-9 uppercase tracking-wide">+ <span className="text-[10px] text-muted-foreground uppercase tracking-wide">Local</span><SettingsSegmented@@ -351,7 +360,7 @@ export function GeneralSettings() {/></div><div className="flex flex-col items-start gap-1">- <span className="text-[10px] text-gray-9 uppercase tracking-wide">+ <span className="text-[10px] text-muted-foreground uppercase tracking-wide">Cloud</span><SettingsSegmented@@ -370,14 +379,17 @@ export function GeneralSettings() {</SettingsCard></SettingsSection>- <SettingsSection label="Composer">+ <SettingsSection+ label="Composer"+ description="How the message box behaves while you type"+ ><SettingsCard><SettingsCardRowlabel="Send messages with"description={sendMessagesWith === "enter"? "Shift+Enter inserts a new line"- : undefined+ : "Enter inserts a new line"}><SettingsSegmented@@ -417,9 +429,15 @@ export function GeneralSettings() {</SettingsCard></SettingsSection>- <SettingsSection label="Editor">+ <SettingsSection+ label="Editor"+ description="Where diffs open and what happens while agents run"+ ><SettingsCard>- <SettingsCardRow label="Open diffs in">+ <SettingsCardRow+ label="Open diffs in"+ description="Which pane a changed file opens in when you click it"+ ><SettingsSelectariaLabel="Open diffs in"value={diffOpenMode}@@ -441,7 +459,7 @@ export function GeneralSettings() {label="Keep awake while agents work"description={hasBuiltInBattery- ? "Stops your computer from sleeping on its own during a task. Closing the lid still puts it to sleep."+ ? "Stops your computer from sleeping on its own during a task; closing the lid still puts it to sleep": "Stops your computer from sleeping on its own during a task"}>diff --git a/products/desktop/packages/ui/src/features/settings/sections/GitHubIntegrationSection.tsx b/products/desktop/packages/ui/src/features/settings/sections/GitHubIntegrationSection.tsxindex aee132f979be..52d435d22abc 100644--- a/products/desktop/packages/ui/src/features/settings/sections/GitHubIntegrationSection.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/GitHubIntegrationSection.tsx@@ -39,7 +39,7 @@ export function GitHubIntegrationSection({showBottomBorder = true,}: GitHubIntegrationSectionProps) {const borderClass = showBottomBorder- ? "border-(--gray-5) border-b border-dashed pb-4"+ ? "border-border border-b border-dashed pb-4": "";const projectId = useAuthStateValue((state) => state.currentProjectId);const { isAdmin } = useIsOrgAdmin();diff --git a/products/desktop/packages/ui/src/features/settings/sections/GitHubSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/GitHubSettings.tsxindex 6008fd61a0f6..61ec8f6888aa 100644--- a/products/desktop/packages/ui/src/features/settings/sections/GitHubSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/GitHubSettings.tsx@@ -6,7 +6,7 @@ import { ProjectGithubConnectionSection } from "@posthog/ui/features/settings/seimport { openUrlInBrowser } from "@posthog/ui/utils/browser";import { getPostHogUrl } from "@posthog/ui/utils/urls";-const GITHUB_DOCS_URL = "https://posthog.com/docs/libraries/github";+const GITHUB_DOCS_URL = "https://posthog.com/docs/libraries/github?tab=Desktop";export function GitHubSettings() {const projectId = useAuthStateValue((s) => s.currentProjectId);@@ -38,7 +38,7 @@ export function GitHubSettings() {<buttontype="button"onClick={() => void openUrlInBrowser(GITHUB_DOCS_URL)}- className="ml-auto inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-gray-10 text-xs no-underline hover:text-gray-12"+ className="ml-auto inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-muted-foreground text-xs no-underline hover:text-foreground">Learn about the GitHub integration<ArrowSquareOutIcon size={11} />diff --git a/products/desktop/packages/ui/src/features/settings/sections/HarnessSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/HarnessSettings.tsxindex f4d3ee6fe68e..832f4c6d6dc0 100644--- a/products/desktop/packages/ui/src/features/settings/sections/HarnessSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/HarnessSettings.tsx@@ -1,6 +1,10 @@import { ArrowSquareOut, Check, Copy, Warning } from "@phosphor-icons/react";import { ANALYTICS_EVENTS } from "@posthog/shared";-import { SettingRow } from "@posthog/ui/features/settings/SettingRow";+import {+ SettingsCard,+ SettingsCardRow,+ SettingsSection,+} from "@posthog/ui/features/settings/components/SettingsCard";import { PermissionsSettings } from "@posthog/ui/features/settings/sections/PermissionsSettings";import { useSettingsStore } from "@posthog/ui/features/settings/settingsStore";import { Tooltip } from "@posthog/ui/primitives/Tooltip";@@ -30,9 +34,9 @@ function CopyableCommand({ command }: { command: string }) {<Flexalign="center"gap="2"- className="rounded border border-gray-6 bg-gray-2 px-2 py-1"+ className="rounded border border-border bg-gray-2 px-2 py-1">- <Text className="text-[13px] text-gray-11">{command}</Text>+ <Text className="text-[13px] text-muted-foreground">{command}</Text><Tooltip content={copied ? "Copied!" : "Copy"}><IconButtonvariant="ghost"@@ -103,152 +107,157 @@ export function HarnessSettings() {}, [setAllowBypassPermissions]);return (- <Flex direction="column">- {/* Claude Code */}- <Text className="mt-1 mb-2 font-medium text-sm">Claude Code</Text>-- <SettingRow- label="MCP servers"- description={- <SettingDescription- text="Extend Claude's capabilities with MCP servers"- docsUrl="https://docs.anthropic.com/en/docs/claude-code/mcp"- />- }- >- <CopyableCommand command="claude mcp" />- </SettingRow>-- <SettingRow- label="Skills"- description={- <SettingDescription- text="Create custom slash commands in ~/.claude/skills/"- docsUrl="https://docs.anthropic.com/en/docs/claude-code/slash-commands"- />- }+ <div className="flex flex-col gap-7">+ <SettingsSection+ label="Claude Code"+ description="Configuration that lives with the Claude Code harness; run these commands in a terminal to change it">- <span />- </SettingRow>+ <SettingsCard>+ <SettingsCardRow+ label="MCP servers"+ description={+ <SettingDescription+ text="Extend Claude's capabilities with MCP servers"+ docsUrl="https://docs.anthropic.com/en/docs/claude-code/mcp"+ />+ }+ >+ <CopyableCommand command="claude mcp" />+ </SettingsCardRow>- <SettingRow- label="Memory"- description={- <SettingDescription- text="Persistent context stored in CLAUDE.md files"- docsUrl="https://docs.anthropic.com/en/docs/claude-code/memory"- />- }- >- <CopyableCommand command="claude /memory" />- </SettingRow>+ <SettingsCardRow+ label="Skills"+ description={+ <SettingDescription+ text="Create custom slash commands in ~/.claude/skills/"+ docsUrl="https://docs.anthropic.com/en/docs/claude-code/slash-commands"+ />+ }+ >+ <span />+ </SettingsCardRow>- <SettingRow- label="Hooks"- description={- <SettingDescription- text="Execute commands at specific points in Claude's lifecycle"- docsUrl="https://docs.anthropic.com/en/docs/claude-code/hooks"- />- }- noBorder- >- <CopyableCommand command="claude /hooks" />- </SettingRow>+ <SettingsCardRow+ label="Memory"+ description={+ <SettingDescription+ text="Persistent context stored in CLAUDE.md files"+ docsUrl="https://docs.anthropic.com/en/docs/claude-code/memory"+ />+ }+ >+ <CopyableCommand command="claude /memory" />+ </SettingsCardRow>- {/* Codex */}- <Text className="mb-2 block border-gray-6 border-t pt-4 font-medium text-sm">- Codex- </Text>+ <SettingsCardRow+ label="Hooks"+ description={+ <SettingDescription+ text="Execute commands at specific points in Claude's lifecycle"+ docsUrl="https://docs.anthropic.com/en/docs/claude-code/hooks"+ />+ }+ >+ <CopyableCommand command="claude /hooks" />+ </SettingsCardRow>+ </SettingsCard>+ </SettingsSection>- <SettingRow- label="MCP servers"- description={- <SettingDescription- text="Extend Codex's capabilities with MCP servers"- docsUrl="https://learn.chatgpt.com/docs/extend/mcp"- />- }+ <SettingsSection+ label="Codex"+ description="Configuration that lives with the Codex harness">- <CopyableCommand command="codex mcp" />- </SettingRow>+ <SettingsCard>+ <SettingsCardRow+ label="MCP servers"+ description={+ <SettingDescription+ text="Extend Codex's capabilities with MCP servers"+ docsUrl="https://learn.chatgpt.com/docs/extend/mcp"+ />+ }+ >+ <CopyableCommand command="codex mcp" />+ </SettingsCardRow>- <SettingRow- label="Skills"- description={- <SettingDescription- text="Reusable instructions in .agents/skills/, mentioned with $skill-name"- docsUrl="https://learn.chatgpt.com/docs/build-skills"- />- }- >- <span />- </SettingRow>+ <SettingsCardRow+ label="Skills"+ description={+ <SettingDescription+ text="Reusable instructions in .agents/skills/, mentioned with $skill-name"+ docsUrl="https://learn.chatgpt.com/docs/build-skills"+ />+ }+ >+ <span />+ </SettingsCardRow>- <SettingRow- label="Memory"- description={- <SettingDescription- text="Persistent context stored in AGENTS.md files"- docsUrl="https://learn.chatgpt.com/docs/agent-configuration/agents-md"- />- }- >- <span />- </SettingRow>-- <SettingRow- label="Hooks"- description={- <SettingDescription- text="Execute commands at specific points in Codex's lifecycle, defined in .codex/hooks.json or config.toml. Review them with /hooks inside a session"- docsUrl="https://learn.chatgpt.com/docs/hooks"- />- }- noBorder- >- <span />- </SettingRow>+ <SettingsCardRow+ label="Memory"+ description={+ <SettingDescription+ text="Persistent context stored in AGENTS.md files"+ docsUrl="https://learn.chatgpt.com/docs/agent-configuration/agents-md"+ />+ }+ >+ <span />+ </SettingsCardRow>- {/* Permissions */}- <Text className="mb-2 block border-gray-6 border-t pt-4 font-medium text-sm">- Permissions- </Text>+ <SettingsCardRow+ label="Hooks"+ description={+ <SettingDescription+ text="Execute commands at specific points in Codex's lifecycle, defined in .codex/hooks.json or config.toml; review them with /hooks inside a session"+ docsUrl="https://learn.chatgpt.com/docs/hooks"+ />+ }+ >+ <span />+ </SettingsCardRow>+ </SettingsCard>+ </SettingsSection>- <SettingRow- label="Claude permission rules"- description="Tool permissions from your Claude settings. Allowed tools run without prompting. Denied tools are always blocked. Codex keeps its own rules in config.toml"+ <SettingsSection+ label="Permissions"+ description="What agents can do without asking you first">- <CopyableCommand command="claude config" />- </SettingRow>+ <SettingsCard>+ <SettingsCardRow+ label="Claude permission rules"+ description="Tool permissions from your Claude settings. Allowed tools run without prompting. Denied tools are always blocked. Codex keeps its own rules in config.toml"+ >+ <CopyableCommand command="claude config" />+ </SettingsCardRow>- <PermissionsSettings />+ <PermissionsSettings />- <SettingRow- label="Allow bypass permissions mode"- description="Adds bypass permissions to the mode menu so you can pick it per session. Sessions keep asking for approval until you pick it. This also unlocks Full access in Codex"- noBorder- >- <Switch- checked={allowBypassPermissions}- onCheckedChange={handleBypassPermissionsChange}- size="1"- color="red"- />- </SettingRow>- {allowBypassPermissions && (- <Callout.Root size="1" color="red" mb="3">- <Callout.Icon>- <Warning weight="fill" />- </Callout.Icon>- <Callout.Text>- Bypass permissions, and Full access in Codex, are now available in- the mode menu in the prompt input. Pick one per session when you- want that session to run shell commands, file edits and web requests- without approval. Other sessions are unaffected.- </Callout.Text>- </Callout.Root>- )}+ <SettingsCardRow+ label="Allow bypass permissions mode"+ description="Adds bypass permissions to the mode menu so you can pick it per session. Sessions keep asking for approval until you pick it. This also unlocks Full access in Codex"+ >+ <Switch+ checked={allowBypassPermissions}+ onCheckedChange={handleBypassPermissionsChange}+ size="1"+ color="red"+ />+ </SettingsCardRow>+ </SettingsCard>+ {allowBypassPermissions && (+ <Callout.Root size="1" color="red" mb="3">+ <Callout.Icon>+ <Warning weight="fill" />+ </Callout.Icon>+ <Callout.Text>+ Bypass permissions, and Full access in Codex, are now available in+ the mode menu in the prompt input. Pick one per session when you+ want that session to run shell commands, file edits and web+ requests without approval. Other sessions are unaffected.+ </Callout.Text>+ </Callout.Root>+ )}+ </SettingsSection><AlertDialog.Rootopen={showBypassWarning}@@ -303,6 +312,6 @@ export function HarnessSettings() {</Flex></AlertDialog.Content></AlertDialog.Root>- </Flex>+ </div>);}diff --git a/products/desktop/packages/ui/src/features/settings/sections/NotificationsSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/NotificationsSettings.tsxindex 100193143784..fe1ba81205fe 100644--- a/products/desktop/packages/ui/src/features/settings/sections/NotificationsSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/NotificationsSettings.tsx@@ -35,6 +35,7 @@ import {SettingsCardRow,SettingsSection,} from "@posthog/ui/features/settings/components/SettingsCard";+import { settingsToggleItemClassName } from "@posthog/ui/features/settings/components/SettingsSegmented";import { SettingsSelect } from "@posthog/ui/features/settings/components/SettingsSelect";import { AddCustomSoundDialog } from "@posthog/ui/features/settings/sections/AddCustomSoundDialog";import { TipsSection } from "@posthog/ui/features/settings/sections/TipsSettings";@@ -233,7 +234,7 @@ export function NotificationsSettings() {<SettingsSectionlabel="Alerts"- description="How agents get your attention when they finish or need you."+ description="How agents get your attention when they finish or need you"action={<Buttontype="button"@@ -284,7 +285,10 @@ export function NotificationsSettings() {</div></SettingsSection>- <SettingsSection label="Sound">+ <SettingsSection+ label="Sound"+ description="What plays when an agent finishes or needs you"+ ><SettingsCard><SettingsCardRowlabel="Completion sound"@@ -372,7 +376,11 @@ export function NotificationsSettings() {</SettingsCardRow>{customSounds.length > 0 && (- <SettingsCardRow label="Custom sounds" stacked>+ <SettingsCardRow+ label="Custom sounds"+ description="Your own sound files, available in the completion sound list"+ stacked+ ><div className="flex w-full flex-col gap-1.5">{customSounds.map((sound) => (<CustomSoundRow@@ -389,7 +397,10 @@ export function NotificationsSettings() {{completionSound !== "none" && (<>- <SettingsCardRow label="Volume">+ <SettingsCardRow+ label="Volume"+ description="How loud alert sounds play"+ ><div className="flex items-center gap-3"><Slideraria-label="Sound volume"@@ -403,7 +414,7 @@ export function NotificationsSettings() {step={1}className="w-[120px]"/>- <span className="w-8 text-right text-[12px] text-gray-10 tabular-nums">+ <span className="w-8 text-right text-[12px] text-muted-foreground tabular-nums">{completionVolume}%</span></div>@@ -526,7 +537,7 @@ function VoiceSection() {return (<SettingsSectionlabel="Voice"- description="The agent says a short line out loud, so you catch it across parallel tasks without watching the screen."+ description="The agent says a short line out loud, so you catch it across parallel tasks without watching the screen"><SettingsCard><SettingsCardRow@@ -551,13 +562,12 @@ function VoiceSection() {value={speakAbout}onValueChange={handleSpeakAboutChange}aria-label="Speak about"- className="gap-1"><ToggleGroupItemvalue="needs_input"size="sm"variant="outline"- className="h-6 px-2.5 text-[12px] text-gray-11 data-[pressed]:border-(--accent-9) data-[pressed]:bg-(--accent-3) data-[pressed]:text-(--accent-11)"+ className={settingsToggleItemClassName}>Needs you</ToggleGroupItem>@@ -565,7 +575,7 @@ function VoiceSection() {value="completion"size="sm"variant="outline"- className="h-6 px-2.5 text-[12px] text-gray-11 data-[pressed]:border-(--accent-9) data-[pressed]:bg-(--accent-3) data-[pressed]:text-(--accent-11)"+ className={settingsToggleItemClassName}>Task finished</ToggleGroupItem>@@ -573,14 +583,17 @@ function VoiceSection() {value="progress"size="sm"variant="outline"- className="h-6 px-2.5 text-[12px] text-gray-11 data-[pressed]:border-(--accent-9) data-[pressed]:bg-(--accent-3) data-[pressed]:text-(--accent-11)"+ className={settingsToggleItemClassName}>Progress</ToggleGroupItem></ToggleGroup></SettingsCardRow>- <SettingsCardRow label="When to speak">+ <SettingsCardRow+ label="When to speak"+ description="Which sessions get spoken narration"+ ><SettingsSelectariaLabel="When to speak"value={spokenFocusMode}@@ -609,8 +622,8 @@ function VoiceSection() {label="ElevenLabs voice"description={elevenLabsKeyConfigured- ? "Key saved. The expressive Eleven v3 voice is on."- : "Optional. Add an API key for an expressive voice; otherwise your system voice is used."+ ? "Key saved; the expressive Eleven v3 voice is on"+ : "Optional; add an API key for an expressive voice; otherwise your system voice is used"}>{elevenLabsKeyConfigured ? (@@ -717,7 +730,7 @@ function CustomSoundRow({if (event.key === "Enter") event.currentTarget.blur();}}/>- <span className="text-[11px] text-gray-9 tabular-nums">+ <span className="text-[11px] text-muted-foreground tabular-nums">{formatDurationSeconds(sound.durationMs)}</span><Tooltip content={`Play ${sound.name}`}>@@ -802,7 +815,10 @@ function TestSection({};return (- <SettingsSection label="Test">+ <SettingsSection+ label="Test"+ description="Send yourself an alert to check the channels above"+ ><SettingsCard><SettingsCardRowlabel="Send a test alert"diff --git a/products/desktop/packages/ui/src/features/settings/sections/OnboardingTestTools.tsx b/products/desktop/packages/ui/src/features/settings/sections/OnboardingTestTools.tsxindex 22a8609c35d9..8049587e1521 100644--- a/products/desktop/packages/ui/src/features/settings/sections/OnboardingTestTools.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/OnboardingTestTools.tsx@@ -32,11 +32,14 @@ export function OnboardingTestTools(): ReactElement {};return (- <SettingsSection label="Onboarding test tools">+ <SettingsSection+ label="Onboarding test tools"+ description="Replay the first-run flow to test it"+ ><SettingsCard><SettingsCardRowlabel="First-run session"- description="Describe who's arriving, then open a session built from those answers."+ description="Describe who's arriving, then open a session built from those answers"><Buttonvariant="outline"@@ -48,7 +51,7 @@ export function OnboardingTestTools(): ReactElement {</SettingsCardRow><SettingsCardRowlabel="Teaching canvas"- description="Creates or repairs the canvas, then opens it."+ description="Creates or repairs the canvas, then opens it"><Buttonvariant="outline"diff --git a/products/desktop/packages/ui/src/features/settings/sections/PermissionsSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/PermissionsSettings.tsxindex 0772498f2c59..ea0af7f53af5 100644--- a/products/desktop/packages/ui/src/features/settings/sections/PermissionsSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/PermissionsSettings.tsx@@ -1,5 +1,5 @@import { useHostTRPC } from "@posthog/host-router/react";-import { Box, Flex, Text } from "@radix-ui/themes";+import { SettingsCardRow } from "@posthog/ui/features/settings/components/SettingsCard";import { useQuery } from "@tanstack/react-query";function PermissionBadge({@@ -25,32 +25,31 @@ function PermissionBadge({function PermissionList({title,+ description,permissions,color,emptyMessage,}: {title: string;+ description: string;permissions: string[];color: "green" | "red";emptyMessage: string;}) {return (- <Box className="rounded-lg border border-gray-6 bg-gray-2 p-3">- <Text className="mb-2 block font-medium text-[13px]">{title}</Text>- <Box className="min-h-[40px] rounded border border-gray-5 bg-gray-3 p-2.5">- {permissions.length > 0 ? (- <Flex wrap="wrap" gap="2">- {permissions.map((perm) => (- <PermissionBadge key={perm} permission={perm} color={color} />- ))}- </Flex>- ) : (- <Text color="gray" className="text-[13px]">- {emptyMessage}- </Text>- )}- </Box>- </Box>+ <SettingsCardRow label={title} description={description} stacked>+ {permissions.length > 0 ? (+ <div className="flex flex-wrap gap-1.5">+ {permissions.map((perm) => (+ <PermissionBadge key={perm} permission={perm} color={color} />+ ))}+ </div>+ ) : (+ <span className="text-[12px] text-muted-foreground">+ {emptyMessage}+ </span>+ )}+ </SettingsCardRow>);}@@ -59,20 +58,21 @@ export function PermissionsSettings() {const { data } = useQuery(trpc.os.getClaudePermissions.queryOptions());return (- <Flex direction="column" gap="3" mb="2">+ <><PermissionListtitle="Allowed"+ description="Tools that run without asking"permissions={data?.allow ?? []}color="green"emptyMessage="No allowed permissions configured"/>-<PermissionListtitle="Denied"+ description="Tools that are always blocked"permissions={data?.deny ?? []}color="red"emptyMessage="No denied permissions configured"/>- </Flex>+ </>);}diff --git a/products/desktop/packages/ui/src/features/settings/sections/PersonalGithubInstallationsSection.tsx b/products/desktop/packages/ui/src/features/settings/sections/PersonalGithubInstallationsSection.tsxindex 05c87d287ecb..172b779842a7 100644--- a/products/desktop/packages/ui/src/features/settings/sections/PersonalGithubInstallationsSection.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/PersonalGithubInstallationsSection.tsx@@ -62,7 +62,7 @@ export function PersonalGithubInstallationsSection() {return (<SettingsSectionlabel="Your GitHub account"- description="Personal GitHub installations linked to your PostHog account. Agents use these to act as you."+ description="Personal GitHub installations linked to your PostHog account; agents use these to act as you"action={<Buttontype="button"@@ -100,10 +100,10 @@ export function PersonalGithubInstallationsSection() {<GithubLogoIcon size={20} /></div><div className="flex flex-col gap-0.5">- <span className="font-medium text-[13px] text-gray-12 leading-5">+ <span className="font-medium text-[13px] text-foreground leading-snug">No GitHub account linked yet</span>- <span className="text-[12px] text-gray-10 leading-snug">+ <span className="text-[12px] text-muted-foreground leading-snug">Connect one so agents can open pull requests as you.</span></div>@@ -223,7 +223,7 @@ function PersonalGithubInstallationRow({}description={status === "unavailable"- ? "The PostHog app is no longer installed on GitHub, so this only removes the stale link from your account."+ ? "The PostHog app is no longer installed on GitHub, so this only removes the stale link from your account": buildGithubDisconnectDescription(accountLabel,integration.installation_shared === true,diff --git a/products/desktop/packages/ui/src/features/settings/sections/PersonalizationSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/PersonalizationSettings.tsxindex 4e850a65c6ae..4a32ade8f9b5 100644--- a/products/desktop/packages/ui/src/features/settings/sections/PersonalizationSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/PersonalizationSettings.tsx@@ -39,7 +39,7 @@ export function PersonalizationSettingsView({return (<SettingsSectionlabel="Custom instructions"- description="Included in every agent session."+ description="Included in every agent session"><SettingsCard><SettingsCardRow@@ -78,7 +78,7 @@ export function PersonalizationSettingsView({/>{syncFromFile ? (synced && (- <span className="text-right text-[12px] text-gray-10">+ <span className="text-right text-[12px] text-muted-foreground">Using{" "}<span className="font-mono text-[11px]">{synced.displayPath}@@ -88,7 +88,7 @@ export function PersonalizationSettingsView({</span>)) : (- <span className="text-right text-[12px] text-gray-10 tabular-nums">+ <span className="text-right text-[12px] text-muted-foreground tabular-nums">{instructions.length}/{MAX_INSTRUCTIONS_LENGTH}</span>)}@@ -217,7 +217,10 @@ function FunSection() {);return (- <SettingsSection label="Fun">+ <SettingsSection+ label="Fun"+ description="Extras that make the app a bit more playful"+ ><SettingsCard><SettingsCardRowlabel="Hedgehog mode"@@ -232,7 +235,7 @@ function FunSection() {<SettingsCardRowlabel="Slot machine mode 🎰"- description="A pull-able lever while a task runs. Every run is a gamble."+ description="A pull-able lever while a task runs; every run is a gamble"><Switchsize="sm"diff --git a/products/desktop/packages/ui/src/features/settings/sections/PlanUsageSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/PlanUsageSettings.tsxindex 61f016618773..5197efb20ed3 100644--- a/products/desktop/packages/ui/src/features/settings/sections/PlanUsageSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/PlanUsageSettings.tsx@@ -126,7 +126,7 @@ export function PlanUsageContent({{billingEnabled && (<SettingsSubsectiontitle="Organization usage"- description="Combined token and cloud-compute spend counts toward your organization's shared allowance and limit."+ description="Combined token and cloud-compute spend counts toward your organization's shared allowance and limit"actions={<Buttonsize="1"@@ -178,7 +178,7 @@ export function PlanUsageContent({align="center"justify="center"p="4"- className="rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid)"+ className="rounded-(--radius-3) border border-border bg-card"><Spinner size="2" /></Flex>@@ -209,7 +209,7 @@ export function PlanUsageContent({justify="between"gap="4"p="4"- className="rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid)"+ className="rounded-(--radius-3) border border-border bg-card"><Text color="gray" className="text-[13px]">{usage@@ -234,7 +234,7 @@ export function PlanUsageContent({{cloudComputeEnabled && hasUsageMix && (<UsageMix components={components} />)}- <Text className="text-[12px] text-gray-10">+ <Text className="text-[12px] text-muted-foreground">Usage reporting may be delayed by 15–20 minutes.</Text></Flex>@@ -275,9 +275,9 @@ function UsageMix({direction="column"gap="3"p="4"- className="rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid)"+ className="rounded-(--radius-3) border border-border bg-card">- <Text className="font-medium text-[13px] text-gray-12">Usage mix</Text>+ <Text className="font-medium text-[13px] text-foreground">Usage mix</Text><divrole="img"aria-label={`${roundedTokenPercent}% tokens and ${totalUsd > 0 ? 100 - roundedTokenPercent : 0}% cloud compute`}@@ -307,7 +307,7 @@ function UsageMix({value={formatUsdAmount(computeUsd)}/></Flex>- <Text className="text-[12px] text-gray-10">+ <Text className="text-[12px] text-muted-foreground">Compute resources: {computeDetails}</Text></Flex>@@ -321,7 +321,7 @@ function PersonalSpendDisclosure({ children }: { children: ReactNode }) {return (<SettingsSubsectiontitle="Your spend"- description="Near-real-time analysis of your activity, separate from organization billing."+ description="Near-real-time analysis of your activity, separate from organization billing"actions={<Buttonsize="1"@@ -355,7 +355,7 @@ function MixLegend({<span className={`size-2 rounded-full ${color}`} /><Text className="text-[13px]"><strong>{percent}%</strong> {label}- <span className="text-gray-10"> · {value}</span>+ <span className="text-muted-foreground"> · {value}</span></Text></Flex>);diff --git a/products/desktop/packages/ui/src/features/settings/sections/ProjectGithubConnectionSection.tsx b/products/desktop/packages/ui/src/features/settings/sections/ProjectGithubConnectionSection.tsxindex 084513254027..5fa9307781b2 100644--- a/products/desktop/packages/ui/src/features/settings/sections/ProjectGithubConnectionSection.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/ProjectGithubConnectionSection.tsx@@ -69,7 +69,7 @@ export function ProjectGithubConnectionSection() {return (<SettingsSectionlabel="Project connection"- description="GitHub access for this project's Self-driving pipeline and cloud tasks."+ description="GitHub access for this project's Self-driving pipeline and cloud tasks">{projectId != null ? (<GithubInstallRequestsBanner@@ -108,7 +108,7 @@ export function ProjectGithubConnectionSection() {) : isAwaitingApproval ? (<SettingsCardRowlabel="No GitHub connection yet"- description="A GitHub organization owner still needs to approve the PostHog app."+ description="A GitHub organization owner still needs to approve the PostHog app"/>) : isAdmin === false && projectId != null ? (<div className="px-3.5 py-3">@@ -121,7 +121,7 @@ export function ProjectGithubConnectionSection() {) : (<SettingsCardRowlabel="No GitHub connection yet"- description="Connect GitHub so Self-driving and cloud tasks can work with your repositories."+ description="Connect GitHub so Self-driving and cloud tasks can work with your repositories"><Buttontype="button"@@ -262,7 +262,7 @@ function ProjectGithubIntegrationRow({}description={status === "unavailable"- ? "The PostHog app is no longer installed on GitHub, so this only removes the stale connection from PostHog."+ ? "The PostHog app is no longer installed on GitHub, so this only removes the stale connection from PostHog": buildGithubDisconnectDescription(accountLabel,integration.installation_shared === true,diff --git a/products/desktop/packages/ui/src/features/settings/sections/QuickAskSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/QuickAskSettings.tsxindex 2fe2d3acc5ac..3bc853493483 100644--- a/products/desktop/packages/ui/src/features/settings/sections/QuickAskSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/QuickAskSettings.tsx@@ -13,10 +13,13 @@ import {type QuickAskState,} from "@posthog/ui/features/quick-ask/identifiers";import { ReasoningLevelSelector } from "@posthog/ui/features/sessions/components/ReasoningLevelSelector";-import { SettingRow } from "@posthog/ui/features/settings/SettingRow";+import {+ SettingsCard,+ SettingsCardRow,+} from "@posthog/ui/features/settings/components/SettingsCard";import { QuickAskShortcutSetting } from "@posthog/ui/features/settings/sections/QuickAskShortcutSetting";import { usePreviewConfig } from "@posthog/ui/features/task-detail/hooks/usePreviewConfig";-import { Flex, Text } from "@radix-ui/themes";+import { Text } from "@radix-ui/themes";import { useCallback, useEffect, useRef, useState } from "react";/** The new-task model pill, wired to the persisted quick-ask defaults. */@@ -163,10 +166,10 @@ export function QuickAskSettings() {const off = !state.active;return (- <Flex direction="column">- <SettingRow+ <SettingsCard>+ <SettingsCardRowlabel="Enable quick ask"- description="The floating panel and its global shortcut. Turning this off frees the shortcut."+ description="The floating panel and its global shortcut; turning this off frees the shortcut"><Switchsize="sm"@@ -174,14 +177,20 @@ export function QuickAskSettings() {onCheckedChange={(checked) => apply({ active: checked })}aria-label="Enable quick ask"/>- </SettingRow>-- <div className={off ? "pointer-events-none opacity-50" : undefined}>+ </SettingsCardRow>++ <div+ className={+ off+ ? "pointer-events-none divide-y divide-border opacity-50"+ : "divide-y divide-border"+ }+ ><QuickAskShortcutSetting disabled={off} />- <SettingRow+ <SettingsCardRowlabel="Default space"- description="New quick-ask threads file into this space."+ description="New quick-ask threads file into this space"><SpaceSelectvalue={selectedSpaceId}@@ -196,15 +205,15 @@ export function QuickAskSettings() {});}}/>- </SettingRow>+ </SettingsCardRow>- <SettingRow+ <SettingsCardRowlabel="Default repositories"description={state.defaultRepositories.length === 0 &&spaceRepositories.length > 0? `None of your own; the space brings ${spaceRepositories.join(", ")}.`- : "Cloned into the sandbox for every new thread. Leave empty for data-only answers, or to use the space's repositories."+ : "Cloned into the sandbox for every new thread; leave empty for data-only answers, or to use the space's repositories"}><RepositoriesField@@ -218,16 +227,15 @@ export function QuickAskSettings() {})}/>- </SettingRow>+ </SettingsCardRow>- <SettingRow+ <SettingsCardRowlabel="Agent"- description="The harness, model, and effort quick-ask answers run with."- noBorder+ description="The harness, model, and effort quick-ask answers run with"><AgentDefaults state={state} apply={apply} disabled={off} />- </SettingRow>+ </SettingsCardRow></div>- </Flex>+ </SettingsCard>);}diff --git a/products/desktop/packages/ui/src/features/settings/sections/QuickAskShortcutSetting.tsx b/products/desktop/packages/ui/src/features/settings/sections/QuickAskShortcutSetting.tsxindex 926fafbf9ed5..d7ac3a47abf5 100644--- a/products/desktop/packages/ui/src/features/settings/sections/QuickAskShortcutSetting.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/QuickAskShortcutSetting.tsx@@ -10,7 +10,7 @@ import {type QuickAskSettingsClient,type QuickAskState,} from "@posthog/ui/features/quick-ask/identifiers";-import { SettingRow } from "@posthog/ui/features/settings/SettingRow";+import { SettingsCardRow } from "@posthog/ui/features/settings/components/SettingsCard";import { track } from "@posthog/ui/shell/analytics";import { useEffect, useState } from "react";@@ -155,12 +155,12 @@ export function QuickAskShortcutSetting({};return (- <SettingRow+ <SettingsCardRowlabel="Ask PostHog anywhere"description={state.active && !state.registered- ? "Another app owns this shortcut. Record a different one."- : "Click, then press the keys you want to summon the panel with."+ ? "Another app owns this shortcut; record a different one"+ : "Click, then press the keys you want to summon the panel with"}><ShortcutRecorder@@ -168,6 +168,6 @@ export function QuickAskShortcutSetting({disabled={disabled}onRecord={handleRecord}/>- </SettingRow>+ </SettingsCardRow>);}diff --git a/products/desktop/packages/ui/src/features/settings/sections/SignalDefaultChannelSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/SignalDefaultChannelSettings.tsxindex 27961158a465..75db767f97fa 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SignalDefaultChannelSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SignalDefaultChannelSettings.tsx@@ -44,8 +44,8 @@ export function SignalDefaultChannelSettings({label="Default notification channel"description={isAdmin === false- ? "Where every report is posted for the whole team. Only organization admins can change it."- : "Where every report is posted for the whole team. Reviewers who set their own channel are notified there instead."+ ? "Where every report is posted for the whole team; only organization admins can change it"+ : "Where every report is posted for the whole team; reviewers who set their own channel are notified there instead"}><SlackChannelComboboxdiff --git a/products/desktop/packages/ui/src/features/settings/sections/SignalSlackNotificationsSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/SignalSlackNotificationsSettings.tsxindex 56ab3acbf462..785cb43f78cb 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SignalSlackNotificationsSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SignalSlackNotificationsSettings.tsx@@ -77,7 +77,7 @@ export function SignalSlackNotificationsSettings({<><SettingsCardRowlabel="Notify me directly"- description="When you're a suggested reviewer, get pinged in your own channel instead of the team's default channel."+ description="When you're a suggested reviewer, get pinged in your own channel instead of the team's default channel"><SlackChannelComboboxintegrationId={integrationId}@@ -91,7 +91,7 @@ export function SignalSlackNotificationsSettings({</SettingsCardRow><SettingsCardRowlabel="Minimum priority"- description="Only ping me for reports at or above this priority."+ description="Only ping me for reports at or above this priority"><SettingsOptionSelectvalue={minPriority ?? NOTIFY_ALL_VALUE}diff --git a/products/desktop/packages/ui/src/features/settings/sections/SlackCommentNotificationsSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/SlackCommentNotificationsSettings.tsxindex 2bddefd32214..930095c525c0 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SlackCommentNotificationsSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SlackCommentNotificationsSettings.tsx@@ -73,7 +73,7 @@ export function SlackCommentNotificationsSettings() {return (<SettingsSectionlabel="Comment notifications"- description="Comment notifications can also reach you in Slack, so you hear about them when PostHog Code isn't open."+ description="Comment notifications can also reach you in Slack, so you hear about them when PostHog Code isn't open"><SettingsCard><SettingsCardRow@@ -81,11 +81,11 @@ export function SlackCommentNotificationsSettings() {description={linked? `Linked to ${links?.[0]?.slack_team_name ?? "Slack"}`- : "Only needed when your Slack email differs from your PostHog email. Otherwise we find you by email."+ : "Only needed when your Slack email differs from your PostHog email; otherwise we find you by email"}>{linked ? (- <span className="text-[12px] text-gray-10">Linked</span>+ <span className="text-[12px] text-muted-foreground">Linked</span>) : (<Buttonsize="sm"diff --git a/products/desktop/packages/ui/src/features/settings/sections/SlackInboxNotificationsSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/SlackInboxNotificationsSettings.tsxindex c72ffc493229..1fc4c8f484bc 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SlackInboxNotificationsSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SlackInboxNotificationsSettings.tsx@@ -92,7 +92,7 @@ export function SlackInboxNotificationsSettings({{!isLoading && slackIntegrations.length > 1 ? (<SettingsCardRowlabel="Workspace"- description="Channels below are listed from this workspace."+ description="Channels below are listed from this workspace"><SettingsOptionSelectvalue={diff --git a/products/desktop/packages/ui/src/features/settings/sections/SlackSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/SlackSettings.tsxindex f251c123bd62..18bc082168cd 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SlackSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SlackSettings.tsx@@ -14,7 +14,7 @@ import {SlackWorkspaceConnectionCallouts,} from "./SlackWorkspaceConnection";-const SLACK_DOCS_URL = "https://posthog.com/docs/libraries/slack";+const SLACK_DOCS_URL = "https://posthog.com/docs/libraries/slack?tab=Desktop";const SETTINGS_REFETCH_INTERVAL_MS = 30_000;export function SlackSettings() {@@ -37,7 +37,7 @@ export function SlackSettings() {<div className="flex flex-col gap-7"><SettingsSectionlabel="Workspace connection"- description="Connect a Slack workspace so reports can post to channels, reviewers get pinged, and you can kick off tasks from Slack."+ description="Connect a Slack workspace so reports can post to channels, reviewers get pinged, and you can kick off tasks from Slack"action={!isLoading && hasSlackIntegration ? (<Button@@ -105,7 +105,7 @@ export function SlackSettings() {<buttontype="button"onClick={() => void openUrlInBrowser(SLACK_DOCS_URL)}- className="ml-auto inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-gray-10 text-xs no-underline hover:text-gray-12"+ className="ml-auto inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-muted-foreground text-xs no-underline hover:text-foreground">Learn about the Slack integration<ArrowSquareOutIcon size={11} />diff --git a/products/desktop/packages/ui/src/features/settings/sections/SlackWorkspaceConnection.tsx b/products/desktop/packages/ui/src/features/settings/sections/SlackWorkspaceConnection.tsxindex dabdf97e4c33..b558e23c5b02 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SlackWorkspaceConnection.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SlackWorkspaceConnection.tsx@@ -40,7 +40,7 @@ export function SlackWorkspaceConnection({if (isLoading) {return (- <div className="flex items-center gap-2 rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid) px-3.5 py-3">+ <div className="flex items-center gap-2 rounded-(--radius-3) border border-border bg-card px-3.5 py-3"><Spinner /><Text size="xs" variant="muted">Loading Slack…@@ -52,7 +52,7 @@ export function SlackWorkspaceConnection({if (hasSlackIntegration) {return (<div className="flex flex-col gap-2">- <div className="divide-y divide-(--gray-4) rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid)">+ <div className="divide-y divide-border rounded-(--radius-3) border border-border bg-card">{slackIntegrations.map((integration) => (<SlackWorkspaceRow key={integration.id} integration={integration} />))}@@ -79,12 +79,12 @@ export function SlackWorkspaceConnection({}return (- <div className="flex min-h-11 items-center justify-between gap-6 rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid) px-3.5 py-2">+ <div className="flex min-h-11 items-center justify-between gap-6 rounded-(--radius-3) border border-border bg-card px-3.5 py-2"><div className="flex min-w-0 flex-col gap-0.5 py-0.5">- <span className="font-medium text-[13px] text-gray-12 leading-5">+ <span className="font-medium text-[13px] text-foreground leading-snug">No Slack workspace connected yet</span>- <span className="text-[12px] text-gray-10 leading-snug">+ <span className="text-[12px] text-muted-foreground leading-snug">Connect a workspace so reports can post to channels and reviewers getpinged.</span>@@ -162,11 +162,11 @@ function SlackWorkspaceRow({ integration }: { integration: Integration }) {<SlackLogoIcon size={24} /></div><div className="flex min-w-0 flex-col gap-0.5">- <span className="truncate font-medium text-[13px] text-gray-12 leading-5">+ <span className="truncate font-medium text-[13px] text-foreground leading-snug">{workspaceName}</span>{createdAt ? (- <span className="truncate text-[12px] text-gray-10 leading-snug">+ <span className="truncate text-[12px] text-muted-foreground leading-snug">Connected {formatRelativeTimeLong(createdAt)}</span>) : null}@@ -216,7 +216,7 @@ export function SlackWorkspaceConnectionCallouts({</div>) : null}{slackConnect.isTimedOut ? (- <div className="rounded-(--radius-2) border border-(--gray-5) bg-(--gray-2) px-3 py-2">+ <div className="rounded-(--radius-2) border border-border bg-(--gray-2) px-3 py-2"><Text size="xs" variant="muted">We didn't hear back from PostHog. If you completed the connection inyour browser it should appear shortly, otherwise try again.diff --git a/products/desktop/packages/ui/src/features/settings/sections/SpendKnobValue.tsx b/products/desktop/packages/ui/src/features/settings/sections/SpendKnobValue.tsxindex 241d52fe8cd1..12d035134a65 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SpendKnobValue.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SpendKnobValue.tsx@@ -67,7 +67,7 @@ export function SpendKnobValue({<inputaria-label={`${name} in dollars. Click to type an amount`}inputMode="decimal"- className={`${BOX} absolute inset-0 cursor-pointer bg-(--color-panel-solid) text-(--gray-12) shadow-sm outline-none focus:cursor-text ${border} ${+ className={`${BOX} absolute inset-0 cursor-pointer bg-card text-(--gray-12) shadow-sm outline-none focus:cursor-text ${border} ${editing ? "" : "hover:border-(--gray-8) hover:bg-(--gray-2)"}`}value={draft}@@ -97,7 +97,7 @@ export function SpendKnobValue({callout points at the knob it belongs to. */}<spanaria-hidden="true"- className={`-bottom-[4px] -translate-x-1/2 absolute left-1/2 size-[7px] rotate-45 border-r border-b bg-(--color-panel-solid) ${border}`}+ className={`-bottom-[4px] -translate-x-1/2 absolute left-1/2 size-[7px] rotate-45 border-r border-b bg-card ${border}`}/></span>);diff --git a/products/desktop/packages/ui/src/features/settings/sections/SpendLimitCard.tsx b/products/desktop/packages/ui/src/features/settings/sections/SpendLimitCard.tsxindex 321e35516225..c3f99463c4c5 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SpendLimitCard.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SpendLimitCard.tsx@@ -79,7 +79,7 @@ export function SpendLimitCard({};return (- <div className="flex flex-col gap-3 rounded-(--radius-3) border border-(--gray-5) bg-(--color-panel-solid) px-4 py-3.5">+ <div className="flex flex-col gap-3 rounded-(--radius-3) border border-border bg-card px-4 py-3.5"><div className="flex items-center justify-between gap-4"><span className="flex min-w-0 flex-col gap-0.5"><Text className="text-(--gray-12) text-[13px]">{title}</Text>diff --git a/products/desktop/packages/ui/src/features/settings/sections/SpendLimitsSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/SpendLimitsSettings.tsxindex f7eb33ff117a..005085e402c7 100644--- a/products/desktop/packages/ui/src/features/settings/sections/SpendLimitsSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/SpendLimitsSettings.tsx@@ -125,14 +125,14 @@ export function SpendLimitsSettingsView({title="Spend limits"description={stopAvailable- ? "A warning line notifies you. A stop line pauses new agent messages until you raise or clear it, and a turn already running always plays out. Lines count model spend, not sandbox compute."- : "A warning line notifies you when spend passes it, and a turn already running always plays out. Lines count model spend, not sandbox compute."+ ? "A warning line notifies you; a stop line pauses new agent messages until you raise or clear it, and a turn already running always plays out; lines count model spend, not sandbox compute"+ : "A warning line notifies you when spend passes it, and a turn already running always plays out; lines count model spend, not sandbox compute"}><SpendLimitCardscope="day"title="Per day"- description="Counts every task you run in a day, and resets at midnight UTC."+ description="Counts every task you run in a day, and resets at midnight UTC"spentUsd={totals?.todayUsd ?? null}soFarLabel="today"markerUsd={avgUsd}@@ -153,8 +153,8 @@ export function SpendLimitsSettingsView({title="Per month"description={stopAvailable- ? "Counts 30 days of model spend, and restarts once the window runs out."- : "Counts the whole calendar month, and resets on the first."+ ? "Counts 30 days of model spend, and restarts once the window runs out"+ : "Counts the whole calendar month, and resets on the first"}spentUsd={totals?.monthUsd ?? null}soFarLabel="this month"diff --git a/products/desktop/packages/ui/src/features/settings/sections/TerminalSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/TerminalSettings.tsxindex fb39d955de8b..51b72c833923 100644--- a/products/desktop/packages/ui/src/features/settings/sections/TerminalSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/TerminalSettings.tsx@@ -1,5 +1,8 @@import { ANALYTICS_EVENTS } from "@posthog/shared";-import { SettingRow } from "@posthog/ui/features/settings/SettingRow";+import {+ SettingsCard,+ SettingsCardRow,+} from "@posthog/ui/features/settings/components/SettingsCard";import {type TerminalFont,useSettingsStore,@@ -70,8 +73,8 @@ export function TerminalSettings() {const showCustomInput = terminalFont === "custom";return (- <Flex direction="column" gap="1" py="4">- <SettingRow+ <SettingsCard>+ <SettingsCardRowlabel="Font"description="Font used to render the terminal output">@@ -88,12 +91,12 @@ export function TerminalSettings() {<Select.Item value="custom">Custom</Select.Item></Select.Content></Select.Root>- </SettingRow>+ </SettingsCardRow>{showCustomInput && (- <SettingRow+ <SettingsCardRowlabel="Custom font family"- description="Any CSS font-family value. Example: Fira Code, Cascadia Code"+ description="Any CSS font-family value; example: Fira Code, Cascadia Code"><Flex direction="column" align="end" gap="1"><TextField.Root@@ -107,20 +110,19 @@ export function TerminalSettings() {Falls back to Berkeley Mono if unavailable</Text></Flex>- </SettingRow>+ </SettingsCardRow>)}- <SettingRow+ <SettingsCardRowlabel="GPU rendering"- description="Render the terminal with WebGL for smoother output under heavy load. Disable if you hit graphical glitches."- noBorder+ description="Render the terminal with WebGL for smoother output under heavy load; disable if you hit graphical glitches"><Switchchecked={terminalGpuRendering}onCheckedChange={handleGpuRenderingChange}size="1"/>- </SettingRow>- </Flex>+ </SettingsCardRow>+ </SettingsCard>);}diff --git a/products/desktop/packages/ui/src/features/settings/sections/TipsSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/TipsSettings.tsxindex 7e09b29b1912..2d3a6c4a4817 100644--- a/products/desktop/packages/ui/src/features/settings/sections/TipsSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/TipsSettings.tsx@@ -28,7 +28,10 @@ export function TipsSection() {);return (- <SettingsSection label="Tips">+ <SettingsSection+ label="Tips"+ description="Short pointers that appear the first time a part of the app matters"+ ><SettingsCard><SettingsCardRowlabel="Tips"diff --git a/products/desktop/packages/ui/src/features/settings/sections/UpdatesSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/UpdatesSettings.tsxindex 48e5f244bd0d..5b88e347dc8d 100644--- a/products/desktop/packages/ui/src/features/settings/sections/UpdatesSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/UpdatesSettings.tsx@@ -149,13 +149,16 @@ export function UpdatesSection() {);return (- <SettingsSection label="Updates">+ <SettingsSection+ label="Updates"+ description="The version you are on and how new versions arrive"+ ><SettingsCard><SettingsCardRowlabel={<span className="inline-flex items-baseline gap-2">Version- <span className="font-mono font-normal text-[12px] text-gray-11">+ <span className="font-mono font-normal text-[12px] text-muted-foreground">{appVersion ?? "…"}</span></span>diff --git a/products/desktop/packages/ui/src/features/settings/sections/WorkspacesSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/WorkspacesSettings.tsxindex 88b864f84475..aac84a0badc4 100644--- a/products/desktop/packages/ui/src/features/settings/sections/WorkspacesSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/WorkspacesSettings.tsx@@ -1,12 +1,16 @@import { Folder, X } from "@phosphor-icons/react";import { useHostTRPCClient } from "@posthog/host-router/react";import { Button } from "@posthog/quill";+import {+ SettingsCard,+ SettingsCardRow,+ SettingsSection,+} from "@posthog/ui/features/settings/components/SettingsCard";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { useEffect, useState } from "react";import { toast } from "../../../primitives/toast";import { logger } from "../../../shell/logger";import { FolderPicker } from "../../folder-picker/FolderPicker";-import { SettingRow } from "../SettingRow";const log = logger.scope("workspaces-settings");@@ -83,32 +87,33 @@ export function WorkspacesSettings() {};return (- <div className="flex flex-col">- <SettingRow- label="Workspace location"- description="Directory where isolated workspaces are created for each task"+ <div className="flex flex-col gap-7">+ <SettingsCard>+ <SettingsCardRow+ label="Workspace location"+ description="Directory where isolated workspaces are created for each task"+ >+ <div className="min-w-[200px]">+ <FolderPicker+ value={localWorktreeLocation}+ onChange={handleWorktreeLocationChange}+ placeholder="~/.posthog-code"+ />+ </div>+ </SettingsCardRow>+ </SettingsCard>+ <SettingsSection+ label="Default folders for new chats"+ description="Folders the agent can access in every new chat on your device">- <div className="min-w-[200px]">- <FolderPicker- value={localWorktreeLocation}- onChange={handleWorktreeLocationChange}- placeholder="~/.posthog-code"- />- </div>- </SettingRow>- <div className="flex flex-col gap-2 py-4">- <p className="font-medium text-sm">Default folders for new chats</p>- <p className="text-(--gray-11) text-[13px]">- Folders the agent can access in every new chat on your device.- </p>- <div className="mt-1 flex flex-col gap-2">+ <div className="flex flex-col gap-2">{defaults.length === 0 && (<p className="text-(--gray-11) text-[12px]">No default folders.</p>)}{defaults.map((path) => (<divkey={path}- className="flex min-w-0 items-center gap-2 rounded-(--radius-2) border border-(--gray-5) bg-(--gray-2) px-2 py-1"+ className="flex min-w-0 items-center gap-2 rounded-(--radius-2) border border-border bg-(--gray-2) px-2 py-1"><Folder size={12} className="shrink-0 text-(--gray-11)" /><span@@ -137,7 +142,7 @@ export function WorkspacesSettings() {</Button></div></div>- </div>+ </SettingsSection></div>);}diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/BuildLogPane.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/BuildLogPane.tsxindex 36eb2ede6b44..0852ad5de9f1 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/BuildLogPane.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/BuildLogPane.tsx@@ -74,7 +74,7 @@ export function BuildLogPane({ image }: BuildLogPaneProps) {<divref={scrollRef}onScroll={handleScroll}- className="max-h-[280px] overflow-auto rounded-(--radius-3) border border-(--gray-5) bg-(--gray-2) p-2.5"+ className="max-h-[280px] overflow-auto rounded-(--radius-3) border border-border bg-(--gray-2) p-2.5"><pre className="m-0 whitespace-pre-wrap break-words font-mono text-(--gray-11) text-[11px] leading-relaxed">{buildLog}diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/CloudEnvironmentsSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/CloudEnvironmentsSettings.tsxindex c2c371fe1b16..f6dbd45d1cc3 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/CloudEnvironmentsSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/CloudEnvironmentsSettings.tsx@@ -102,7 +102,7 @@ export function CloudEnvironmentsSettings() {<div className="flex flex-col gap-6"><Sectiontitle="Environments"- description="A profile a cloud session runs under: the repositories it works on, the hosts it may reach, and the image it starts from."+ description="A profile a cloud session runs under: the repositories it works on, the hosts it may reach, and the image it starts from"action={<Buttonvariant="outline"@@ -141,7 +141,7 @@ export function CloudEnvironmentsSettings() {{customImagesEnabled && (<Sectiontitle="Images"- description="A sandbox image built once with your tools and dependencies already installed. Any environment can start from it."+ description="A sandbox image built once with your tools and dependencies already installed; any environment can start from it"action={<Buttonvariant="outline"@@ -212,7 +212,7 @@ function Section({function EmptyNote({ children }: { children: ReactNode }) {return (- <div className="rounded-(--radius-3) border border-(--gray-5) border-dashed px-3 py-3">+ <div className="rounded-(--radius-3) border border-border border-dashed px-3 py-3"><Text className="text-(--gray-11) text-[11.5px] leading-snug">{children}</Text>diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/CustomImageList.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/CustomImageList.tsxindex edc0f68af3c1..3491c2d44f3f 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/CustomImageList.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/CustomImageList.tsx@@ -37,7 +37,7 @@ export function CustomImageList({onOpen,}: CustomImageListProps) {return (- <div className="flex flex-col divide-y divide-(--gray-4) overflow-hidden rounded-(--radius-3) border border-(--gray-5)">+ <div className="flex flex-col divide-y divide-border overflow-hidden rounded-(--radius-3) border border-border">{images.map((image) => {const used = usedBy(image.id);return (diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/EnvironmentForm.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/EnvironmentForm.tsxindex 22b88ce2aae2..9a8ba4b5cecb 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/EnvironmentForm.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/EnvironmentForm.tsx@@ -110,7 +110,7 @@ export function EnvironmentForm({<buttontype="button"onClick={onBack}- className="flex w-fit cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-[12px] text-gray-11 hover:text-gray-12"+ className="flex w-fit cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-[12px] text-muted-foreground hover:text-foreground"><ArrowLeft size={10} /><span>Back to projects</span>diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/EnvironmentList.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/EnvironmentList.tsxindex ae3a9d45084c..f5f0cbcaf47c 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/EnvironmentList.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/EnvironmentList.tsx@@ -25,7 +25,7 @@ export function EnvironmentList({onEdit,}: EnvironmentListProps) {return (- <div className="flex flex-col divide-y divide-(--gray-4) overflow-hidden rounded-(--radius-3) border border-(--gray-5)">+ <div className="flex flex-col divide-y divide-border overflow-hidden rounded-(--radius-3) border border-border">{environments.map((environment) => (<divkey={environment.id}diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/ImageDetailPage.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/ImageDetailPage.tsxindex 4195d357bb6a..822eac2b17f4 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/ImageDetailPage.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/ImageDetailPage.tsx@@ -196,7 +196,7 @@ export function ImageDetailPage({{/* filePath drives the language mode, so this is a real YAML editor. */}{/* A definite height: the editor fills its parent and scrolls inside,so min/max alone would clip instead of scroll. */}- <div className="h-[380px] overflow-hidden rounded-(--radius-3) border border-(--gray-5)">+ <div className="h-[380px] overflow-hidden rounded-(--radius-3) border border-border">{/* Seed from the server value, not the live-edited spec: feedingedits back as content would recreate the editor each keystrokeand lose the caret. Edits are captured through onContentChange. */}diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/ProjectEnvironmentCard.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/ProjectEnvironmentCard.tsxindex a8c5b659493e..1c20407826b0 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/ProjectEnvironmentCard.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/ProjectEnvironmentCard.tsx@@ -31,7 +31,7 @@ export function ProjectEnvironmentCard({return (<Flexdirection="column"- className="rounded-(--radius-2) border border-(--gray-5)"+ className="rounded-(--radius-2) border border-border"><Flex align="center" justify="between" gap="2" px="3" py="2"><Flex align="center" gap="2" className="min-w-0 flex-1">diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/EnvironmentEditForm.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/EnvironmentEditForm.tsxindex 86cfa23773dc..92946c09d6e9 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/EnvironmentEditForm.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/EnvironmentEditForm.tsx@@ -74,7 +74,7 @@ export function EnvironmentEditForm({</Text></div>- <div className="flex flex-col gap-5 rounded-(--radius-4) border border-(--gray-5) bg-(--color-panel-solid) px-5 py-4">+ <div className="flex flex-col gap-5 rounded-(--radius-4) border border-border bg-card px-5 py-4"><Section><EnvironmentStepeditingdiff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/AccessStep.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/AccessStep.tsxindex 6e04448a346d..536c444ef0a0 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/AccessStep.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/AccessStep.tsx@@ -26,7 +26,7 @@ export function AccessStep({return (<StepBodytitle="Access"- description="Which hosts sessions may reach, and the values they get before the agent runs."+ description="Which hosts sessions may reach, and the values they get before the agent runs"><div className="flex max-w-[520px] flex-col gap-2"><Label className="font-medium text-[12.5px]">Network access</Label>diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/BaseImageStep.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/BaseImageStep.tsxindex 3a47fbf93d9c..8b4a9547be8a 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/BaseImageStep.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/BaseImageStep.tsx@@ -39,7 +39,7 @@ export function BaseImageStep({return (<StepBodytitle="Base image"- description="What every session in this environment boots from."+ description="What every session in this environment boots from"><RadioCards<BaseImageChoice>ariaLabel="Base image"diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/EnvVarRows.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/EnvVarRows.tsxindex 3cf70ad7aa7a..10e6b91dc1ee 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/EnvVarRows.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/EnvVarRows.tsx@@ -127,7 +127,7 @@ export function EnvVarRows({if (rows.length === 0) {return wrap(- <div className="flex flex-col items-start gap-2 rounded-(--radius-3) border border-(--gray-5) border-dashed px-3 py-3">+ <div className="flex flex-col items-start gap-2 rounded-(--radius-3) border border-border border-dashed px-3 py-3"><Text className="text-(--gray-11) text-[11.5px]">None yet. Add them one at a time, or paste a .env file into the firstrow.diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/EnvironmentStep.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/EnvironmentStep.tsxindex c55629c4d3c0..21bfee670322 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/EnvironmentStep.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/EnvironmentStep.tsx@@ -46,7 +46,7 @@ export function EnvironmentStep({return (<StepBodytitle={editing ? "Name and repositories" : "What are you setting up?"}- description="Name it, and pick the repositories its sessions work on."+ description="Name it, and pick the repositories its sessions work on">{/* Targeting an existing environment only attaches an image to it, sowithout custom images there is nothing this choice could do. */}diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ImageDetailsStep.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ImageDetailsStep.tsxindex 792f5ba2da67..3c685bb75cf2 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ImageDetailsStep.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ImageDetailsStep.tsx@@ -28,7 +28,7 @@ export function ImageDetailsStep({ plan, onChange }: ImageDetailsStepProps) {return (<StepBodytitle="What is this image for?"- description="A sandbox image with your tools already installed. Any environment can start from it."+ description="A sandbox image with your tools already installed; any environment can start from it"><div className="flex flex-col gap-2"><Label htmlFor={nameId} className="font-medium text-[12.5px]">diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ReviewStep.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ReviewStep.tsxindex 01ce94733f85..2c60855dfd00 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ReviewStep.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ReviewStep.tsx@@ -33,7 +33,7 @@ export function ReviewStep({: [];return (- <StepBody title="Review" description="This is what gets created.">+ <StepBody title="Review" description="This is what gets created"><dl className="flex flex-col gap-2 text-[12.5px]">{plan.scope === "image" ? (<>@@ -100,7 +100,7 @@ export function ReviewStep({<Text className="font-medium text-(--gray-11) text-[11px] uppercase tracking-wide">Image spec</Text>- <pre className="max-h-[176px] overflow-auto rounded-(--radius-3) border border-(--gray-5) bg-(--gray-2) px-3 py-2.5 font-mono text-(--gray-11) text-[11.5px] leading-relaxed">+ <pre className="max-h-[176px] overflow-auto rounded-(--radius-3) border border-border bg-(--gray-2) px-3 py-2.5 font-mono text-(--gray-11) text-[11.5px] leading-relaxed">{imageSpecToYaml(buildImageSpec(planSpecInput(plan)))}</pre></div>diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/SetupStep.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/SetupStep.tsxindex 0ea4f346dd42..fb5bfad8650e 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/SetupStep.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/SetupStep.tsx@@ -51,7 +51,7 @@ export function SetupStep({return (<StepBodytitle="Setup commands"- description="Setup commands run inside a repository checkout, so this image has nothing to run them in."+ description="Setup commands run inside a repository checkout, so this image has nothing to run them in"><Buttonvariant="outline"diff --git a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ToolsStep.tsx b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ToolsStep.tsxindex 14cec634817d..cb62037b6500 100644--- a/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ToolsStep.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/environments/setup/steps/ToolsStep.tsx@@ -52,7 +52,7 @@ export function ToolsStep({ plan, onChange }: ToolsStepProps) {return (<StepBodytitle="Tools on the image"- description="Tools an agent reaches for on most runs. Each one is listed with the reason it is here."+ description="Tools an agent reaches for on most runs; each one is listed with the reason it is here"><div className="flex w-full items-center gap-3"><div className="relative flex-1">@@ -83,7 +83,7 @@ export function ToolsStep({ plan, onChange }: ToolsStepProps) {anything else you name.</Text>) : (- <div className="relative max-h-[360px] w-full overflow-y-auto rounded-(--radius-3) border border-(--gray-5)">+ <div className="relative max-h-[360px] w-full overflow-y-auto rounded-(--radius-3) border border-border"><TooltipProvider delay={TOOLTIP_DELAY_MS}>{IMAGE_TOOL_CATEGORIES.map((category) => {const tools = visible.filter(@@ -197,7 +197,7 @@ function ToolReason({ htmlFor, reason }: { htmlFor: string; reason: string }) {render={<labelhtmlFor={htmlFor}- className="block cursor-pointer truncate text-(--gray-11) text-[11.5px] leading-5"+ className="block cursor-pointer truncate text-(--gray-11) text-[11.5px] leading-snug">{reason}</label>diff --git a/products/desktop/packages/ui/src/features/settings/sections/worktrees/WorktreeRow.tsx b/products/desktop/packages/ui/src/features/settings/sections/worktrees/WorktreeRow.tsxindex d9cec31b0eda..4ab7d3acb992 100644--- a/products/desktop/packages/ui/src/features/settings/sections/worktrees/WorktreeRow.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/worktrees/WorktreeRow.tsx@@ -70,14 +70,16 @@ export function WorktreeRow({key={task.id}type="button"onClick={() => handleTaskClick(task)}- className="cursor-pointer truncate border-0 bg-transparent p-0 text-left text-[12px] text-gray-10 hover:text-accent-11 hover:underline"+ className="cursor-pointer truncate border-0 bg-transparent p-0 text-left text-[12px] text-muted-foreground hover:text-accent-11 hover:underline">{getTaskTitle(task)}</button>))}</Flex>) : (- <span className="text-[12px] text-gray-10">No linked tasks</span>+ <span className="text-[12px] text-muted-foreground">+ No linked tasks+ </span>)}</Flex><Buttondiff --git a/products/desktop/packages/ui/src/features/settings/sections/worktrees/WorktreesSettings.tsx b/products/desktop/packages/ui/src/features/settings/sections/worktrees/WorktreesSettings.tsxindex 405d789d55ac..b95255230be5 100644--- a/products/desktop/packages/ui/src/features/settings/sections/worktrees/WorktreesSettings.tsx+++ b/products/desktop/packages/ui/src/features/settings/sections/worktrees/WorktreesSettings.tsx@@ -5,7 +5,11 @@ import {} from "@posthog/core/settings/worktreeGrouping";import { deleteWorktree as runDeleteWorktree } from "@posthog/core/settings/worktreeMaintenanceService";import { useHostTRPC, useHostTRPCClient } from "@posthog/host-router/react";-import { Flex, Switch, Text, TextField } from "@radix-ui/themes";+import {+ SettingsCard,+ SettingsCardRow,+} from "@posthog/ui/features/settings/components/SettingsCard";+import { Switch, Text, TextField } from "@radix-ui/themes";import { useQueries, useQueryClient } from "@tanstack/react-query";import { useCallback, useMemo, useState } from "react";import { toast } from "../../../../primitives/toast";@@ -15,7 +19,6 @@ import { useSuspensionSettings } from "../../../suspension/useSuspensionSettingsimport { useDeleteTask } from "../../../tasks/useTaskCrudMutations";import { useTasks } from "../../../tasks/useTasks";import { WORKSPACE_QUERY_KEY } from "../../../workspace/identifiers";-import { SettingRow } from "../../SettingRow";import { useSettingsStore } from "../../settingsStore";import { WorktreeGroupSection } from "./WorktreeGroupSection";@@ -138,9 +141,9 @@ export function WorktreesSettings() {const isLoading = worktreeQueries.some((q) => q.isLoading);return (- <Flex direction="column" gap="5">- <Flex direction="column">- <SettingRow+ <div className="flex flex-col gap-7">+ <SettingsCard>+ <SettingsCardRowlabel="Show worktrees in sidebar"description="List worktrees that have no task under each repo in the sidebar, so you can start a task in one with a click">@@ -149,10 +152,10 @@ export function WorktreesSettings() {onCheckedChange={setShowSidebarWorktrees}size="1"/>- </SettingRow>- <SettingRow+ </SettingsCardRow>+ <SettingsCardRowlabel="Automatically suspend stale worktrees"- description="Suspend stale worktrees to save disk space. Suspended worktrees can be restored at any time. Only disable if you prefer to manage worktrees manually."+ description="Suspend stale worktrees to save disk space; suspended worktrees can be restored at any time; only disable if you prefer to manage worktrees manually"><Switchchecked={settings.autoSuspendEnabled}@@ -161,8 +164,8 @@ export function WorktreesSettings() {}size="1"/>- </SettingRow>- <SettingRow+ </SettingsCardRow>+ <SettingsCardRowlabel="Max active worktrees"description="When this limit is reached, the least recently active worktree will be automatically suspended">@@ -180,11 +183,10 @@ export function WorktreesSettings() {}}className="w-[64px]"/>- </SettingRow>- <SettingRow+ </SettingsCardRow>+ <SettingsCardRowlabel="Auto-suspend after inactivity"description="Suspend worktrees with no activity for this many days"- noBorder><TextField.Rootkey={`days-${settings.autoSuspendAfterDays}`}@@ -200,8 +202,8 @@ export function WorktreesSettings() {}}className="w-[64px]"/>- </SettingRow>- </Flex>+ </SettingsCardRow>+ </SettingsCard>{isLoading ? (<Text color="gray" className="text-sm">@@ -222,6 +224,6 @@ export function WorktreesSettings() {/>)))}- </Flex>+ </div>);}diff --git a/products/desktop/packages/ui/src/features/settings/settingsSearch.ts b/products/desktop/packages/ui/src/features/settings/settingsSearch.tsindex a3abf420d048..293e2d79d6b8 100644--- a/products/desktop/packages/ui/src/features/settings/settingsSearch.ts+++ b/products/desktop/packages/ui/src/features/settings/settingsSearch.ts@@ -243,11 +243,6 @@ export const SETTINGS_SEARCH_INDEX: SettingsSearchEntry[] = [label: "Discord",keywords: ["presence", "integration"],},- {- category: "sidebar",- label: "Sidebar",- keywords: ["nav", "customize", "reorder"],- },{category: "advanced",diff --git a/products/desktop/packages/ui/src/features/settings/types.test.ts b/products/desktop/packages/ui/src/features/settings/types.test.tsindex ddadf7da03d1..aebcbd04ce80 100644--- a/products/desktop/packages/ui/src/features/settings/types.test.ts+++ b/products/desktop/packages/ui/src/features/settings/types.test.ts@@ -2,14 +2,14 @@ import { describe, expect, it } from "vitest";import { isSettingsCategory, resolveSettingsCategory } from "./types";describe("isSettingsCategory", () => {- it("recognizes sidebar experience settings", () => {- expect(isSettingsCategory("sidebar")).toBe(true);+ it("recognizes a known category", () => {+ expect(isSettingsCategory("terminal")).toBe(true);});});describe("resolveSettingsCategory", () => {it.each([- ["sidebar", "sidebar"],+ ["terminal", "terminal"],// Startup restores the last URL, so dropping this mapping would silently// land anyone parked on the old Claude Code page in General.["claude-code", "harness"],diff --git a/products/desktop/packages/ui/src/features/settings/types.ts b/products/desktop/packages/ui/src/features/settings/types.tsindex 1b31eebde7c9..89f4bb4932e1 100644--- a/products/desktop/packages/ui/src/features/settings/types.ts+++ b/products/desktop/packages/ui/src/features/settings/types.ts@@ -11,7 +11,6 @@ export type SettingsCategory =| "skills"| "mcp-servers"| "personalization"- | "sidebar"| "terminal"| "harness"| "shortcuts"@@ -35,7 +34,6 @@ export const SETTINGS_CATEGORIES: readonly SettingsCategory[] = ["skills","mcp-servers","personalization",- "sidebar","terminal","harness","shortcuts",@@ -67,7 +65,6 @@ export const SETTINGS_PAGE_LABELS: Record<SettingsCategory, string> = {skills: "Skills","mcp-servers": "MCP servers",personalization: "Personalization",- sidebar: "Sidebar",terminal: "Terminal",harness: "Harness",shortcuts: "Shortcuts",diff --git a/products/desktop/packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.test.tsx b/products/desktop/packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.test.tsxdeleted file mode 100644index b5a1dcb0909b..000000000000--- a/products/desktop/packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.test.tsx+++ /dev/null@@ -1,232 +0,0 @@-import { LOOPS_FLAG, PROJECT_BLUEBIRD_FLAG } from "@posthog/shared";-import { ANALYTICS_EVENTS } from "@posthog/shared/analytics-events";-import { Theme } from "@radix-ui/themes";-import { act, render, screen } from "@testing-library/react";-import userEvent from "@testing-library/user-event";-import { beforeEach, describe, expect, it, vi } from "vitest";--type CapturedDragEvent = {- operation: { source?: { id?: string }; target?: { id?: string } };- canceled?: boolean;-};--const { track, dndCapture, featureFlags } = vi.hoisted(() => ({- track: vi.fn(),- featureFlags: new Map<string, boolean>(),- dndCapture: {} as {- onDragStart?: (event: CapturedDragEvent) => void;- onDragOver?: (event: CapturedDragEvent) => void;- onDragEnd?: (event: CapturedDragEvent) => void;- },-}));--vi.mock("@posthog/ui/shell/analytics", () => ({ track }));-vi.mock("@posthog/ui/features/feature-flags/useFeatureFlag", () => ({- useFeatureFlag: (key: string) => featureFlags.get(key) ?? true,-}));-vi.mock("@dnd-kit/react", () => ({- DragDropProvider: ({- onDragStart,- onDragOver,- onDragEnd,- children,- }: {- onDragStart?: (event: CapturedDragEvent) => void;- onDragOver?: (event: CapturedDragEvent) => void;- onDragEnd?: (event: CapturedDragEvent) => void;- children?: React.ReactNode;- }) => {- dndCapture.onDragStart = onDragStart;- dndCapture.onDragOver = onDragOver;- dndCapture.onDragEnd = onDragEnd;- return <>{children}</>;- },-}));-vi.mock("@dnd-kit/react/sortable", () => ({- useSortable: () => ({- ref: () => {},- handleRef: () => {},- isDragging: false,- }),-}));--import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";-import { CustomizeSidebarSettings } from "./CustomizeSidebarDialog";--function renderSettings() {- return render(- <Theme>- <CustomizeSidebarSettings />- </Theme>,- );-}--function dragStart(sourceId: string) {- act(() => {- dndCapture.onDragStart?.({ operation: { source: { id: sourceId } } });- });-}--function dragOver(sourceId: string, targetId: string) {- act(() => {- dndCapture.onDragOver?.({- operation: { source: { id: sourceId }, target: { id: targetId } },- });- });-}--function dragEnd(- sourceId: string,- { cancel = false }: { cancel?: boolean } = {},-) {- act(() => {- dndCapture.onDragEnd?.({- operation: { source: { id: sourceId } },- canceled: cancel,- });- });-}--function rowLabels() {- return screen- .getAllByRole("checkbox")- .map((checkbox) => checkbox.closest("label")?.textContent);-}--describe("CustomizeSidebarSettings", () => {- beforeEach(() => {- track.mockReset();- featureFlags.clear();- useSidebarStore.setState({ navItemOverrides: {}, navItemOrder: [] });- });-- it("omits items whose features are unavailable", () => {- featureFlags.set(LOOPS_FLAG, false);-- renderSettings();-- expect(- screen.queryByRole("checkbox", { name: "Loops" }),- ).not.toBeInTheDocument();- });-- it("keeps Activity customizable when Tasks mode is selected", () => {- featureFlags.set(PROJECT_BLUEBIRD_FLAG, true);- useSidebarStore.setState({ channelsEnabled: false });-- renderSettings();-- expect(- screen.getByRole("checkbox", { name: "Activity" }),- ).toBeInTheDocument();- });-- it("unchecking a visible item demotes it and tracks the change", async () => {- const user = userEvent.setup();- renderSettings();-- await user.click(screen.getByRole("checkbox", { name: "Command Center" }));-- expect(useSidebarStore.getState().navItemOverrides["command-center"]).toBe(- false,- );- expect(track).toHaveBeenCalledWith(ANALYTICS_EVENTS.SIDEBAR_CUSTOMIZED, {- item: "command_center",- visible: false,- });- });-- it("checking a hidden item promotes it and tracks the change", async () => {- const user = userEvent.setup();- useSidebarStore.setState({ navItemOverrides: { inbox: false } });- renderSettings();-- await user.click(screen.getByRole("checkbox", { name: "Self-driving" }));-- expect(useSidebarStore.getState().navItemOverrides.inbox).toBe(true);- expect(track).toHaveBeenCalledWith(ANALYTICS_EVENTS.SIDEBAR_CUSTOMIZED, {- item: "inbox",- visible: true,- });- });-- it("renders rows in the stored order", () => {- useSidebarStore.setState({ navItemOrder: ["configure", "inbox"] });- renderSettings();-- expect(rowLabels().slice(0, 2)).toEqual(["Settings", "Self-driving"]);- });-- it("previews on dragover and persists only on drop", () => {- renderSettings();-- dragStart("loops");- dragOver("loops", "inbox");-- expect(rowLabels()[0]).toBe("Loops");- expect(useSidebarStore.getState().navItemOrder).toEqual([]);- expect(track).not.toHaveBeenCalled();-- dragEnd("loops");-- expect(useSidebarStore.getState().navItemOrder).toEqual([- "loops",- "inbox",- "activity",- "command-center",- "contexts",- "configure",- ]);- expect(track).toHaveBeenCalledWith(ANALYTICS_EVENTS.SIDEBAR_REORDERED, {- item: "loops",- to_index: 0,- });- });-- it("ignores a repeated dragover for the same source and target", () => {- renderSettings();-- dragStart("loops");- dragOver("loops", "inbox");- dragOver("loops", "inbox");-- expect(rowLabels()[0]).toBe("Loops");-- dragEnd("loops");-- expect(useSidebarStore.getState().navItemOrder[0]).toBe("loops");- });-- it("a canceled drag drops the preview and leaves the store untouched", () => {- renderSettings();-- dragStart("loops");- dragOver("loops", "inbox");- dragEnd("loops", { cancel: true });-- expect(rowLabels()[0]).toBe("Self-driving");- expect(useSidebarStore.getState().navItemOrder).toEqual([]);- expect(track).not.toHaveBeenCalled();- });-- it("a drop without movement neither persists nor tracks", () => {- renderSettings();-- dragStart("loops");- dragEnd("loops");-- expect(useSidebarStore.getState().navItemOrder).toEqual([]);- expect(track).not.toHaveBeenCalled();- });-- it("reset clears the stored order back to the default", async () => {- const user = userEvent.setup();- useSidebarStore.setState({ navItemOrder: ["loops", "inbox"] });- renderSettings();-- await user.click(screen.getByRole("button", { name: "Reset" }));-- expect(useSidebarStore.getState().navItemOrder).toEqual([]);- expect(rowLabels()[0]).toBe("Self-driving");- });-});diff --git a/products/desktop/packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.tsx b/products/desktop/packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.tsxdeleted file mode 100644index a26f06dff83b..000000000000--- a/products/desktop/packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.tsx+++ /dev/null@@ -1,215 +0,0 @@-import { type DragDropEvents, DragDropProvider } from "@dnd-kit/react";-import { useSortable } from "@dnd-kit/react/sortable";-import {- Bell,- BookOpenTextIcon,- DotsSixVertical,- EnvelopeSimple,- SlidersHorizontal,- SquaresFourIcon,-} from "@phosphor-icons/react";-import { LOOPS_FLAG, PROJECT_BLUEBIRD_FLAG } from "@posthog/shared";-import { ANALYTICS_EVENTS } from "@posthog/shared/analytics-events";-import { useContextLayerFlag } from "@posthog/ui/features/feature-flags/useContextLayerFlag";-import { useFeatureFlag } from "@posthog/ui/features/feature-flags/useFeatureFlag";-import {- CUSTOMIZABLE_NAV_ITEMS,- type CustomizableNavItem,- type CustomizableNavItemId,- isNavItemVisible,- moveNavItem,- orderedNavItems,-} from "@posthog/ui/features/sidebar/constants";-import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";-import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";-import { track } from "@posthog/ui/shell/analytics";-import { Button, Checkbox, Flex, Text } from "@radix-ui/themes";-import { type RefCallback, useRef, useState } from "react";--const ITEM_ICONS: Record<- CustomizableNavItemId,- React.ComponentType<{ size?: number | string }>-> = {- inbox: EnvelopeSimple,- "command-center": SquaresFourIcon,- activity: Bell,- configure: SlidersHorizontal,- loops: LoopIcon,- contexts: BookOpenTextIcon,-};--function sameOrder(- a: readonly CustomizableNavItemId[],- b: readonly CustomizableNavItemId[],-): boolean {- return a.length === b.length && a.every((id, i) => id === b[i]);-}--export function CustomizeSidebarSettings() {- const loopsEnabled = useFeatureFlag(LOOPS_FLAG, import.meta.env.DEV);- const bluebirdEnabled = useFeatureFlag(- PROJECT_BLUEBIRD_FLAG,- import.meta.env.DEV,- );- const contextEnabled = useContextLayerFlag();- const navItemOverrides = useSidebarStore((s) => s.navItemOverrides);- const navItemOrder = useSidebarStore((s) => s.navItemOrder);- const setNavItemVisible = useSidebarStore((s) => s.setNavItemVisible);- const setNavItemOrder = useSidebarStore((s) => s.setNavItemOrder);-- // Dragover only moves this local preview. Committing to the store per- // dragover would serialize it to localStorage and re-render the live- // sidebar on every pointer move, which made dragging visibly lag; the- // store commits once on drop and a canceled drag just drops the preview.- const previewRef = useRef<readonly CustomizableNavItemId[] | null>(null);- const [previewOrder, setPreviewOrder] = useState<- readonly CustomizableNavItemId[] | null- >(null);- const updatePreview = (order: readonly CustomizableNavItemId[] | null) => {- previewRef.current = order;- setPreviewOrder(order);- };- // dragover can re-fire for the same source/target pair while the pointer- // sits on a row boundary; replaying the move would swap the rows back.- const lastMove = useRef<string | null>(null);-- const items = orderedNavItems(previewOrder ?? navItemOrder).filter(- ({ id }) => {- if (id === "loops") return loopsEnabled;- if (id === "activity") return bluebirdEnabled;- if (id === "contexts") return contextEnabled;- return true;- },- );-- const handleDragStart: DragDropEvents["dragstart"] = () => {- lastMove.current = null;- updatePreview(- orderedNavItems(useSidebarStore.getState().navItemOrder).map(- (item) => item.id,- ),- );- };-- const handleDragOver: DragDropEvents["dragover"] = (event) => {- const sourceId = event.operation.source?.id;- const targetId = event.operation.target?.id;- const current = previewRef.current;- if (!current || !sourceId || !targetId || sourceId === targetId) return;- const moveKey = `${String(sourceId)}->${String(targetId)}`;- if (lastMove.current === moveKey) return;- const next = moveNavItem(current, String(sourceId), String(targetId));- if (next !== current) {- lastMove.current = moveKey;- updatePreview(next);- }- };-- const handleDragEnd: DragDropEvents["dragend"] = (event) => {- const preview = previewRef.current;- updatePreview(null);- if (event.canceled || !preview) return;- const stored = orderedNavItems(useSidebarStore.getState().navItemOrder).map(- (item) => item.id,- );- if (sameOrder(stored, preview)) return;- setNavItemOrder(preview);- const moved = CUSTOMIZABLE_NAV_ITEMS.find(- ({ id }) => id === event.operation.source?.id,- );- if (!moved) return;- track(ANALYTICS_EVENTS.SIDEBAR_REORDERED, {- item: moved.analyticsId,- to_index: preview.indexOf(moved.id),- });- };-- return (- <Flex direction="column" className="max-w-[360px]">- <Text className="text-gray-10 text-sm">- Choose which items appear in your sidebar and drag to reorder.- </Text>-- {/* Default pointer activation starts a mouse drag from the handle- immediately; a distance constraint here would delay pickup. */}- <DragDropProvider- onDragStart={handleDragStart}- onDragOver={handleDragOver}- onDragEnd={handleDragEnd}- >- <Flex direction="column" gap="3" mt="4">- {items.map((item, index) => (- <SortableNavItemRow- key={item.id}- item={item}- index={index}- visible={isNavItemVisible(navItemOverrides, item.id)}- onVisibleChange={(nextVisible) => {- setNavItemVisible(item.id, nextVisible);- track(ANALYTICS_EVENTS.SIDEBAR_CUSTOMIZED, {- item: item.analyticsId,- visible: nextVisible,- });- }}- />- ))}- </Flex>- </DragDropProvider>-- <Flex mt="4" justify="start" align="center">- <Button- size="1"- variant="ghost"- color="gray"- onClick={() => setNavItemOrder([])}- >- Reset- </Button>- </Flex>- </Flex>- );-}--function SortableNavItemRow({- item,- index,- visible,- onVisibleChange,-}: {- item: CustomizableNavItem;- index: number;- visible: boolean;- onVisibleChange: (visible: boolean) => void;-}) {- const { ref, handleRef, isDragging } = useSortable({- id: item.id,- index,- group: "customize-sidebar-nav",- transition: { duration: 200, easing: "ease" },- });- const ItemIcon = ITEM_ICONS[item.id];- return (- <div ref={ref} style={{ opacity: isDragging ? 0.5 : 1 }}>- <Flex gap="2" align="center">- <button- ref={handleRef as RefCallback<HTMLButtonElement>}- type="button"- title="Drag to reorder"- className="shrink-0 cursor-grab text-gray-9 hover:text-gray-11"- >- <DotsSixVertical size={14} />- </button>- <Text as="label" size="2" className="flex-1">- <Flex gap="2" align="center" className="group">- <Checkbox- checked={visible}- onCheckedChange={(checked) => onVisibleChange(checked === true)}- />- <ItemIcon size={16} />- {item.label}- </Flex>- </Text>- </Flex>- </div>- );-}diff --git a/products/desktop/packages/ui/src/features/sidebar/components/ProjectSwitcher.tsx b/products/desktop/packages/ui/src/features/sidebar/components/ProjectSwitcher.tsxindex 75ef685f5033..57644abbcba2 100644--- a/products/desktop/packages/ui/src/features/sidebar/components/ProjectSwitcher.tsx+++ b/products/desktop/packages/ui/src/features/sidebar/components/ProjectSwitcher.tsx@@ -43,6 +43,7 @@ import { useCurrentUser } from "@posthog/ui/features/auth/useCurrentUser";import { useChannelsLayout } from "@posthog/ui/features/canvas/hooks/useChannelsLayout";import { useProjects } from "@posthog/ui/features/projects/useProjects";import { openSettings } from "@posthog/ui/features/settings/hooks/useOpenSettings";+import type { SettingsCategory } from "@posthog/ui/features/settings/types";import { useHoldSidebarPeek } from "@posthog/ui/features/sidebar/useHoldSidebarPeek";import { useWhatsNewStore } from "@posthog/ui/features/updates/whatsNewStore";import {@@ -59,11 +60,18 @@ import { useMemo, useState } from "react";interface ProjectSwitcherProps {appearance?: "row" | "icon";+ /**+ * Settings navigation owned by the embedding shell. The settings dialog on+ * the consent screen mounts before the router, so it has to move its own+ * state — a URL change reaches nothing there.+ */+ onNavigateToSettings?: (category: SettingsCategory) => void;}/** The account / project / org menu. */export function ProjectSwitcher({appearance = "row",+ onNavigateToSettings,}: ProjectSwitcherProps = {}) {const [popoverOpen, setPopoverOpen] = useState(false);@@ -173,15 +181,18 @@ export function ProjectSwitcher({navigateToArchived();};- const handleSettings = () => {+ const goToSettings = (category: SettingsCategory) => {setPopoverOpen(false);- openSettings();+ if (onNavigateToSettings) {+ onNavigateToSettings(category);+ return;+ }+ openSettings(category);};- const handleKeyboardShortcuts = () => {- setPopoverOpen(false);- openSettings("shortcuts");- };+ const handleSettings = () => goToSettings("general");++ const handleKeyboardShortcuts = () => goToSettings("shortcuts");const handleOpenExternal = (url: string) => {openExternalUrl(url);@@ -219,7 +230,7 @@ export function ProjectSwitcher({) : (<Itemsize="xs"- className="border-transparent bg-fill-hover py-1.5 hover:bg-fill-selected aria-expanded:bg-fill-active"+ className="border-transparent bg-transparent py-1.5 hover:bg-fill-hover aria-expanded:bg-fill-selected"><ItemContent className="select-none gap-0"><ItemTitle>{projectName}</ItemTitle>diff --git a/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.test.tsx b/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.test.tsxindex b8e61533ac1f..05af51bd3b01 100644--- a/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.test.tsx+++ b/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.test.tsx@@ -124,11 +124,7 @@ describe("SidebarNavSection", () => {beforeEach(() => {vi.clearAllMocks();useAppView.mockReturnValue({ type: "task-input" });- useSidebarStore.setState({- navItemOverrides: {},- navItemOrder: [],- channelsEnabled: true,- });+ useSidebarStore.setState({ channelsEnabled: true });});it("renders Search directly and removes the More dropdown", () => {@@ -140,19 +136,6 @@ describe("SidebarNavSection", () => {).not.toBeInTheDocument();});- it.each([- ["inbox", "Self-driving"],- ["command-center", "Command Center"],- ["activity", "Activity"],- ["configure", "Settings"],- ["loops", "Loops"],- ] as const)("removes %s from the sidebar when hidden", (id, label) => {- useSidebarStore.setState({ navItemOverrides: { [id]: false } });- renderNav();-- expect(screen.queryByText(label)).not.toBeInTheDocument();- });-it("renders Activity directly under Inbox by default", () => {renderNav();diff --git a/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx b/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.tsxindex da25de733c17..ebea2912cfcb 100644--- a/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx+++ b/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx@@ -13,12 +13,9 @@ import { useReportsInboxEnabled } from "@posthog/ui/features/feature-flags/useReimport { useInboxDecisionCount } from "@posthog/ui/features/inbox/hooks/useInboxDecisionCount";import { openSettings } from "@posthog/ui/features/settings/hooks/useOpenSettings";import {- CUSTOMIZABLE_NAV_ITEM_IDS,- type CustomizableNavItemId,- isNavItemVisible,- orderedNavItems,+ NAV_ITEMS,+ type NavItemId,} from "@posthog/ui/features/sidebar/constants";-import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";import {navigateToActivity,navigateToCommandCenter,@@ -66,9 +63,9 @@ export function SidebarNavSection({}: SidebarNavSectionProps = {}) {const view = useAppView();const openBrowserTab = useOpenBrowserTab();- // Loops stays behind the loops flag; default on in dev so local builds- // keep the nav item. Also gates the per-channel Loops tab (see ChannelTabs).- const loopsEnabled = useFeatureFlag(LOOPS_FLAG, import.meta.env.DEV);+ // Loops stays behind the loops flag. Also gates the per-channel Loops tab+ // (see ChannelTabs).+ const loopsEnabled = useFeatureFlag(LOOPS_FLAG);// Channels stay behind project-bluebird, including channel-only nav items.const bluebirdEnabled = useFeatureFlag(PROJECT_BLUEBIRD_FLAG,@@ -81,11 +78,8 @@ export function SidebarNavSection({const mentionsEnabled = useActivityFilterStore((state) => state.mentionsEnabled,);- const navItemOverrides = useSidebarStore((s) => s.navItemOverrides);- const navItemOrder = useSidebarStore((s) => s.navItemOrder);const inboxAvailable = !channelReportsEnabled || reportsInboxEnabled;- const inboxVisible =- inboxAvailable && isNavItemVisible(navItemOverrides, "inbox");+ const inboxVisible = inboxAvailable;const inboxDecisionCount = useInboxDecisionCount({ enabled: inboxVisible });const contextEnabled = useContextLayerFlag();const inSpaces = useRouterState({@@ -138,13 +132,7 @@ export function SidebarNavSection({action();};- const orderedItems = orderedNavItems(navItemOrder);- const hidden = new Set<CustomizableNavItemId>(- CUSTOMIZABLE_NAV_ITEM_IDS.filter(- (id) => !isNavItemVisible(navItemOverrides, id),- ),- );- const navItemAvailable: Record<CustomizableNavItemId, boolean> = {+ const navItemAvailable: Record<NavItemId, boolean> = {// The global reports inbox reclaims the slot from the channel-reports// takeover; without it, spaces own reports and the entry goes away.inbox: inboxAvailable,@@ -155,12 +143,9 @@ export function SidebarNavSection({loops: loopsEnabled,};- // One renderer per customizable item, used for both the top level (depth 0)+ // One renderer per nav item, used for both the top level (depth 0)// and the expanded More section (depth 1) so the two never drift apart.- const renderNavItem: Record<- CustomizableNavItemId,- (depth: 0 | 1) => ReactNode- > = {+ const renderNavItem: Record<NavItemId, (depth: 0 | 1) => ReactNode> = {inbox: (depth) => (<InboxItemdepth={depth}@@ -218,9 +203,7 @@ export function SidebarNavSection({),};- const topLevelItems = orderedItems.filter(- ({ id }) => navItemAvailable[id] && !hidden.has(id),- );+ const topLevelItems = NAV_ITEMS.filter(({ id }) => navItemAvailable[id]);return (<Flex direction="column" className="shrink-0 gap-px px-2 py-2"><Box mb="2">diff --git a/products/desktop/packages/ui/src/features/sidebar/constants.test.ts b/products/desktop/packages/ui/src/features/sidebar/constants.test.tsdeleted file mode 100644index 5874ab5e47e3..000000000000--- a/products/desktop/packages/ui/src/features/sidebar/constants.test.ts+++ /dev/null@@ -1,121 +0,0 @@-import { describe, expect, it } from "vitest";-import {- CUSTOMIZABLE_NAV_ITEM_IDS,- moveNavItem,- orderedNavItems,- sanitizeNavItemOrder,-} from "./constants";--describe("CUSTOMIZABLE_NAV_ITEM_IDS", () => {- it("keeps configuration destinations out of the top-level navigation", () => {- expect(CUSTOMIZABLE_NAV_ITEM_IDS).not.toEqual(- expect.arrayContaining(["agents", "skills", "mcp-servers"]),- );- });-- it("keeps fixed search out of the customizable navigation", () => {- expect(CUSTOMIZABLE_NAV_ITEM_IDS).not.toContain("search");- });-});--describe("orderedNavItems", () => {- it("returns the default order for an empty stored order", () => {- expect(orderedNavItems([]).map((item) => item.id)).toEqual(- CUSTOMIZABLE_NAV_ITEM_IDS,- );- });-- it("inserts an id missing from a full stored order after its default predecessor", () => {- const withoutConfigure = CUSTOMIZABLE_NAV_ITEM_IDS.filter(- (id) => id !== "configure",- ).reverse();-- const ids = orderedNavItems(withoutConfigure).map((item) => item.id);-- expect(ids.indexOf("configure")).toBe(ids.indexOf("contexts") + 1);- });-- it("keeps Activity directly below Inbox in an existing persisted order", () => {- const ids = orderedNavItems([- "inbox",- "loops",- "command-center",- "activity",- "configure",- ]).map((item) => item.id);-- expect(ids.indexOf("activity")).toBe(ids.indexOf("inbox") + 1);- // "contexts" is absent from the persisted order (it shipped later), so it- // slots in after its default predecessor.- expect(ids.filter((id) => id !== "activity")).toEqual([- "inbox",- "loops",- "command-center",- "contexts",- "configure",- ]);- });-- it("inserts a missing id with no present predecessor at the start", () => {- const ids = orderedNavItems(["command-center", "loops"]).map(- (item) => item.id,- );-- expect(ids[0]).toBe("inbox");- });-- it("puts stored ids first and appends the rest in default order", () => {- const ids = orderedNavItems(["configure", "inbox"]).map((item) => item.id);-- expect(ids.slice(0, 2)).toEqual(["configure", "inbox"]);- expect(ids.slice(2)).toEqual(- CUSTOMIZABLE_NAV_ITEM_IDS.filter(- (id) => id !== "configure" && id !== "inbox",- ),- );- });-});--describe("moveNavItem", () => {- it("moves an item backward to the target position", () => {- const next = moveNavItem([], "loops", "inbox");-- expect(next[0]).toBe("loops");- expect(next).toHaveLength(CUSTOMIZABLE_NAV_ITEM_IDS.length);- });-- it("moves an item forward to the target position", () => {- const next = moveNavItem([], "inbox", "loops");-- expect(next.indexOf("inbox")).toBe(- CUSTOMIZABLE_NAV_ITEM_IDS.indexOf("loops"),- );- });-- it.each([- ["an unknown source", "retired-item", "inbox"],- ["an unknown target", "inbox", "retired-item"],- ["the same source and target", "inbox", "inbox"],- ])("returns the order unchanged for %s", (_label, source, target) => {- const order: readonly ("loops" | "inbox")[] = ["loops", "inbox"];-- expect(moveNavItem(order, source, target)).toBe(order);- });-});--describe("sanitizeNavItemOrder", () => {- it.each([- ["a string", "corrupt"],- ["an object", { inbox: 0 }],- ["null", null],- ["a number", 7],- ])("returns an empty order when the value is %s", (_label, value) => {- expect(sanitizeNavItemOrder(value)).toEqual([]);- });-- it("drops unknown ids, non-strings and duplicates", () => {- expect(- sanitizeNavItemOrder(["loops", "retired-item", 7, "inbox", "loops"]),- ).toEqual(["loops", "inbox"]);- });-});diff --git a/products/desktop/packages/ui/src/features/sidebar/constants.ts b/products/desktop/packages/ui/src/features/sidebar/constants.tsindex 13257d58a06a..cc696996daf5 100644--- a/products/desktop/packages/ui/src/features/sidebar/constants.ts+++ b/products/desktop/packages/ui/src/features/sidebar/constants.ts@@ -14,141 +14,21 @@ export const CHANNELS_SIDEBAR_MIN_WIDTH = 272;* has to add it. */export const NAV_RAIL_WIDTH = 44;-export const CUSTOMIZABLE_NAV_ITEMS = [- {- id: "inbox",- label: "Self-driving",- analyticsId: "inbox",- defaultVisible: true,- },- {- id: "activity",- label: "Activity",- analyticsId: "activity",- defaultVisible: true,- },- {- id: "loops",- label: "Loops",- analyticsId: "loops",- defaultVisible: true,- },+export const NAV_ITEMS = [+ { id: "inbox", label: "Self-driving", analyticsId: "inbox" },+ { id: "activity", label: "Activity", analyticsId: "activity" },+ { id: "loops", label: "Loops", analyticsId: "loops" },{id: "command-center",label: "Command Center",analyticsId: "command_center",- defaultVisible: true,- },- {- id: "contexts",- label: "Context",- analyticsId: "contexts",- defaultVisible: true,- },- {- id: "configure",- label: "Settings",- analyticsId: "configure",- defaultVisible: true,},+ { id: "contexts", label: "Context", analyticsId: "contexts" },+ { id: "configure", label: "Settings", analyticsId: "configure" },] as const satisfies readonly {id: string;label: string;analyticsId: SidebarNavItem;- defaultVisible: boolean;}[];-export type CustomizableNavItemId =- (typeof CUSTOMIZABLE_NAV_ITEMS)[number]["id"];--export const CUSTOMIZABLE_NAV_ITEM_IDS = CUSTOMIZABLE_NAV_ITEMS.map(- (item) => item.id,-);--export type NavItemOverrides = Partial<Record<CustomizableNavItemId, boolean>>;--const DEFAULT_VISIBILITY: Record<CustomizableNavItemId, boolean> =- Object.fromEntries(- CUSTOMIZABLE_NAV_ITEMS.map((item) => [item.id, item.defaultVisible]),- ) as Record<CustomizableNavItemId, boolean>;--export function isNavItemVisible(- overrides: NavItemOverrides,- id: CustomizableNavItemId,-): boolean {- return overrides[id] ?? DEFAULT_VISIBILITY[id];-}--export type CustomizableNavItem = (typeof CUSTOMIZABLE_NAV_ITEMS)[number];--/** Applies a stored drag order. Ids missing from it (newly shipped items)- * slot in after their nearest default predecessor instead of at the end, so- * users with a saved order still get new items near their intended spot. */-export function orderedNavItems(- order: readonly CustomizableNavItemId[],-): readonly CustomizableNavItem[] {- if (order.length === 0) return CUSTOMIZABLE_NAV_ITEMS;- const byId = new Map(CUSTOMIZABLE_NAV_ITEMS.map((item) => [item.id, item]));- const result = [...order];- for (const [defaultIndex, item] of CUSTOMIZABLE_NAV_ITEMS.entries()) {- if (result.includes(item.id)) continue;- let insertAt = 0;- for (let i = defaultIndex - 1; i >= 0; i--) {- const neighbor = result.indexOf(CUSTOMIZABLE_NAV_ITEMS[i].id);- if (neighbor !== -1) {- insertAt = neighbor + 1;- break;- }- }- result.splice(insertAt, 0, item.id);- }- const activityIndex = result.indexOf("activity");- const inboxIndex = result.indexOf("inbox");- if (activityIndex !== inboxIndex + 1) {- result.splice(activityIndex, 1);- result.splice(result.indexOf("inbox") + 1, 0, "activity");- }- return result.flatMap((id) => {- const item = byId.get(id);- return item ? [item] : [];- });-}--export function moveNavItem(- order: readonly CustomizableNavItemId[],- sourceId: string,- targetId: string,-): readonly CustomizableNavItemId[] {- const full = orderedNavItems(order).map((item) => item.id);- const ids: readonly string[] = full;- const from = ids.indexOf(sourceId);- const to = ids.indexOf(targetId);- if (from === -1 || to === -1 || from === to) return order;- const [moved] = full.splice(from, 1);- full.splice(to, 0, moved);- return full;-}--export function sanitizeNavItemOrder(value: unknown): CustomizableNavItemId[] {- if (!Array.isArray(value)) return [];- const order = new Set<CustomizableNavItemId>();- for (const entry of value) {- const id = CUSTOMIZABLE_NAV_ITEM_IDS.find((known) => known === entry);- if (id) order.add(id);- }- return [...order];-}--/** Keeps only known item ids with boolean values, so corrupt or stale- * persisted state degrades to per-item defaults instead of crashing. */-export function sanitizeNavItemOverrides(value: unknown): NavItemOverrides {- if (typeof value !== "object" || value === null || Array.isArray(value)) {- return {};- }- const overrides: NavItemOverrides = {};- for (const id of CUSTOMIZABLE_NAV_ITEM_IDS) {- const entry = (value as Record<string, unknown>)[id];- if (typeof entry === "boolean") overrides[id] = entry;- }- return overrides;-}+export type NavItemId = (typeof NAV_ITEMS)[number]["id"];diff --git a/products/desktop/packages/ui/src/features/sidebar/sidebarStore.test.ts b/products/desktop/packages/ui/src/features/sidebar/sidebarStore.test.tsindex 4c90a926174b..758a7d2e72ad 100644--- a/products/desktop/packages/ui/src/features/sidebar/sidebarStore.test.ts+++ b/products/desktop/packages/ui/src/features/sidebar/sidebarStore.test.ts@@ -1,111 +1,7 @@-import { beforeEach, describe, expect, it } from "vitest";-import { CUSTOMIZABLE_NAV_ITEMS, isNavItemVisible } from "./constants";+import { describe, expect, it } from "vitest";import { useSidebarStore } from "./sidebarStore";-describe("sidebarStore navItemOverrides", () => {- beforeEach(() => {- useSidebarStore.setState({- navItemOverrides: {},- navItemOrder: [],- listItemMetadataFields: [],- });- });-- it.each(- CUSTOMIZABLE_NAV_ITEMS.map(- (item) => [item.id, item.defaultVisible] as const,- ),- )("%s is visible=%s by default", (id, defaultVisible) => {- const overrides = useSidebarStore.getState().navItemOverrides;- expect(isNavItemVisible(overrides, id)).toBe(defaultVisible);- });-- it.each(CUSTOMIZABLE_NAV_ITEMS.map((item) => item.id))(- "setNavItemVisible(%s) overrides in both directions",- (id) => {- useSidebarStore.getState().setNavItemVisible(id, true);- expect(- isNavItemVisible(useSidebarStore.getState().navItemOverrides, id),- ).toBe(true);-- useSidebarStore.getState().setNavItemVisible(id, false);- expect(- isNavItemVisible(useSidebarStore.getState().navItemOverrides, id),- ).toBe(false);- },- );-- it("overriding one item leaves the others at their defaults", () => {- useSidebarStore.getState().setNavItemVisible("inbox", false);-- const overrides = useSidebarStore.getState().navItemOverrides;- for (const item of CUSTOMIZABLE_NAV_ITEMS) {- if (item.id === "inbox") continue;- expect(isNavItemVisible(overrides, item.id)).toBe(item.defaultVisible);- }- });-- it.each([- ["a string", "corrupt"],- ["an array", ["search"]],- ["null", null],- ["a number", 7],- ])(- "rehydration falls back to defaults when persisted overrides are %s",- async (_label, corrupt) => {- localStorage.setItem(- "sidebar-storage",- JSON.stringify({ state: { navItemOverrides: corrupt }, version: 0 }),- );-- await useSidebarStore.persist.rehydrate();-- expect(useSidebarStore.getState().navItemOverrides).toEqual({});- localStorage.removeItem("sidebar-storage");- },- );-- it("rehydration falls back to defaults when persisted state predates overrides", async () => {- localStorage.setItem(- "sidebar-storage",- JSON.stringify({ state: { open: true }, version: 0 }),- );-- await useSidebarStore.persist.rehydrate();-- expect(useSidebarStore.getState().navItemOverrides).toEqual({});- localStorage.removeItem("sidebar-storage");- });-- it("rehydration sanitizes navItemOrder to known unique ids", async () => {- localStorage.setItem(- "sidebar-storage",- JSON.stringify({- state: {- navItemOrder: ["loops", "retired-item", 7, "inbox", "loops"],- },- version: 0,- }),- );-- await useSidebarStore.persist.rehydrate();-- expect(useSidebarStore.getState().navItemOrder).toEqual(["loops", "inbox"]);- localStorage.removeItem("sidebar-storage");- });-- it("rehydration falls back to default order when the persisted order is not an array", async () => {- localStorage.setItem(- "sidebar-storage",- JSON.stringify({ state: { navItemOrder: "corrupt" }, version: 0 }),- );-- await useSidebarStore.persist.rehydrate();-- expect(useSidebarStore.getState().navItemOrder).toEqual([]);- localStorage.removeItem("sidebar-storage");- });-+describe("sidebarStore", () => {it("rehydration sanitizes list item metadata fields", async () => {localStorage.setItem("sidebar-storage",@@ -125,27 +21,4 @@ describe("sidebarStore navItemOverrides", () => {]);localStorage.removeItem("sidebar-storage");});-- it("rehydration drops unknown ids and non-boolean values", async () => {- localStorage.setItem(- "sidebar-storage",- JSON.stringify({- state: {- navItemOverrides: {- inbox: true,- "retired-item": true,- skills: "yes",- },- },- version: 0,- }),- );-- await useSidebarStore.persist.rehydrate();-- expect(useSidebarStore.getState().navItemOverrides).toEqual({- inbox: true,- });- localStorage.removeItem("sidebar-storage");- });});diff --git a/products/desktop/packages/ui/src/features/sidebar/sidebarStore.ts b/products/desktop/packages/ui/src/features/sidebar/sidebarStore.tsindex b0edae11d1f2..ebb9e83c8052 100644--- a/products/desktop/packages/ui/src/features/sidebar/sidebarStore.ts+++ b/products/desktop/packages/ui/src/features/sidebar/sidebarStore.ts@@ -10,13 +10,7 @@ import { ALL_WORKSPACE_MODES } from "@posthog/core/sidebar/buildSidebarData";import type { WorkspaceMode } from "@posthog/shared";import { create } from "zustand";import { persist } from "zustand/middleware";-import {- type CustomizableNavItemId,- type NavItemOverrides,- SIDEBAR_MIN_WIDTH,- sanitizeNavItemOrder,- sanitizeNavItemOverrides,-} from "./constants";+import { SIDEBAR_MIN_WIDTH } from "./constants";import {type ListItemMetadataField,sanitizeListItemMetadataFields,@@ -45,13 +39,6 @@ interface SidebarStoreState {// the task list, Canvas nav item appears). Off by default — Code merged into// the Bluebird chrome ships with channels hidden until the user opts in.channelsEnabled: boolean;- // Per-item visibility overrides from the Customize sidebar dialog. Items- // absent from the map follow their CUSTOMIZABLE_NAV_ITEMS defaultVisible, so newly- // shipped moreable items keep their intended default for existing users.- navItemOverrides: NavItemOverrides;- // Drag order from the Customize sidebar dialog. Empty means default order;- // ids absent from it (newly shipped items) render after the ordered ones.- navItemOrder: readonly CustomizableNavItemId[];}interface SidebarStoreActions {@@ -76,8 +63,6 @@ interface SidebarStoreActions {setChannelItemSort: (sort: ChannelItemSort) => void;setChannelItemGrouping: (grouping: ChannelItemGrouping) => void;setChannelsEnabled: (channelsEnabled: boolean) => void;- setNavItemVisible: (item: CustomizableNavItemId, visible: boolean) => void;- setNavItemOrder: (order: readonly CustomizableNavItemId[]) => void;}type SidebarStore = SidebarStoreState & SidebarStoreActions;@@ -102,8 +87,6 @@ export const useSidebarStore = create<SidebarStore>()(channelItemSort: DEFAULT_CHANNEL_ITEM_SORT,channelItemGrouping: DEFAULT_CHANNEL_ITEM_GROUPING,channelsEnabled: false,- navItemOverrides: {},- navItemOrder: [],setOpen: (open) => set({ open, hasUserSetOpen: true }),setOpenAuto: (open) =>set((state) => (state.hasUserSetOpen ? state : { open })),@@ -163,11 +146,6 @@ export const useSidebarStore = create<SidebarStore>()(: [...state.taskTypeFilter, mode],})),setChannelsEnabled: (channelsEnabled) => set({ channelsEnabled }),- setNavItemVisible: (item, visible) =>- set((state) => ({- navItemOverrides: { ...state.navItemOverrides, [item]: visible },- })),- setNavItemOrder: (navItemOrder) => set({ navItemOrder }),setChannelItemFilters: (channelItemFilters) =>set({ channelItemFilters }),setChannelItemSort: (channelItemSort) => set({ channelItemSort }),@@ -193,8 +171,6 @@ export const useSidebarStore = create<SidebarStore>()(channelItemSort: state.channelItemSort,channelItemGrouping: state.channelItemGrouping,channelsEnabled: state.channelsEnabled,- navItemOverrides: state.navItemOverrides,- navItemOrder: state.navItemOrder,}),merge: (persisted, current) => {const persistedState = persisted as {@@ -214,8 +190,6 @@ export const useSidebarStore = create<SidebarStore>()(channelItemSort?: ChannelItemSort;channelItemGrouping?: ChannelItemGrouping;channelsEnabled?: boolean;- navItemOverrides?: unknown;- navItemOrder?: unknown;};return {...current,@@ -251,10 +225,6 @@ export const useSidebarStore = create<SidebarStore>()(persistedState.channelItemGrouping ?? current.channelItemGrouping,channelsEnabled:persistedState.channelsEnabled ?? current.channelsEnabled,- navItemOverrides: sanitizeNavItemOverrides(- persistedState.navItemOverrides,- ),- navItemOrder: sanitizeNavItemOrder(persistedState.navItemOrder),};},},diff --git a/products/desktop/packages/ui/src/features/task-detail/components/TaskInput.tsx b/products/desktop/packages/ui/src/features/task-detail/components/TaskInput.tsxindex 538a7dd66096..0cf96a446d90 100644--- a/products/desktop/packages/ui/src/features/task-detail/components/TaskInput.tsx+++ b/products/desktop/packages/ui/src/features/task-detail/components/TaskInput.tsx@@ -1264,7 +1264,7 @@ export function TaskInput({<Flexgap="2"align="center"- className="absolute bottom-full left-0 mb-1 min-w-0 gap-1"+ className="absolute bottom-full left-0 mb-2 min-w-0 gap-1">{spaceSelector?.({ disabled: isCreatingTask })}<WorkspaceModeSelectdiff --git a/products/desktop/packages/ui/src/primitives/Tooltip.tsx b/products/desktop/packages/ui/src/primitives/Tooltip.tsxindex 351dbd53709f..87b0c7d21d4d 100644--- a/products/desktop/packages/ui/src/primitives/Tooltip.tsx+++ b/products/desktop/packages/ui/src/primitives/Tooltip.tsx@@ -43,7 +43,7 @@ export function Tooltip({side={side}align={align}sideOffset={sideOffset}- className="dark flex items-center gap-[8px] rounded-[6px] border border-(--gray-4) bg-(--gray-2) px-[10px] py-[6px] text-(--gray-12) text-xs leading-[1.4]"+ className="dark flex items-center gap-1.5 rounded-[6px] border border-(--gray-4) bg-(--gray-2) px-[10px] py-[6px] text-(--gray-12) text-xs leading-[1.4]"style={{whiteSpace: isSimpleContent ? "nowrap" : "normal",boxShadow: "0 4px 12px rgba(0, 0, 0, 0.25)",diff --git a/products/desktop/packages/ui/src/primitives/combobox/Combobox.css b/products/desktop/packages/ui/src/primitives/combobox/Combobox.cssindex 23e453749b12..4ad95edfd6a2 100644--- a/products/desktop/packages/ui/src/primitives/combobox/Combobox.css+++ b/products/desktop/packages/ui/src/primitives/combobox/Combobox.css@@ -105,7 +105,7 @@.combobox-content [cmdk-list],.combobox-content [cmdk-list-sizer] {scrollbar-width: thin;- scrollbar-color: var(--gray-a5) transparent;+ scrollbar-color: var(--scrollbar-thumb) transparent;}.combobox-content [cmdk-list]::-webkit-scrollbar,@@ -121,13 +121,13 @@.combobox-content [cmdk-list]::-webkit-scrollbar-thumb,.combobox-content [cmdk-list-sizer]::-webkit-scrollbar-thumb {- background: var(--gray-a5);+ background: var(--scrollbar-thumb);border-radius: var(--radius-3);}.combobox-content [cmdk-list]::-webkit-scrollbar-thumb:hover,.combobox-content [cmdk-list-sizer]::-webkit-scrollbar-thumb:hover {- background: var(--gray-a7);+ background: var(--scrollbar-thumb-hover);}.combobox-content [cmdk-group] {diff --git a/products/desktop/packages/ui/src/styles/globals.css b/products/desktop/packages/ui/src/styles/globals.cssindex 5051aa239846..b598bff6d16e 100644--- a/products/desktop/packages/ui/src/styles/globals.css+++ b/products/desktop/packages/ui/src/styles/globals.css@@ -657,22 +657,34 @@ body {border-left: 2px solid var(--blue-a6);}+/* Scrollbars follow quill's ScrollArea: --input for the thumb, a faint+ --input wash for the track. Every scrollbar rule reads these three. */+:root {+ --scrollbar-track: color-mix(in oklab, var(--input) 35%, transparent);+ --scrollbar-thumb: var(--input);+ --scrollbar-thumb-hover: color-mix(+ in oklab,+ var(--muted-foreground) 50%,+ transparent+ );+}+::-webkit-scrollbar {width: 8px;height: 8px;}::-webkit-scrollbar-track {- background: var(--gray-3);+ background: var(--scrollbar-track);}::-webkit-scrollbar-thumb {- background: var(--gray-8);+ background: var(--scrollbar-thumb);border-radius: 4px;}::-webkit-scrollbar-thumb:hover {- background: var(--gray-9);+ background: var(--scrollbar-thumb-hover);}[data-slot="autocomplete-list"]::-webkit-scrollbar {@@ -682,7 +694,7 @@ body {background: transparent;}[data-slot="autocomplete-list"]::-webkit-scrollbar-thumb {- background-color: var(--gray-a7);+ background-color: var(--scrollbar-thumb);border-radius: 10px;}@@ -718,11 +730,11 @@ body {}.scrollbar-overlay:hover::-webkit-scrollbar-thumb {- background: var(--gray-a6);+ background: var(--scrollbar-thumb);}.scrollbar-overlay:hover::-webkit-scrollbar-thumb:hover {- background: var(--gray-a8);+ background: var(--scrollbar-thumb-hover);}.scrollbar-overlay-y {@@ -746,15 +758,15 @@ body {}.scrollbar-overlay-y:hover {- scrollbar-color: var(--gray-a6) transparent;+ scrollbar-color: var(--scrollbar-thumb) transparent;}.scrollbar-overlay-y:hover::-webkit-scrollbar-thumb {- background: var(--gray-a6);+ background: var(--scrollbar-thumb);}.scrollbar-overlay-y:hover::-webkit-scrollbar-thumb:hover {- background: var(--gray-a8);+ background: var(--scrollbar-thumb-hover);}/* File mention list styles */@@ -1147,50 +1159,52 @@ body.ph-window-blurred .app-fade-in {:root,.light,.light-theme {- /* PostHog-inspired neutral greenish-grey palette */- --gray-1: #f2f3ee;- --gray-2: #eceee8;- --gray-3: #e4e5de;- --gray-4: #d8dbd1;- --gray-5: #cbd0c3;- --gray-6: #bcc1b4;- --gray-7: #a9af9f;- --gray-8: #93998a;- --gray-9: #6b7165;- --gray-10: #5a6054;- --gray-11: #3a4036;- --gray-12: #0d0d0d;-- --gray-a1: rgba(20, 24, 10, 0.02);- --gray-a2: rgba(20, 24, 10, 0.05);- --gray-a3: rgba(20, 24, 10, 0.1);- --gray-a4: rgba(20, 24, 10, 0.16);- --gray-a5: rgba(20, 24, 10, 0.22);- --gray-a6: rgba(20, 24, 10, 0.29);- --gray-a7: rgba(20, 24, 10, 0.38);- --gray-a8: rgba(20, 24, 10, 0.48);- --gray-a9: rgba(20, 24, 10, 0.62);- --gray-a10: rgba(20, 24, 10, 0.7);- --gray-a11: rgba(20, 24, 10, 0.79);- --gray-a12: rgba(13, 13, 13, 0.92);+ /* Radix grey scale on quill's theme hue and tint, so legacy --gray-*+ consumers match the quill surfaces (--background 0.966, --border 0.9,+ --input 0.81). Alpha steps mix --foreground like quill's fills do. */+ --gray-1: oklch(0.985 calc(var(--theme-tint) * 0.5) var(--theme-hue));+ --gray-2: oklch(0.966 calc(var(--theme-tint) * 0.79) var(--theme-hue));+ --gray-3: oklch(0.94 calc(var(--theme-tint) * 0.8) var(--theme-hue));+ --gray-4: oklch(0.92 calc(var(--theme-tint) * 0.8) var(--theme-hue));+ --gray-5: oklch(0.9 calc(var(--theme-tint) * 0.8) var(--theme-hue));+ --gray-6: oklch(0.86 calc(var(--theme-tint) * 0.7) var(--theme-hue));+ --gray-7: oklch(0.81 calc(var(--theme-tint) * 0.5) var(--theme-hue));+ --gray-8: oklch(0.7 calc(var(--theme-tint) * 0.5) var(--theme-hue));+ --gray-9: oklch(0.55 calc(var(--theme-tint) * 0.5) var(--theme-hue));+ --gray-10: oklch(0.5 calc(var(--theme-tint) * 0.5) var(--theme-hue));+ --gray-11: oklch(0.4 calc(var(--theme-tint) * 0.5) var(--theme-hue));+ --gray-12: var(--foreground);++ --gray-a1: color-mix(in oklab, var(--foreground) 2%, transparent);+ --gray-a2: color-mix(in oklab, var(--foreground) 5%, transparent);+ --gray-a3: color-mix(in oklab, var(--foreground) 10%, transparent);+ --gray-a4: color-mix(in oklab, var(--foreground) 16%, transparent);+ --gray-a5: color-mix(in oklab, var(--foreground) 22%, transparent);+ --gray-a6: color-mix(in oklab, var(--foreground) 29%, transparent);+ --gray-a7: color-mix(in oklab, var(--foreground) 38%, transparent);+ --gray-a8: color-mix(in oklab, var(--foreground) 48%, transparent);+ --gray-a9: color-mix(in oklab, var(--foreground) 62%, transparent);+ --gray-a10: color-mix(in oklab, var(--foreground) 70%, transparent);+ --gray-a11: color-mix(in oklab, var(--foreground) 79%, transparent);+ --gray-a12: color-mix(in oklab, var(--foreground) 92%, transparent);--gray-contrast: #ffffff;- --gray-surface: rgba(242, 243, 238, 0.8);- --gray-indicator: #6b7165;- --gray-track: #6b7165;+ --gray-surface: color-mix(in oklab, var(--background) 80%, transparent);+ --gray-indicator: var(--gray-9);+ --gray-track: var(--gray-9);}:root,.light,.light-theme,.radix-themes {- --color-background: #f2f3ee;- --terminal-foreground: #0d0d0d;+ --color-background: var(--background);+ --terminal-foreground: var(--foreground);--terminal-background: transparent;--terminal-cursor: #f54d00;- --terminal-cursor-accent: #f2f3ee;+ --terminal-cursor-accent: var(--background);--terminal-selection-bg: rgba(245, 77, 0, 0.2);- --terminal-selection-fg: #0d0d0d;+ --terminal-selection-fg: var(--foreground);}.dark,@@ -1230,49 +1244,50 @@ body.ph-window-blurred .app-fade-in {.dark,.dark-theme {- /* PostHog-inspired cool blue-grey dark palette */- --gray-1: #131316;- --gray-2: #18181f;- --gray-3: #1e1e28;- --gray-4: #24243e;- --gray-5: #2a2a37;- --gray-6: #2e2e3d;- --gray-7: #40405a;- --gray-8: #616180;- --gray-9: #7c7c9e;- --gray-10: #8d8daa;- --gray-11: #9898b6;- --gray-12: #e6e6e6;-- --gray-a1: rgba(200, 200, 240, 0);- --gray-a2: rgba(200, 200, 240, 0.03);- --gray-a3: rgba(200, 200, 240, 0.07);- --gray-a4: rgba(200, 200, 240, 0.1);- --gray-a5: rgba(200, 200, 240, 0.14);- --gray-a6: rgba(200, 200, 240, 0.18);- --gray-a7: rgba(200, 200, 240, 0.24);- --gray-a8: rgba(200, 200, 240, 0.36);- --gray-a9: rgba(200, 200, 240, 0.48);- --gray-a10: rgba(200, 200, 240, 0.55);- --gray-a11: rgba(200, 200, 240, 0.7);- --gray-a12: rgba(230, 230, 230, 0.92);+ /* Dark grey scale on quill's dark hue and tint (--background 0.187,+ --card 0.2, --border 0.27, --input 0.3). */+ --gray-1: oklch(0.187 calc(var(--theme-tint) * 1.1) var(--theme-dark-hue));+ --gray-2: oklch(0.2 calc(var(--theme-tint) * 1.2) var(--theme-dark-hue));+ --gray-3: oklch(0.225 calc(var(--theme-tint) * 1.2) var(--theme-dark-hue));+ --gray-4: oklch(0.25 calc(var(--theme-tint) * 1.2) var(--theme-dark-hue));+ --gray-5: oklch(0.27 calc(var(--theme-tint) * 1.2) var(--theme-dark-hue));+ --gray-6: oklch(0.3 calc(var(--theme-tint) * 1.5) var(--theme-dark-hue));+ --gray-7: oklch(0.36 calc(var(--theme-tint) * 1.5) var(--theme-dark-hue));+ --gray-8: oklch(0.44 calc(var(--theme-tint) * 1.5) var(--theme-dark-hue));+ --gray-9: oklch(0.55 calc(var(--theme-tint) * 1.5) var(--theme-dark-hue));+ --gray-10: oklch(0.62 calc(var(--theme-tint) * 1.5) var(--theme-dark-hue));+ --gray-11: oklch(0.75 calc(var(--theme-tint) * 1.5) var(--theme-dark-hue));+ --gray-12: var(--foreground);++ --gray-a1: color-mix(in oklab, var(--foreground) 0%, transparent);+ --gray-a2: color-mix(in oklab, var(--foreground) 3%, transparent);+ --gray-a3: color-mix(in oklab, var(--foreground) 7%, transparent);+ --gray-a4: color-mix(in oklab, var(--foreground) 10%, transparent);+ --gray-a5: color-mix(in oklab, var(--foreground) 14%, transparent);+ --gray-a6: color-mix(in oklab, var(--foreground) 18%, transparent);+ --gray-a7: color-mix(in oklab, var(--foreground) 24%, transparent);+ --gray-a8: color-mix(in oklab, var(--foreground) 36%, transparent);+ --gray-a9: color-mix(in oklab, var(--foreground) 48%, transparent);+ --gray-a10: color-mix(in oklab, var(--foreground) 55%, transparent);+ --gray-a11: color-mix(in oklab, var(--foreground) 70%, transparent);+ --gray-a12: color-mix(in oklab, var(--foreground) 92%, transparent);--gray-contrast: #ffffff;- --gray-surface: rgba(19, 19, 22, 0.5);- --gray-indicator: #7c7c9e;- --gray-track: #7c7c9e;+ --gray-surface: color-mix(in oklab, var(--background) 50%, transparent);+ --gray-indicator: var(--gray-9);+ --gray-track: var(--gray-9);}.dark,.dark-theme,:is(.dark, .dark-theme) :where(.radix-themes:not(.light, .light-theme)) {- --color-background: #131316;- --terminal-foreground: #e6e6e6;+ --color-background: var(--background);+ --terminal-foreground: var(--foreground);--terminal-background: transparent;--terminal-cursor: #f8be2a;- --terminal-cursor-accent: #131316;+ --terminal-cursor-accent: var(--background);--terminal-selection-bg: rgba(248, 190, 42, 0.25);- --terminal-selection-fg: #e6e6e6;+ --terminal-selection-fg: var(--foreground);}/*