diff --git a/apps/desktop/src/app/cron/index.tsx b/apps/desktop/src/app/cron/index.tsx index 9929b92f7..c543d918a 100644 --- a/apps/desktop/src/app/cron/index.tsx +++ b/apps/desktop/src/app/cron/index.tsx @@ -1,6 +1,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react' import { PageLoader } from '@/components/page-loader' +import { Badge, type BadgeProps } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import { Codicon } from '@/components/ui/codicon' import { @@ -25,7 +26,7 @@ import { triggerCronJob, updateCronJob } from '@/hermes' -import { AlertTriangle, Clock, Pause, Pencil, Play, Trash2, Zap } from '@/lib/icons' +import { AlertTriangle, Clock } from '@/lib/icons' import { cn } from '@/lib/utils' import { notify, notifyError } from '@/store/notifications' @@ -86,23 +87,16 @@ const SCHEDULE_OPTIONS: ReadonlyArray = [ } ] -const STATE_TONE: Record = { - enabled: 'good', - scheduled: 'good', - running: 'good', +const STATE_VARIANT: Record = { + enabled: 'default', + scheduled: 'default', + running: 'default', paused: 'warn', disabled: 'muted', - error: 'bad', + error: 'destructive', completed: 'muted' } -const PILL_TONE: Record<'good' | 'muted' | 'warn' | 'bad', string> = { - good: 'bg-primary/10 text-primary', - muted: 'bg-muted text-muted-foreground', - warn: 'bg-amber-500/10 text-amber-600 dark:text-amber-300', - bad: 'bg-destructive/10 text-destructive' -} - const asText = (value: unknown): string => (typeof value === 'string' ? value : '') const truncate = (value: string, max = 80): string => (value.length > max ? `${value.slice(0, max)}…` : value) @@ -541,8 +535,14 @@ function CronJobRow({ >
{jobTitle(job)} - {state} - {deliver && deliver !== DEFAULT_DELIVER && {deliver}} + + {state} + + {deliver && deliver !== DEFAULT_DELIVER && ( + + {deliver} + + )}
{hasName && prompt &&

{truncate(prompt, 120)}

}
@@ -568,13 +568,13 @@ function CronJobRow({ onClick={onPauseResume} title={isPaused ? 'Resume' : 'Pause'} > - {isPaused ? : } + - + - + - +
@@ -602,16 +602,6 @@ function IconAction({ children, className, ...props }: Omit - {children} - - ) -} - function EmptyState({ actionLabel, description, diff --git a/apps/desktop/src/app/messaging/index.tsx b/apps/desktop/src/app/messaging/index.tsx index 4922838da..c4d08d58d 100644 --- a/apps/desktop/src/app/messaging/index.tsx +++ b/apps/desktop/src/app/messaging/index.tsx @@ -3,6 +3,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react' import { PageLoader } from '@/components/page-loader' import { StatusDot, type StatusTone } from '@/components/status-dot' +import { Badge, type BadgeProps } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import { DisclosureCaret } from '@/components/ui/disclosure-caret' import { Input } from '@/components/ui/input' @@ -42,11 +43,11 @@ const STATE_LABELS: Record = { startup_failed: 'Startup failed' } -const PILL_TONE: Record = { - good: 'bg-primary/10 text-primary', - muted: 'bg-muted text-muted-foreground', - warn: 'bg-amber-500/10 text-amber-600 dark:text-amber-300', - bad: 'bg-destructive/10 text-destructive' +const TONE_VARIANT: Record = { + good: 'default', + muted: 'muted', + warn: 'warn', + bad: 'destructive' } const HINT_BY_STATE: Record = { @@ -696,27 +697,13 @@ function PlatformHint({ platform }: { platform: MessagingPlatformInfo }) { function StatePill({ children, tone }: { children: string; tone: StatusTone }) { return ( - + {children} - + ) } function SetupPill({ active, children }: { active: boolean; children: string }) { - return ( - - {children} - - ) + return {children} } diff --git a/apps/desktop/src/app/settings/primitives.tsx b/apps/desktop/src/app/settings/primitives.tsx index 788c3d063..e2ebcbe59 100644 --- a/apps/desktop/src/app/settings/primitives.tsx +++ b/apps/desktop/src/app/settings/primitives.tsx @@ -1,6 +1,7 @@ import type { ReactNode } from 'react' import { PageLoader } from '@/components/page-loader' +import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import type { IconComponent } from '@/lib/icons' import { cn } from '@/lib/utils' @@ -18,16 +19,7 @@ export function SettingsContent({ children }: { children: ReactNode }) { } export function Pill({ tone = 'muted', children }: { tone?: 'muted' | 'primary'; children: ReactNode }) { - return ( - - {children} - - ) + return {children} } export function SectionHeading({ icon: Icon, title, meta }: { icon: IconComponent; title: string; meta?: string }) { diff --git a/apps/desktop/src/app/shell/titlebar-controls.tsx b/apps/desktop/src/app/shell/titlebar-controls.tsx index 67351044a..5c3336fb4 100644 --- a/apps/desktop/src/app/shell/titlebar-controls.tsx +++ b/apps/desktop/src/app/shell/titlebar-controls.tsx @@ -73,17 +73,15 @@ export function TitlebarControls({ leftTools = [], tools = [], onOpenSettings }: // Each titlebar button controls the pane physically on its side, so a flip // swaps which pane each one toggles. Default: sessions left, file browser - // right. Flipped: file browser left, sessions right. - // `active` stays tied to the file browser (the toggleable extra pane) rather - // than the sessions sidebar, which has never shown a highlight. - const fileBrowserEdge = { active: fileBrowserOpen, open: fileBrowserOpen, toggle: toggleFileBrowserOpen } - const sessionsEdge = { active: undefined, open: sidebarOpen, toggle: toggleSidebarOpen } + // right. Flipped: file browser left, sessions right. Sidebar toggles never + // carry an active highlight — they're plain show/hide affordances. + const fileBrowserEdge = { open: fileBrowserOpen, toggle: toggleFileBrowserOpen } + const sessionsEdge = { open: sidebarOpen, toggle: toggleSidebarOpen } const leftEdge = panesFlipped ? fileBrowserEdge : sessionsEdge const rightEdge = panesFlipped ? sessionsEdge : fileBrowserEdge const leftToolbarTools: TitlebarTool[] = [ { - active: leftEdge.active, icon: , id: 'sidebar', label: `${leftEdge.open ? 'Hide' : 'Show'} left sidebar`, @@ -106,7 +104,6 @@ export function TitlebarControls({ leftTools = [], tools = [], onOpenSettings }: ] const rightSidebarTool: TitlebarTool = { - active: rightEdge.active, icon: , id: 'right-sidebar', label: `${rightEdge.open ? 'Hide' : 'Show'} right sidebar`, diff --git a/apps/desktop/src/app/skills/index.tsx b/apps/desktop/src/app/skills/index.tsx index 2f01ae0a4..3ee2d2ecb 100644 --- a/apps/desktop/src/app/skills/index.tsx +++ b/apps/desktop/src/app/skills/index.tsx @@ -2,6 +2,7 @@ import type * as React from 'react' import { useCallback, useEffect, useMemo, useState } from 'react' import { PageLoader } from '@/components/page-loader' +import { Badge } from '@/components/ui/badge' import { Switch } from '@/components/ui/switch' import { TextTab, TextTabMeta } from '@/components/ui/text-tab' import { getSkills, getToolsets, toggleSkill, toggleToolset } from '@/hermes' @@ -318,14 +319,11 @@ export function SkillsView({ setStatusbarItemGroup: _setStatusbarItemGroup, ...p function StatusPill({ active, children }: { active: boolean; children: string }) { return ( - {children} - + ) } diff --git a/apps/desktop/src/components/ui/badge.tsx b/apps/desktop/src/components/ui/badge.tsx index 1b3091c18..6f286c3fd 100644 --- a/apps/desktop/src/components/ui/badge.tsx +++ b/apps/desktop/src/components/ui/badge.tsx @@ -13,6 +13,7 @@ const badgeVariants = cva( variant: { default: 'bg-primary/10 text-primary', muted: 'bg-muted text-muted-foreground', + warn: 'bg-amber-500/10 text-amber-600 dark:text-amber-300', destructive: 'bg-destructive/10 text-destructive', outline: 'border border-(--ui-stroke-secondary) text-muted-foreground' }