Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(assistant-ui): migrate elements to semantic color tokens

Steven Enamakel1f9612bf8713
diff --git a/app/src/components/assistant-ui/attachment.tsx b/app/src/components/assistant-ui/attachment.tsx
index 26f991a005..4059c0a027 100644
--- a/app/src/components/assistant-ui/attachment.tsx
+++ b/app/src/components/assistant-ui/attachment.tsx
@@ -228,7 +228,7 @@ const AttachmentRemove: FC = () => {
export const UserMessageAttachments: FC = () => {
return (
- <div className="aui-user-message-attachments-end col-span-full col-start-1 row-start-1 flex w-full flex-row justify-end gap-2">
+ <div className="aui-user-message-attachments-end col-span-full col-start-1 row-start-1 flex w-full flex-row justify-end gap-2 empty:hidden">
<MessagePrimitive.Attachments>{() => <AttachmentUI />}</MessagePrimitive.Attachments>
</div>
);
diff --git a/app/src/components/assistant-ui/directive-text.tsx b/app/src/components/assistant-ui/directive-text.tsx
index b8cef35bd7..c0b96723e0 100644
--- a/app/src/components/assistant-ui/directive-text.tsx
+++ b/app/src/components/assistant-ui/directive-text.tsx
@@ -54,7 +54,7 @@ export function createDirectiveText(
data-directive-type={seg.type}
data-directive-id={seg.id}
aria-label={`${seg.type}: ${seg.label}`}
- className="aui-directive-chip items-baseline text-[13px] leading-none [&_svg]:self-center">
+ className="aui-directive-chip items-baseline px-1.5 py-0.5 text-[13px] leading-none [&_svg]:self-center">
{Icon && <Icon />}
{seg.label}
</Badge>
diff --git a/app/src/components/assistant-ui/elements/agent-plan.tsx b/app/src/components/assistant-ui/elements/agent-plan.tsx
index e1529d8958..c17be7cd83 100644
--- a/app/src/components/assistant-ui/elements/agent-plan.tsx
+++ b/app/src/components/assistant-ui/elements/agent-plan.tsx
@@ -1,109 +1,124 @@
-'use client';
+"use client";
-/**
- * The agent's step-by-step plan for the current thread, with a progress bar
- * and a checkmark/spinner per step.
- *
- * Vendored from the assistant-ui `elements-agent-plan` registry item
- * (https://r.assistant-ui.com/styles/base-nova/elements-agent-plan.json).
- * Changes from upstream:
- * - `cn` import path (`@/components/assistant-ui/lib/utils`).
- * - The header text `"Plan"` is a prop (`title`) with that English default,
- * so the caller (`PlanReviewPart` in
- * `features/conversations/aui/PlanReviewPart.tsx`) supplies the translated
- * string via `useT()`.
- */
-import { cn } from '@/components/assistant-ui/lib/utils';
-import { CheckIcon, Loader2Icon, XIcon } from 'lucide-react';
-import type { ComponentProps } from 'react';
+import type { ComponentProps } from "react";
+import { CheckIcon, Loader2Icon, XIcon } from "lucide-react";
+import { cn } from "@/components/assistant-ui/lib/utils";
+import { useT } from "@/lib/i18n/I18nContext";
+import { mono } from "./surfaces";
+import { announced, pct, progressOf } from "../utils/range";
-import { pct, progressOf } from '../utils/range';
-import { mono } from './surfaces';
+export type AgentPlanStep = {
+ id?: string | undefined;
+ label: string;
+ description?: string | undefined;
+};
export function AgentPlan({
steps,
activeIndex,
- title = 'Plan',
+ title = "Plan",
className,
statuses,
- compact = false,
- showHeader = true,
- countLabel,
stepTestId,
...props
-}: Omit<ComponentProps<'div'>, 'children' | 'steps' | 'activeIndex' | 'title'> & {
- steps: readonly string[];
+}: Omit<ComponentProps<"div">, "children" | "steps" | "activeIndex"> & {
+ steps: readonly (string | AgentPlanStep)[];
activeIndex: number;
- title?: string;
- /** Exact harness states when progress is not strictly sequential. */
+ title?: string | undefined;
+ /** Core progress can complete steps out of order or stop on a failed step. */
statuses?: readonly ('pending' | 'active' | 'done' | 'failed')[];
- compact?: boolean;
- showHeader?: boolean;
- countLabel?: string;
stepTestId?: string;
}) {
+ const { t } = useT();
const total = steps.length;
- const completed = statuses
- ? statuses.filter(status => status === 'done').length
- : progressOf(activeIndex, total);
+ const completed = statuses ? statuses.filter(status => status === 'done').length : progressOf(activeIndex, total);
+ const countLabel = t('chat.todos.ofTotal').replace('{done}', String(completed)).replace('{total}', String(total));
const allDone = completed >= total;
const progress = pct(completed, total);
return (
<div
data-slot="agent-plan"
- className={cn('flex w-full max-w-sm flex-col', compact ? 'gap-1.5' : 'gap-3', className)}
- {...props}>
- {showHeader && (
- <div className="flex items-center justify-between">
- <span className="text-[13.5px] font-medium">{title}</span>
- <span className={cn(mono, 'text-foreground/35 tabular-nums')}>
- {countLabel ?? `${completed} of ${total}`}
- </span>
- </div>
- )}
- <div className="bg-foreground/[0.06] h-[3px] w-full overflow-hidden rounded-full">
+ className={cn("flex w-full max-w-sm flex-col gap-3", className)}
+
+ {...props}
+ >
+ <div className="flex items-center justify-between">
+ <span className="text-[13.5px] font-medium">{title}</span>
+ <span className={cn(mono, "text-muted-foreground tabular-nums")}>
+ {countLabel}
+ </span>
+ </div>
+ <div
+ role="progressbar"
+ aria-label={title}
+ aria-valuemin={0}
+ aria-valuemax={100}
+ aria-valuenow={announced(progress)}
+ aria-valuetext={countLabel}
+ className="bg-foreground/[0.06] inset-ring-border h-[3px] w-full overflow-hidden rounded-full inset-ring forced-colors:outline"
+ >
<span
- className="bg-foreground/80 block h-full rounded-full transition-[width] duration-500"
+ aria-hidden
+ className="bg-foreground/80 block h-full rounded-full transition-[width] duration-500 forced-color-adjust-none motion-reduce:transition-none"
style={{ width: `${progress}%` }}
/>
</div>
- <ul className={cn('flex flex-col', compact ? 'gap-1' : 'gap-2.5')}>
+ <ul className="flex flex-col gap-2.5">
{steps.map((step, i) => {
- const status =
- statuses?.[i] ??
- (allDone || i < completed ? 'done' : i === completed ? 'active' : 'pending');
+ const item = typeof step === "string" ? { label: step } : step;
+ const status = statuses?.[i] ?? (allDone || i < completed ? 'done' : i === completed ? 'active' : 'pending');
const done = status === 'done';
const active = status === 'active';
const failed = status === 'failed';
+ const statusText = t(status === 'done' ? 'conversations.taskCard.state.done' : status === 'failed' ? 'conversations.taskCard.state.failed' : status === 'active' ? 'conversations.backgroundTasks.statusRunning' : 'orchestration.runStatus.pending');
return (
<li
- key={`${i}:${step}`}
+ key={typeof step === "string" ? i : (step.id ?? i)}
data-testid={stepTestId}
data-status={status}
className={cn(
- 'flex items-start gap-2.5',
- compact ? 'text-xs leading-4' : 'text-[13.5px]'
- )}>
+ "flex gap-2.5 text-[13.5px]",
+ active && item.description ? "items-start" : "items-center",
+ )}
+ >
<span className="flex size-4 shrink-0 items-center justify-center">
{done ? (
- <CheckIcon className="text-foreground/35 size-3.5" />
+ <CheckIcon
+ aria-hidden
+ className="text-muted-foreground size-3.5"
+ />
) : failed ? (
<XIcon aria-hidden className="text-destructive size-3.5" />
) : active ? (
- <Loader2Icon className="text-foreground/90 size-3.5 animate-spin motion-reduce:animate-none" />
+ <Loader2Icon
+ aria-hidden
+ className="text-foreground/90 size-3.5 animate-spin motion-reduce:animate-none"
+ />
) : (
- <span aria-hidden className="bg-foreground/15 size-1.5 rounded-full" />
+ <span
+ aria-hidden
+ className="bg-foreground/15 inset-ring-border size-1.5 rounded-full inset-ring forced-colors:border"
+ />
)}
</span>
- <span
- className={cn(
- done && 'text-foreground/40',
- active && 'text-foreground/90',
- failed && 'text-destructive',
- !done && !active && !failed && 'text-foreground/35'
- )}>
- {step}
+ <span className="min-w-0">
+ <span
+ className={cn(
+ done && "text-muted-foreground",
+ active && "text-foreground/90",
+ failed && "text-destructive",
+ !done && !active && !failed && "text-muted-foreground",
+ )}
+ >
+ {item.label}
+ </span>
+ <span className="sr-only">{` ${statusText}`}</span>
+ {active && item.description ? (
+ <span className="text-muted-foreground mt-0.5 block text-xs">
+ {item.description}
+ </span>
+ ) : null}
</span>
</li>
);
diff --git a/app/src/components/assistant-ui/elements/agent-status.aui.tsx b/app/src/components/assistant-ui/elements/agent-status.aui.tsx
index a7bf9901a6..6fe37d0592 100644
--- a/app/src/components/assistant-ui/elements/agent-status.aui.tsx
+++ b/app/src/components/assistant-ui/elements/agent-status.aui.tsx
@@ -134,10 +134,10 @@ const TaskTrayItem: FC<{ task: TaskState }> = ({ task }) => {
<span className="sr-only">{state}</span>
<span className="min-w-0 flex-1 truncate">{taskLabel(task.toolName, task.args)}</span>
{meta !== undefined && (
- <span className={cn(mono, 'text-foreground/35 max-w-24 shrink-0 truncate')}>{meta}</span>
+ <span className={cn(mono, "text-muted-foreground max-w-24 shrink-0 truncate")}>{meta}</span>
)}
{elapsedMs !== undefined && (
- <span className={cn(mono, 'text-foreground/30 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{formatElapsed(elapsedMs)}
</span>
)}
diff --git a/app/src/components/assistant-ui/elements/agent-status.tsx b/app/src/components/assistant-ui/elements/agent-status.tsx
index fca7a8e5e3..9f6151c5b3 100644
--- a/app/src/components/assistant-ui/elements/agent-status.tsx
+++ b/app/src/components/assistant-ui/elements/agent-status.tsx
@@ -70,12 +70,12 @@ export function AgentStatus({
{label}
</span>
{elapsed !== undefined && state !== 'done' && state !== 'failed' && (
- <span className={cn(mono, 'text-foreground/30 tabular-nums')}>{elapsed}</span>
+ <span className={cn(mono, "fade-in blur-in-[2px] animate-in max-w-44 truncate text-xs duration-300 motion-reduce:animate-none")}>{elapsed}</span>
)}
<span
aria-hidden
data-slot="agent-status-trailing"
- className="text-foreground/45 flex size-6 items-center justify-center rounded-full">
+ className="text-muted-foreground flex size-6 items-center justify-center rounded-full">
{trailing !== undefined ? (
trailing
) : state === 'done' || state === 'failed' ? (
diff --git a/app/src/components/assistant-ui/elements/approval-card.tsx b/app/src/components/assistant-ui/elements/approval-card.tsx
index 7f52cbb4f8..efe76a9460 100644
--- a/app/src/components/assistant-ui/elements/approval-card.tsx
+++ b/app/src/components/assistant-ui/elements/approval-card.tsx
@@ -101,7 +101,7 @@ export function ApprovalCard({
</span>
<div className="flex flex-col">
<p className="text-[13.5px] font-medium">{title}</p>
- <p className="text-foreground/45 text-xs">{subtitle}</p>
+ <p className="text-muted-foreground text-xs">{subtitle}</p>
{expiry}
</div>
</div>
@@ -110,7 +110,7 @@ export function ApprovalCard({
{command}
</div>
- <div className="flex h-8 items-center justify-end gap-2">
+ <div className="grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] gap-4 text-xs">
{state === 'request' ? (
<>
{onDeny && (
@@ -154,15 +154,15 @@ export function ApprovalCard({
) : (
<div
key={state}
- className="fade-in animate-in text-foreground/55 flex items-center gap-2 text-xs duration-300">
+ className="flex min-h-8 flex-wrap items-center justify-end gap-2">
{state === 'running' ? (
<>
- <Loader2Icon className="text-foreground/45 size-3.5 animate-spin" />
+ <Loader2Icon className="text-muted-foreground size-3.5 animate-spin motion-reduce:animate-none" />
{runningLabel}
</>
) : state === 'denied' ? (
<>
- <XIcon className="text-foreground/45 size-3.5" />
+ <XIcon className="text-muted-foreground size-3.5" />
{deniedLabel}
</>
) : (
diff --git a/app/src/components/assistant-ui/elements/background-inbox.tsx b/app/src/components/assistant-ui/elements/background-inbox.tsx
index 8621a5c44a..1bf4556a74 100644
--- a/app/src/components/assistant-ui/elements/background-inbox.tsx
+++ b/app/src/components/assistant-ui/elements/background-inbox.tsx
@@ -63,7 +63,7 @@ export function BackgroundInbox({
className={cn(
mono,
'tabular-nums',
- ready > 0 ? 'text-blue-600 dark:text-blue-400' : 'text-foreground/35'
+ ready > 0 ? 'text-blue-600 dark:text-blue-400' : "text-muted-foreground"
)}>
{ready > 0 ? strings.ready(ready) : strings.inFlight(running)}
</span>
@@ -82,7 +82,7 @@ export function BackgroundInbox({
<>
<span className="flex size-3.5 shrink-0 items-center justify-center">
{run.state === 'running' ? (
- <Loader2Icon className="text-foreground/30 size-3 animate-spin motion-reduce:animate-none" />
+ <Loader2Icon className="text-muted-foreground size-3 animate-spin motion-reduce:animate-none" />
) : run.state === 'failed' ? (
<XIcon className="size-3 text-red-500" />
) : (
@@ -94,16 +94,16 @@ export function BackgroundInbox({
<span
className={cn(
'truncate text-[13px]',
- run.state === 'running' ? 'text-foreground/50' : 'text-foreground/90'
+ run.state === 'running' ? "text-muted-foreground" : 'text-foreground/90'
)}>
{run.title}
</span>
{run.summary && (
- <span className={cn(mono, 'text-foreground/30 truncate')}>{run.summary}</span>
+ <span className={cn(mono, "text-muted-foreground truncate")}>{run.summary}</span>
)}
</span>
- <span className={cn(mono, 'text-foreground/25 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{run.elapsed}
</span>
</>
diff --git a/app/src/components/assistant-ui/elements/code-diff.tsx b/app/src/components/assistant-ui/elements/code-diff.tsx
index 1657d4a194..a861629aae 100644
--- a/app/src/components/assistant-ui/elements/code-diff.tsx
+++ b/app/src/components/assistant-ui/elements/code-diff.tsx
@@ -61,7 +61,7 @@ export function CodeDiff({
key={`${cycle}-${i}-${line.text}`}
className={cn(
'fade-in animate-in fill-mode-both flex px-4 py-0.5 leading-relaxed whitespace-pre duration-300',
- line.kind === 'context' && 'text-foreground/45',
+ line.kind === 'context' && "text-muted-foreground",
line.kind === 'added' &&
'bg-emerald-500/10 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-300',
line.kind === 'removed' && 'bg-red-500/10 text-red-700 dark:text-red-300'
diff --git a/app/src/components/assistant-ui/elements/composer.tsx b/app/src/components/assistant-ui/elements/composer.tsx
index bcb45863f5..8ba9440fdc 100644
--- a/app/src/components/assistant-ui/elements/composer.tsx
+++ b/app/src/components/assistant-ui/elements/composer.tsx
@@ -117,13 +117,13 @@ export function ComposerCommandItem({
}: Omit<ComponentProps<'button'>, 'children'> & { command: ComposerCommand; active: boolean }) {
return (
<ComposerMenuItem active={active} {...props}>
- <command.icon className="text-foreground/35 size-3.5 shrink-0" />
+ <command.icon className="text-muted-foreground size-3.5 shrink-0" />
<span className="font-medium">/{command.name}</span>
- <span className="text-foreground/45 flex-1 truncate text-start text-xs">
+ <span className="text-muted-foreground flex-1 truncate text-start text-xs">
{command.description}
</span>
{active && (
- <kbd className="bg-foreground/[0.06] text-foreground/45 rounded px-1 font-mono text-[10px]">
+ <kbd className="bg-foreground/[0.06] text-muted-foreground rounded px-1 font-mono text-[10px]">
↵
</kbd>
)}
diff --git a/app/src/components/assistant-ui/elements/connection-state.tsx b/app/src/components/assistant-ui/elements/connection-state.tsx
index b18402d50d..91f3a7bf8f 100644
--- a/app/src/components/assistant-ui/elements/connection-state.tsx
+++ b/app/src/components/assistant-ui/elements/connection-state.tsx
@@ -72,10 +72,10 @@ export function ConnectionState({
{phase === 'reconnecting' && (
<>
- <Loader2Icon className="text-foreground/40 size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
+ <Loader2Icon className="text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
<span className="min-w-0 flex-1 text-[13px]">{reconnectingLabel}</span>
{attempt !== undefined && (
- <span className={cn(mono, 'text-foreground/30 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{attemptLabel(attempt)}
</span>
)}
@@ -87,7 +87,7 @@ export function ConnectionState({
<CheckIcon className="size-3.5 shrink-0 text-emerald-500" />
<span className="min-w-0 flex-1 text-[13px]">{resumedLabel}</span>
{resumedTokens !== undefined && (
- <span className={cn(mono, 'text-foreground/30 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{resumedTokensLabel(resumedTokens)}
</span>
)}
diff --git a/app/src/components/assistant-ui/elements/context-breakdown.tsx b/app/src/components/assistant-ui/elements/context-breakdown.tsx
index 8a7c772217..49082a011f 100644
--- a/app/src/components/assistant-ui/elements/context-breakdown.tsx
+++ b/app/src/components/assistant-ui/elements/context-breakdown.tsx
@@ -62,19 +62,19 @@ export function ContextBreakdown({
data-slot="context-breakdown"
className={cn(paper, 'flex w-full max-w-sm flex-col gap-3 rounded-2xl p-4', className)}
{...props}>
- <div className="flex items-baseline justify-between gap-3">
+ <div className="flex items-baseline justify-between">
<span className="text-[13.5px] font-medium">{title}</span>
<span
className={cn(
mono,
'tabular-nums',
- pressure > 0.85 ? 'text-amber-600 dark:text-amber-400' : 'text-foreground/35'
+ pressure > 0.85 ? 'text-amber-600 dark:text-amber-400' : "text-muted-foreground"
)}>
{formatTokenCount(used)} / {formatTokenCount(limit)}
</span>
</div>
- <div className="bg-foreground/[0.06] flex h-2 w-full overflow-hidden rounded-full">
+ <div className="bg-foreground/[0.06] inset-ring-border flex h-2 w-full overflow-hidden rounded-full inset-ring forced-colors:border">
{segments.map(segment => {
const width = share(segment.tokens);
if (announced(width) === 0) return null;
@@ -88,7 +88,7 @@ export function ContextBreakdown({
aria-valuenow={announced(width)}
aria-valuetext={meterValueText(fmt(segment.tokens), fmt(limit))}
className={cn(
- 'h-full transition-[width] duration-500 ease-out motion-reduce:transition-none',
+ "h-full transition-[width] duration-500 ease-out forced-color-adjust-none motion-reduce:transition-none",
segment.tint
)}
style={{ width: `${width}%` }}
@@ -100,21 +100,21 @@ export function ContextBreakdown({
<div className="flex flex-col gap-1.5">
{segments.map(segment => (
<div key={segment.label} className="flex items-center gap-2">
- <span aria-hidden className={cn('size-2 shrink-0 rounded-full', segment.tint)} />
+ <span aria-hidden className={cn("size-2 shrink-0 rounded-full forced-color-adjust-none", segment.tint)} />
<span className="text-foreground/70 min-w-0 flex-1 truncate text-[13px]">
{segment.label}
</span>
- <span className={cn(mono, 'text-foreground/35 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{fmt(segment.tokens)}
</span>
</div>
))}
<div className="flex items-center gap-2">
- <span aria-hidden className="bg-foreground/[0.08] size-2 shrink-0 rounded-full" />
- <span className="text-foreground/35 min-w-0 flex-1 truncate text-[13px]">
+ <span aria-hidden className="bg-foreground/[0.08] inset-ring-border size-2 shrink-0 rounded-full inset-ring forced-colors:border" />
+ <span className="text-muted-foreground min-w-0 flex-1 truncate text-[13px]">
{headroomLabel}
</span>
- <span className={cn(mono, 'text-foreground/25 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{fmt(Math.max(0, limit - used))}
</span>
</div>
diff --git a/app/src/components/assistant-ui/elements/context-display.tsx b/app/src/components/assistant-ui/elements/context-display.tsx
index 8ee9e9c9b2..fa22609c65 100644
--- a/app/src/components/assistant-ui/elements/context-display.tsx
+++ b/app/src/components/assistant-ui/elements/context-display.tsx
@@ -268,7 +268,7 @@ function ContextDisplayContent({
/>
</div>
{segments.length > 0 && (
- <div className="mt-3 grid gap-1.5">
+ <div className="flex items-baseline justify-between gap-6">
{segments.map(segment => (
<div key={segment.label} className="flex items-baseline justify-between gap-6">
<span className="text-muted-foreground">{segment.label}</span>
@@ -303,7 +303,7 @@ function RingVisual() {
r={RING_RADIUS}
fill="none"
strokeWidth={RING_STROKE}
- className="stroke-muted"
+ className="stroke-border"
/>
<circle
cx={RING_SIZE / 2}
diff --git a/app/src/components/assistant-ui/elements/conversation-map.tsx b/app/src/components/assistant-ui/elements/conversation-map.tsx
index 50513c2aed..d283f9b53c 100644
--- a/app/src/components/assistant-ui/elements/conversation-map.tsx
+++ b/app/src/components/assistant-ui/elements/conversation-map.tsx
@@ -142,7 +142,7 @@ export function ConversationMap({
)}>
<p className="line-clamp-2 text-[13px] leading-snug font-medium">{previewEntry.title}</p>
{previewEntry.preview && (
- <p className="text-foreground/60 mt-1 line-clamp-4 text-[13px] leading-relaxed">
+ <p className="text-muted-foreground mt-1 line-clamp-3 text-[13px] leading-relaxed">
{previewEntry.preview}
</p>
)}
diff --git a/app/src/components/assistant-ui/elements/conversation-search.tsx b/app/src/components/assistant-ui/elements/conversation-search.tsx
index 9eadabec47..a6cad5a795 100644
--- a/app/src/components/assistant-ui/elements/conversation-search.tsx
+++ b/app/src/components/assistant-ui/elements/conversation-search.tsx
@@ -57,15 +57,15 @@ export function ConversationSearch({
{...props}>
<div className="flex min-w-0 flex-1 flex-col gap-2">
<div className={cn(paper, 'flex items-center gap-2 rounded-full py-1.5 pr-1.5 pl-3')}>
- <SearchIcon className="text-foreground/30 size-3.5 shrink-0" />
+ <SearchIcon className="text-muted-foreground size-3.5 shrink-0" />
<input
value={query}
onChange={event => onQueryChange?.(event.target.value)}
placeholder={placeholder}
aria-label={placeholder}
- className="text-foreground/85 placeholder:text-foreground/30 min-w-0 flex-1 bg-transparent text-[13px] outline-none"
+ className="text-foreground/85 placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-[13px] outline-none"
/>
- <span className={cn(mono, 'text-foreground/30 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{hits.length === 0 ? '0' : `${index + 1}/${hits.length}`}
</span>
{onStep && (
@@ -94,23 +94,23 @@ export function ConversationSearch({
field,
'fade-in animate-in rounded-xl px-3 py-2 text-xs leading-relaxed duration-200'
)}>
- <span className="text-foreground/45">{active.before}</span>
+ <span className="text-muted-foreground">{active.before}</span>
<span className="text-foreground/95 rounded bg-amber-400/35 px-0.5">
{active.match}
</span>
- <span className="text-foreground/45">{active.after}</span>
+ <span className="text-muted-foreground">{active.after}</span>
</div>
)}
</div>
- <div className="bg-foreground/[0.04] relative w-1.5 shrink-0 rounded-full">
+ <div className="bg-foreground/[0.04] inset-ring-border relative w-1.5 shrink-0 rounded-full inset-ring forced-colors:border">
{hits.map((hit, i) => (
<span
key={hit.id}
aria-hidden
className={cn(
- 'absolute inset-x-0 h-1 rounded-full transition-colors duration-200',
- i === index ? 'bg-amber-500' : 'bg-amber-500/35'
+ "absolute inset-x-0 h-1 rounded-full transition-colors duration-200 forced-color-adjust-none",
+ i === index ? "bg-amber-500 forced-colors:bg-[Highlight]" : "bg-amber-500/35 forced-colors:bg-[CanvasText]"
)}
style={{ top: `${hit.position}%` }}
/>
diff --git a/app/src/components/assistant-ui/elements/data-table.tsx b/app/src/components/assistant-ui/elements/data-table.tsx
index 13afcb2c2b..cba2fd4c79 100644
--- a/app/src/components/assistant-ui/elements/data-table.tsx
+++ b/app/src/components/assistant-ui/elements/data-table.tsx
@@ -57,9 +57,9 @@ export function DataTable<TRow>({
return (
<div
data-slot="data-table"
- className={cn(paper, 'w-full max-w-sm overflow-hidden rounded-2xl text-[13px]', className)}
+ className={cn(paper, "@container w-full overflow-hidden rounded-2xl", className)}
{...props}>
- <div className="flex items-center px-4 pt-3 pb-2">
+ <div className="space-y-2 p-2.5 @md:hidden">
{columns.map(column => (
<span
key={column.key}
@@ -72,7 +72,7 @@ export function DataTable<TRow>({
</span>
))}
</div>
- <div className="bg-foreground/[0.06] mx-4 h-px" />
+ <div className="text-muted-foreground px-2 py-3 text-center text-[13px]" />
<div key={cycle}>
{rows.map((row, index) => {
const key = rowKey?.(row, index) ?? String(index);
@@ -85,7 +85,7 @@ export function DataTable<TRow>({
return (
<div
key={key}
- className="fade-in slide-in-from-bottom-1 animate-in fill-mode-both hover:bg-foreground/[0.03] flex items-center gap-2.5 px-4 py-2.5 transition-colors duration-300"
+ className="bg-foreground/[0.025] hover:bg-foreground/[0.04] rounded-xl px-3 py-2 transition-colors motion-reduce:transition-none"
style={{ animationDelay: `${index * 80}ms` }}>
<span className="bg-foreground/[0.06] text-foreground/45 flex size-5 shrink-0 items-center justify-center rounded-md text-[9px] font-medium">
{avatarLetter}
diff --git a/app/src/components/assistant-ui/elements/edit-message.tsx b/app/src/components/assistant-ui/elements/edit-message.tsx
index d2862987e0..f6435fc6b8 100644
--- a/app/src/components/assistant-ui/elements/edit-message.tsx
+++ b/app/src/components/assistant-ui/elements/edit-message.tsx
@@ -104,7 +104,7 @@ export function EditMessage({
<button
type="button"
onClick={onCancel}
- className="text-foreground/55 hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]">
+ className="text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]">
{cancelLabel}
</button>
<button
diff --git a/app/src/components/assistant-ui/elements/elicitation-form.tsx b/app/src/components/assistant-ui/elements/elicitation-form.tsx
index 6ea96cee9f..522b7fcd68 100644
--- a/app/src/components/assistant-ui/elements/elicitation-form.tsx
+++ b/app/src/components/assistant-ui/elements/elicitation-form.tsx
@@ -88,21 +88,21 @@ export function ElicitationForm({
className={cn(paper, 'flex w-full max-w-sm flex-col gap-3.5 rounded-[20px] p-4', className)}
{...props}>
<div className="flex items-center gap-2.5">
- <span className="bg-foreground/[0.05] text-foreground/45 flex size-7 shrink-0 items-center justify-center rounded-lg">
+ <span className="bg-foreground/[0.05] text-muted-foreground flex size-7 shrink-0 items-center justify-center rounded-lg">
<PlugIcon className="size-3.5" />
</span>
<span className="min-w-0 flex-1 truncate text-[13.5px] font-medium">{server}</span>
- <span className={cn(mono, 'text-foreground/30 shrink-0')}>{needsInputLabel}</span>
+ <span className={cn(mono, "text-muted-foreground shrink-0")}>{needsInputLabel}</span>
</div>
- <p className="text-foreground/55 text-xs leading-relaxed">{message}</p>
+ <p className="text-muted-foreground text-xs leading-relaxed">{message}</p>
<div className="flex flex-col gap-2.5">
{fields.map(item => (
<div key={item.name} className="flex flex-col gap-1">
- <span className={cn(mono, 'text-foreground/35')}>
+ <span className={cn(mono, "text-muted-foreground")}>
{item.label}
- {item.required && <span className="text-foreground/25"> *</span>}
+ {item.required && <span className="text-muted-foreground"> *</span>}
</span>
{item.kind === 'choice' ? (
<div className="flex flex-wrap gap-1.5">
@@ -134,7 +134,7 @@ export function ElicitationForm({
)}
/>
</span>
- <span className="text-foreground/55 text-xs">
+ <span className="fade-in animate-in text-muted-foreground flex items-center gap-2 text-xs duration-300">
{item.value === 'true' ? 'On' : 'Off'}
</span>
</span>
@@ -147,7 +147,7 @@ export function ElicitationForm({
}
className={cn(
field,
- 'text-foreground/80 rounded-lg px-2.5 py-1.5 text-xs outline-none'
+ "text-foreground/80 focus-visible:ring-foreground/20 rounded-lg px-2.5 py-1.5 text-xs outline-none focus-visible:ring-1"
)}
/>
) : (
@@ -178,7 +178,7 @@ export function ElicitationForm({
{...acceptProps}
className={cn(
inkButton,
- 'flex h-8 items-center rounded-full px-3.5 text-xs font-medium',
+ "focus-visible:ring-foreground/20 flex w-fit items-center gap-2 rounded-lg outline-none focus-visible:ring-1",
acceptProps?.className
)}>
{sendLabel}
@@ -195,7 +195,7 @@ export function ElicitationForm({
</>
) : (
<>
- <XIcon className="text-foreground/45 size-3.5" />
+ <XIcon className="text-muted-foreground size-3.5" />
{declinedLabel}
</>
)}
diff --git a/app/src/components/assistant-ui/elements/error-state.tsx b/app/src/components/assistant-ui/elements/error-state.tsx
index 1bcc9ce990..a0d597c30e 100644
--- a/app/src/components/assistant-ui/elements/error-state.tsx
+++ b/app/src/components/assistant-ui/elements/error-state.tsx
@@ -44,8 +44,8 @@ export function ErrorState({
className
)}
{...props}>
- <RefreshCwIcon className="text-foreground/45 size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
- <ShimmerLabel className="text-foreground/55 relative inline-block">
+ <RefreshCwIcon className="text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
+ <ShimmerLabel className="text-muted-foreground relative inline-block">
{retryingLabel}
</ShimmerLabel>
</div>
@@ -65,7 +65,7 @@ export function ErrorState({
<CircleAlertIcon className="mt-0.5 size-4 shrink-0 text-red-500/80" />
<div>
<p className="font-medium text-red-600 dark:text-red-400">{title}</p>
- <p className="mt-0.5 whitespace-pre-wrap text-[13px] leading-snug text-red-600/60 dark:text-red-400/60">
+ <p className="mt-0.5 text-[13px] leading-snug text-red-600/60 dark:text-red-400/60">
{detail}
</p>
</div>
diff --git a/app/src/components/assistant-ui/elements/guardrail-notice.tsx b/app/src/components/assistant-ui/elements/guardrail-notice.tsx
index 75adb027ff..f9c7c39a86 100644
--- a/app/src/components/assistant-ui/elements/guardrail-notice.tsx
+++ b/app/src/components/assistant-ui/elements/guardrail-notice.tsx
@@ -44,14 +44,14 @@ export function GuardrailNotice({
<ShieldIcon className="size-3.5" />
</span>
<span className="min-w-0 flex-1 truncate text-[13.5px] font-medium">{title}</span>
- <span className={cn(mono, 'text-foreground/30 shrink-0')}>{policy}</span>
+ <span className={cn(mono, "text-muted-foreground shrink-0")}>{policy}</span>
</div>
<p className="text-foreground/60 text-xs leading-relaxed">{explanation}</p>
{alternatives.length > 0 && (
<div className="flex flex-col gap-1.5">
- <span className={cn(mono, 'text-foreground/30')}>{alternativesLabel}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{alternativesLabel}</span>
{alternatives.map(alternative =>
onPick ? (
<button
diff --git a/app/src/components/assistant-ui/elements/image-generation.tsx b/app/src/components/assistant-ui/elements/image-generation.tsx
index fac3406bb2..624d39317d 100644
--- a/app/src/components/assistant-ui/elements/image-generation.tsx
+++ b/app/src/components/assistant-ui/elements/image-generation.tsx
@@ -88,13 +88,13 @@ export function ImageGeneration({
className={cn(
mono,
'absolute end-2.5 top-2.5 tabular-nums',
- generating ? 'text-foreground/35' : 'text-white/70'
+ generating ? "text-muted-foreground" : 'text-white/70'
)}>
{dimensions}
</span>
</div>
<div className="flex items-center justify-between gap-2">
- <p className="text-foreground/45 min-w-0 flex-1 truncate text-xs">
+ <p className="text-muted-foreground min-w-0 flex-1 truncate text-xs">
{generating ? (
<ShimmerLabel className="relative">{generatingLabel}</ShimmerLabel>
) : (
diff --git a/app/src/components/assistant-ui/elements/image.tsx b/app/src/components/assistant-ui/elements/image.tsx
index 26947793cf..0372f7d9fb 100644
--- a/app/src/components/assistant-ui/elements/image.tsx
+++ b/app/src/components/assistant-ui/elements/image.tsx
@@ -260,7 +260,7 @@ function ImageZoom({ src, alt = 'Image preview', children }: ImageZoomProps) {
data-slot="image-zoom-content"
src={src}
alt={alt}
- className="aui-image-zoom-content fade-in zoom-in-95 animate-in max-h-[90vh] max-w-[90vw] cursor-zoom-out object-contain duration-200"
+ className="aui-image-zoom-content fade-in zoom-in-95 animate-in max-h-[90%] max-w-[90%] cursor-zoom-out object-contain duration-200"
onClick={e => {
e.stopPropagation();
handleClose();
diff --git a/app/src/components/assistant-ui/elements/job-progress.tsx b/app/src/components/assistant-ui/elements/job-progress.tsx
index 57aa742eac..6664a1dc3b 100644
--- a/app/src/components/assistant-ui/elements/job-progress.tsx
+++ b/app/src/components/assistant-ui/elements/job-progress.tsx
@@ -62,10 +62,10 @@ export function JobProgress({
{finished ? (
<CheckIcon className="size-3.5 shrink-0 text-emerald-500" />
) : (
- <Loader2Icon className="text-foreground/35 size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
+ <Loader2Icon className="text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
)}
<span className="min-w-0 flex-1 truncate text-[13.5px] font-medium">{title}</span>
- <span className={cn(mono, 'text-foreground/35 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{finished ? 'done' : eta}
</span>
{!finished && (
@@ -74,7 +74,7 @@ export function JobProgress({
aria-label={cancelLabel}
onClick={onCancel}
className={cn(ghostButton, 'size-6 shrink-0')}>
- <XIcon className="size-3.5" />
+ <XIcon className="size-3.5 shrink-0 text-red-600 dark:text-red-400" />
</button>
)}
</div>
@@ -85,17 +85,17 @@ export function JobProgress({
aria-valuemin={0}
aria-valuemax={100}
aria-valuenow={announced(overall)}
- className="bg-foreground/[0.06] h-1 w-full overflow-hidden rounded-full">
+ className="bg-foreground/[0.06] inset-ring-border h-1 w-full overflow-hidden rounded-full inset-ring forced-colors:border">
<span
className={cn(
- 'block h-full rounded-full transition-[width] duration-500 ease-out motion-reduce:transition-none',
+ "block h-full rounded-full transition-[width] duration-500 ease-out forced-color-adjust-none motion-reduce:transition-none",
finished ? 'bg-emerald-500' : 'bg-blue-500 dark:bg-blue-400'
)}
style={{ width: `${overall}%` }}
/>
</span>
- <div className="flex flex-wrap gap-x-3 gap-y-1">
+ <div className="flex flex-col gap-0.5">
{stages.map((item, i) => (
<span
key={item.name}
diff --git a/app/src/components/assistant-ui/elements/loading-state.tsx b/app/src/components/assistant-ui/elements/loading-state.tsx
index 15e1509430..3b39eb151f 100644
--- a/app/src/components/assistant-ui/elements/loading-state.tsx
+++ b/app/src/components/assistant-ui/elements/loading-state.tsx
@@ -55,7 +55,7 @@ export function GenerationLoader({
);
})}
</div>
- <ShimmerLabel className="text-foreground/55 relative inline-block text-sm">
+ <ShimmerLabel className="text-muted-foreground relative inline-block text-sm">
{label}
</ShimmerLabel>
</div>
diff --git a/app/src/components/assistant-ui/elements/memory-chips.tsx b/app/src/components/assistant-ui/elements/memory-chips.tsx
index 1490820cf5..50b4c990d4 100644
--- a/app/src/components/assistant-ui/elements/memory-chips.tsx
+++ b/app/src/components/assistant-ui/elements/memory-chips.tsx
@@ -47,8 +47,8 @@ export function MemoryChips({
className={cn('flex w-full max-w-sm flex-col gap-2', className)}
{...props}>
<div className="flex items-center gap-1.5">
- <BrainIcon className="text-foreground/30 size-3.5" />
- <span className={cn(mono, 'text-foreground/35')}>
+ <BrainIcon className="text-muted-foreground size-3.5" />
+ <span className={cn(mono, "text-muted-foreground")}>
{fresh > 0 ? headingRememberedLabel(fresh) : headingIdleLabel}
</span>
</div>
@@ -60,7 +60,7 @@ export function MemoryChips({
className={cn(
'fade-in zoom-in-95 animate-in fill-mode-both group flex items-center gap-1 rounded-full py-1 pr-1 pl-2.5 text-xs duration-300',
chip.change === 'existing'
- ? cn(field, 'text-foreground/55')
+ ? cn(field, "text-muted-foreground")
: 'bg-blue-500/12 text-blue-700 dark:bg-blue-400/15 dark:text-blue-300'
)}>
{chip.text}
diff --git a/app/src/components/assistant-ui/elements/message-queue.tsx b/app/src/components/assistant-ui/elements/message-queue.tsx
index 264fb204fa..398d9c9bbf 100644
--- a/app/src/components/assistant-ui/elements/message-queue.tsx
+++ b/app/src/components/assistant-ui/elements/message-queue.tsx
@@ -58,13 +58,13 @@ export function MessageQueue({
<span className="relative inline-flex size-2 rounded-full bg-blue-500 dark:bg-blue-400" />
</span>
<span className="text-foreground/90 min-w-0 flex-1 truncate text-[13.5px]">{running}</span>
- <span className={cn(mono, 'text-foreground/35 shrink-0')}>{runningLabel}</span>
+ <span className={cn(mono, "text-muted-foreground shrink-0")}>{runningLabel}</span>
</div>
{queuedCount > 0 && (
<div className="flex items-baseline justify-between px-1">
- <span className={cn(mono, 'text-foreground/35')}>{queuedLabel(queuedCount)}</span>
- <span className={cn(mono, 'text-foreground/35')}>{pendingHint}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{queuedLabel(queuedCount)}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{pendingHint}</span>
</div>
)}
diff --git a/app/src/components/assistant-ui/elements/permission-grant.tsx b/app/src/components/assistant-ui/elements/permission-grant.tsx
index f15636a473..c631945121 100644
--- a/app/src/components/assistant-ui/elements/permission-grant.tsx
+++ b/app/src/components/assistant-ui/elements/permission-grant.tsx
@@ -86,19 +86,19 @@ export function PermissionGrant({
className={cn(paper, 'flex w-full max-w-sm flex-col gap-3.5 rounded-[20px] p-4', className)}
{...props}>
<div className="flex items-center gap-2.5">
- <span className="bg-foreground/[0.05] text-foreground/45 flex size-7 shrink-0 items-center justify-center rounded-lg">
+ <span className="bg-foreground/[0.05] text-muted-foreground flex size-7 shrink-0 items-center justify-center rounded-lg">
<KeyRoundIcon className="size-3.5" />
</span>
<div className="flex min-w-0 flex-1 flex-col">
<span className="truncate text-[13.5px] font-medium">{capability}</span>
- <span className="text-foreground/45 truncate text-xs">
+ <span className="text-muted-foreground truncate text-xs">
{requesterLabel} {requester}
</span>
</div>
</div>
<div className="flex flex-col gap-1">
- <span className={cn(mono, 'text-foreground/30')}>{reachLabel}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{reachLabel}</span>
{reach.map(item => (
<span key={item} className="text-foreground/60 flex items-baseline gap-2 text-xs">
<span aria-hidden className="bg-foreground/20 size-1 rounded-full" />
@@ -116,7 +116,7 @@ export function PermissionGrant({
onClick={() => onGrant('denied')}
{...denyProps}
className={cn(
- 'text-foreground/55 hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]',
+ "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
denyProps?.className
)}>
{denyLabel}
@@ -126,7 +126,7 @@ export function PermissionGrant({
onClick={() => onGrant('session')}
{...sessionProps}
className={cn(
- 'text-foreground/55 hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]',
+ "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-8 rounded-full px-3 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
sessionProps?.className
)}>
{sessionLabel}
@@ -149,7 +149,7 @@ export function PermissionGrant({
className={cn(
field,
mono,
- 'fade-in animate-in text-foreground/55 rounded-full px-2.5 py-1.5 duration-300'
+ "fade-in animate-in text-muted-foreground rounded-full px-2.5 py-1.5 duration-300"
)}>
{pendingLabel}
</span>
@@ -160,7 +160,7 @@ export function PermissionGrant({
className={cn(
field,
mono,
- 'fade-in animate-in text-foreground/55 rounded-full px-2.5 py-1.5 duration-300'
+ "fade-in animate-in text-muted-foreground rounded-full px-2.5 py-1.5 duration-300"
)}>
{scope === 'denied' ? deniedLabel : grantedLabel(scope)}
</span>
diff --git a/app/src/components/assistant-ui/elements/reasoning-panel.tsx b/app/src/components/assistant-ui/elements/reasoning-panel.tsx
index a4d636f875..076ba1bf2a 100644
--- a/app/src/components/assistant-ui/elements/reasoning-panel.tsx
+++ b/app/src/components/assistant-ui/elements/reasoning-panel.tsx
@@ -260,13 +260,13 @@ export function ReasoningPanel({
data-testid={testId}
open={isOpen}
onOpenChange={handleOpenChange}
- className={cn('w-full', className)}>
+ className={cn("w-full max-w-sm", className)}>
<CollapsibleTrigger
disabled={shown.length === 0}
- className="group/trigger text-foreground/55 hover:text-foreground/90 flex items-center gap-1.5 py-1 text-[13.5px] transition-[color,scale] outline-none active:scale-[0.98] disabled:pointer-events-none">
+ className="group/trigger text-muted-foreground hover:text-foreground/90 flex items-center gap-1.5 py-1 text-[13.5px] transition-[color,scale] outline-none active:scale-[0.98]">
{label}
{shown.length > 0 && (
- <ChevronDownIcon className="size-3.5 shrink-0 opacity-60 transition-transform duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] group-data-[state=open]/trigger:rotate-180 motion-reduce:transition-none" />
+ <ChevronDownIcon className="size-3.5 shrink-0 opacity-60 transition-transform duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] group-data-open/trigger:rotate-180 group-data-panel-open/trigger:rotate-180 motion-reduce:transition-none" />
)}
</CollapsibleTrigger>
<CollapsibleContent
diff --git a/app/src/components/assistant-ui/elements/schedule-card.tsx b/app/src/components/assistant-ui/elements/schedule-card.tsx
index f1439a8d1b..8934499629 100644
--- a/app/src/components/assistant-ui/elements/schedule-card.tsx
+++ b/app/src/components/assistant-ui/elements/schedule-card.tsx
@@ -60,12 +60,12 @@ export function ScheduleCard({
className={cn(paper, 'flex w-full max-w-sm flex-col gap-3 rounded-2xl p-4', className)}
{...props}>
<div className="flex items-center gap-2.5">
- <span className="bg-foreground/[0.05] text-foreground/45 flex size-7 shrink-0 items-center justify-center rounded-lg">
+ <span className="bg-foreground/[0.05] text-muted-foreground flex size-7 shrink-0 items-center justify-center rounded-lg">
<ClockIcon className="size-3.5" />
</span>
<div className="flex min-w-0 flex-1 flex-col">
<span className="truncate text-[13.5px] font-medium">{name}</span>
- <span className={cn(mono, 'text-foreground/30')}>{cadence}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{cadence}</span>
</div>
<button
type="button"
@@ -92,12 +92,12 @@ export function ScheduleCard({
'flex items-baseline gap-2 rounded-xl px-3 py-2',
!enabled && 'opacity-45'
)}>
- <span className={cn(mono, 'text-foreground/30')}>{nextLabel}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{nextLabel}</span>
<span className="text-foreground/80 text-[13px]">{enabled ? nextRun : pausedLabel}</span>
</div>
<div className="flex flex-col gap-1">
- <span className={cn(mono, 'text-foreground/30')}>{recentRunsLabel}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{recentRunsLabel}</span>
{history.map(run => (
<div key={run.id} className="flex items-baseline gap-2">
{run.ok ? (
@@ -106,7 +106,7 @@ export function ScheduleCard({
<XIcon className="size-3 shrink-0 translate-y-0.5 text-red-500" />
)}
<span className="text-foreground/60 min-w-0 flex-1 truncate text-xs">{run.at}</span>
- <span className={cn(mono, 'text-foreground/25 shrink-0')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0")}>
{run.ok ? okLabel : failedLabel}
</span>
</div>
diff --git a/app/src/components/assistant-ui/elements/settings-panel.tsx b/app/src/components/assistant-ui/elements/settings-panel.tsx
index 27d2114ec0..3bbe749687 100644
--- a/app/src/components/assistant-ui/elements/settings-panel.tsx
+++ b/app/src/components/assistant-ui/elements/settings-panel.tsx
@@ -80,7 +80,7 @@ export function SettingsPanel({
className={cn(paper, 'flex w-full max-w-sm flex-col gap-4 rounded-[20px] p-4', className)}
{...props}>
<div className="flex flex-col gap-1.5">
- <span className={cn(mono, 'text-foreground/30')}>{modelLabel}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{modelLabel}</span>
<div className={cn(field, 'flex gap-0.5 rounded-full p-0.5')}>
{models.map(option => {
const className = cn(
@@ -116,7 +116,7 @@ export function SettingsPanel({
{systemPrompt !== undefined && (
<div className="flex flex-col gap-1.5">
- <span className={cn(mono, 'text-foreground/30')}>{systemPromptLabel}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{systemPromptLabel}</span>
<textarea
value={systemPrompt}
onChange={event => onSystemPromptChange?.(event.target.value)}
@@ -133,8 +133,8 @@ export function SettingsPanel({
{temperature !== undefined && (
<div className="flex flex-col gap-1.5">
<span className="flex items-baseline justify-between">
- <span className={cn(mono, 'text-foreground/30')}>{temperatureLabel}</span>
- <span className={cn(mono, 'text-foreground/55 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground")}>{temperatureLabel}</span>
+ <span className={cn(mono, "text-muted-foreground tabular-nums")}>
{clamp(temperature, 0, 2).toFixed(1)}
</span>
</span>
@@ -157,7 +157,7 @@ export function SettingsPanel({
<div key={toggle.key} className="flex items-center gap-3">
<span className="flex min-w-0 flex-1 flex-col">
<span className="truncate text-[13px]">{toggle.label}</span>
- <span className="text-foreground/35 truncate text-xs">{toggle.detail}</span>
+ <span className="text-muted-foreground truncate text-xs">{toggle.detail}</span>
</span>
{onToggle ? (
<button
diff --git a/app/src/components/assistant-ui/elements/stopped-run.tsx b/app/src/components/assistant-ui/elements/stopped-run.tsx
index 9baed95124..4603ba3011 100644
--- a/app/src/components/assistant-ui/elements/stopped-run.tsx
+++ b/app/src/components/assistant-ui/elements/stopped-run.tsx
@@ -49,7 +49,7 @@ export function StoppedRun({
className={cn(
field,
mono,
- 'text-foreground/45 inline-flex items-center gap-1.5 rounded-full px-2.5 py-1'
+ "text-muted-foreground inline-flex items-center gap-1.5 rounded-full px-2.5 py-1"
)}>
<SquareIcon className="size-2.5 fill-current" />
{reason}
@@ -65,7 +65,7 @@ export function StoppedRun({
<button
type="button"
onClick={onDiscard}
- className="text-foreground/45 hover:bg-foreground/[0.06] hover:text-foreground/90 flex h-7 items-center rounded-full px-2.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]">
+ className="text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 flex h-7 items-center rounded-full px-2.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]">
{discardLabel}
</button>
</div>
diff --git a/app/src/components/assistant-ui/elements/subagent-list.tsx b/app/src/components/assistant-ui/elements/subagent-list.tsx
index d77d96932b..25de47368d 100644
--- a/app/src/components/assistant-ui/elements/subagent-list.tsx
+++ b/app/src/components/assistant-ui/elements/subagent-list.tsx
@@ -47,7 +47,7 @@ export function SubagentList({
return (
<div
data-slot="subagent-list"
- className={cn('flex min-h-[14.5rem] w-full max-w-xs flex-col gap-2', className)}
+ className={cn("flex w-full max-w-xs flex-col gap-2", className)}
{...props}>
{agents.map((agent, index) => {
const done = agent.done ?? index < completedCount;
@@ -62,10 +62,10 @@ export function SubagentList({
{done ? (
<CheckIcon className="fade-in zoom-in-90 animate-in size-3.5 shrink-0 text-emerald-500 duration-200" />
) : (
- <Loader2Icon className="text-foreground/35 size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
+ <Loader2Icon className="text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
)}
<span className="flex-1 truncate text-[13.5px]">{agent.name}</span>
- <span className={cn(mono, 'text-foreground/35')}>{agent.model}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{agent.model}</span>
</div>
<span
role="progressbar"
@@ -73,10 +73,10 @@ export function SubagentList({
aria-valuemin={0}
aria-valuemax={100}
aria-valuenow={percentage}
- className="bg-foreground/[0.06] h-[3px] w-full overflow-hidden rounded-full">
+ className="bg-foreground/[0.06] inset-ring-border h-[3px] w-full overflow-hidden rounded-full inset-ring forced-colors:outline">
<span
className={cn(
- 'block h-full rounded-full transition-[width] duration-700',
+ "block h-full rounded-full transition-[width] duration-700 forced-color-adjust-none",
done ? 'bg-emerald-500/70' : 'bg-foreground/60'
)}
style={{ width: `${percentage}%` }}
@@ -92,16 +92,16 @@ export function SubagentList({
'fade-in slide-in-from-bottom-2 animate-in flex flex-col gap-2 rounded-2xl px-3.5 py-2.5 duration-300'
)}>
<div className="flex items-center gap-2">
- <Loader2Icon className="text-foreground/35 size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
+ <Loader2Icon className="text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" />
<span className="flex-1 truncate text-[13.5px]">{summaryAgent.name}</span>
- <span className={cn(mono, 'text-foreground/35')}>{summaryAgent.model}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{summaryAgent.model}</span>
</div>
<span
role="progressbar"
aria-label={`${summaryAgent.name} progress`}
aria-valuemin={0}
aria-valuemax={100}
- className="bg-foreground/[0.06] h-[3px] w-full overflow-hidden rounded-full">
+ className="bg-foreground/[0.06] inset-ring-border h-[3px] w-full overflow-hidden rounded-full inset-ring forced-colors:outline">
<span className="shimmer shimmer-bg block h-full w-full rounded-full motion-reduce:animate-none" />
</span>
</div>
diff --git a/app/src/components/assistant-ui/elements/task-card.aui.tsx b/app/src/components/assistant-ui/elements/task-card.aui.tsx
index 5866a344d5..02b6c3f339 100644
--- a/app/src/components/assistant-ui/elements/task-card.aui.tsx
+++ b/app/src/components/assistant-ui/elements/task-card.aui.tsx
@@ -90,7 +90,7 @@ const NestedMessage: FC<{ roleLabels: TaskTranscriptRoleLabels }> = ({ roleLabel
data-slot="aui_task-transcript-message"
data-role={role}
className="flex flex-col gap-1 text-xs leading-relaxed">
- <span className={cn(mono, 'text-foreground/35')}>{roleLabels[role]}</span>
+ <span className={cn(mono, "text-muted-foreground")}>{roleLabels[role]}</span>
<MessagePrimitive.Parts
components={{ Text: MarkdownText, tools: { Fallback: NestedToolCall } }}
/>
diff --git a/app/src/components/assistant-ui/elements/task-card.tsx b/app/src/components/assistant-ui/elements/task-card.tsx
index 69739824c6..2ea7d1fe12 100644
--- a/app/src/components/assistant-ui/elements/task-card.tsx
+++ b/app/src/components/assistant-ui/elements/task-card.tsx
@@ -47,14 +47,14 @@ export function TaskStateIcon({ state, className }: { state: TaskCardState; clas
);
}
if (state === 'cancelled') {
- return <Ban aria-hidden className={cn('text-foreground/35 size-3.5 shrink-0', className)} />;
+ return <Ban aria-hidden className={cn("text-muted-foreground size-3.5 shrink-0", className)} />;
}
if (state === 'working') {
return (
<Loader2Icon
aria-hidden
className={cn(
- 'text-foreground/35 size-3.5 shrink-0 animate-spin motion-reduce:animate-none',
+ "text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none",
className
)}
/>
@@ -121,16 +121,16 @@ export function TaskCard({
<span className="sr-only">{t(`conversations.taskCard.state.${state}`)}</span>
<span className="min-w-0 flex-1 truncate text-[13.5px]">{label}</span>
{meta !== undefined && (
- <span className={cn(mono, 'text-foreground/35 max-w-24 shrink-0 truncate')}>{meta}</span>
+ <span className={cn(mono, "text-muted-foreground max-w-24 shrink-0 truncate")}>{meta}</span>
)}
{elapsed !== undefined && (
- <span className={cn(mono, 'text-foreground/30 shrink-0 tabular-nums')}>{elapsed}</span>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>{elapsed}</span>
)}
{hasTranscript && (
<ChevronRightIcon
aria-hidden
className={cn(
- 'text-foreground/25 size-3 shrink-0 transition-transform duration-200 motion-reduce:transition-none',
+ "text-muted-foreground size-3 shrink-0 transition-transform duration-200 motion-reduce:transition-none",
isOpen && 'rotate-90'
)}
/>
diff --git a/app/src/components/assistant-ui/elements/terminal-block.tsx b/app/src/components/assistant-ui/elements/terminal-block.tsx
index a3655c1525..a965d2eacf 100644
--- a/app/src/components/assistant-ui/elements/terminal-block.tsx
+++ b/app/src/components/assistant-ui/elements/terminal-block.tsx
@@ -54,7 +54,7 @@ export function TerminalBlock({
<div className="flex items-center justify-between gap-3 px-4 pt-3 pb-1.5">
<span
className={cn(
- 'min-w-0 break-all',
+ "min-w-0 break-words",
ink ? 'text-background/90 dark:text-foreground/90' : 'text-foreground/90'
)}>
{command}
@@ -69,7 +69,7 @@ export function TerminalBlock({
<span
className={cn(
mono,
- ink ? 'text-background/40 dark:text-foreground/40' : 'text-foreground/40'
+ ink ? "text-background/40 dark:text-muted-foreground" : "text-muted-foreground"
)}>
{exitLabel}
</span>
@@ -77,8 +77,8 @@ export function TerminalBlock({
) : (
<Loader2Icon
className={cn(
- 'size-3 shrink-0 animate-spin motion-reduce:animate-none',
- ink ? 'text-background/35 dark:text-foreground/35' : 'text-foreground/35'
+ "size-3 animate-spin motion-reduce:animate-none",
+ ink ? "text-background/35 dark:text-muted-foreground" : "text-muted-foreground"
)}
/>
)}
diff --git a/app/src/components/assistant-ui/elements/timeline.tsx b/app/src/components/assistant-ui/elements/timeline.tsx
index 841eb52042..5b1c342906 100644
--- a/app/src/components/assistant-ui/elements/timeline.tsx
+++ b/app/src/components/assistant-ui/elements/timeline.tsx
@@ -60,9 +60,9 @@ export function Timeline({
<span
className={cn(
'mt-1 size-2 shrink-0 rounded-full',
- event.when === 'now' && 'bg-blue-500 ring-4 ring-blue-500/15 dark:bg-blue-400',
- event.when === 'past' && 'bg-foreground/30',
- event.when === 'future' && 'border-foreground/20 border bg-transparent'
+ event.when === 'now' && "bg-blue-500 ring-4 ring-blue-500/15 dark:bg-blue-400 forced-colors:bg-[Highlight]",
+ event.when === 'past' && "bg-muted-foreground forced-colors:bg-[CanvasText]",
+ event.when === 'future' && "border-muted-foreground border bg-transparent"
)}
/>
{i < shown.length - 1 && (
@@ -79,13 +79,13 @@ export function Timeline({
<span
className={cn(
'text-[13px] break-words',
- event.when === 'future' ? 'text-foreground/40' : 'text-foreground/90',
+ event.when === 'future' ? "text-muted-foreground" : 'text-foreground/90',
event.when === 'now' && 'font-medium'
)}>
{event.title}
</span>
{event.detail && (
- <span className="text-foreground/45 text-xs leading-relaxed break-words">
+ <span className="text-muted-foreground text-xs leading-relaxed break-words">
{event.detail}
</span>
)}
diff --git a/app/src/components/assistant-ui/elements/todo-list.tsx b/app/src/components/assistant-ui/elements/todo-list.tsx
index 7f06a299e0..4dfb823d4e 100644
--- a/app/src/components/assistant-ui/elements/todo-list.tsx
+++ b/app/src/components/assistant-ui/elements/todo-list.tsx
@@ -50,9 +50,9 @@ export function TodoList({
data-slot="todo-list"
className={cn('flex w-full max-w-sm flex-col gap-3', className)}
{...props}>
- <div className="flex items-baseline justify-between">
+ <div className="flex items-start justify-between gap-3">
<span className="text-[13.5px] font-medium">{title}</span>
- <span className={cn(mono, 'text-foreground/35 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 whitespace-nowrap tabular-nums")}>
{revision === undefined
? `${done}/${items.length}`
: `${done}/${items.length} · rev ${revision}`}
diff --git a/app/src/components/assistant-ui/elements/tool-call.tsx b/app/src/components/assistant-ui/elements/tool-call.tsx
index 344e293209..b7f1e29da5 100644
--- a/app/src/components/assistant-ui/elements/tool-call.tsx
+++ b/app/src/components/assistant-ui/elements/tool-call.tsx
@@ -81,16 +81,16 @@ export function ToolCall({
open={open}
defaultOpen={defaultOpen}
onOpenChange={onOpenChange}
- className={cn('w-full max-w-sm min-w-0', className)}
+ className={cn("w-full max-w-sm", className)}
{...props}>
<CollapsibleTrigger
disabled={!hasPanel}
- className="group/trigger text-foreground/55 hover:text-foreground/90 flex w-full min-w-0 items-center gap-2 rounded-md py-1 text-[13.5px] transition-colors outline-none">
+ className="group/trigger text-muted-foreground hover:text-foreground/90 flex w-full items-center gap-2 rounded-md py-1 text-[13.5px] transition-colors outline-none">
<ChevronRightIcon
className={cn('size-3.5 shrink-0 opacity-60', openRotate, !hasPanel && 'invisible')}
/>
{icon}
- <SwapLabel active={running ? 0 : 1} className="shrink-0 text-start">
+ <SwapLabel active={running ? 0 : 1} className="shrink-0 text-start whitespace-nowrap">
<ShimmerLabel
active={running && outcome !== 'awaiting'}
className="relative inline-block leading-none">
@@ -108,7 +108,7 @@ export function ToolCall({
{query}
</span>
) : null}
- <span className="ms-auto flex shrink-0 items-center justify-end gap-1.5">
+ <span className="bg-foreground/[0.06] text-foreground/70 min-w-0 truncate rounded-md px-1.5 py-0.5">
{meta}
{!running && outcome === 'success' ? (
<CheckIcon className="fade-in zoom-in-90 animate-in size-3.5 text-emerald-500 duration-200" />
@@ -125,18 +125,18 @@ export function ToolCall({
<div className={cn(field, 'mt-2 overflow-hidden rounded-2xl text-xs')}>
{request != null ? (
<div className="px-3.5 pt-2.5 pb-2">
- <p className={cn(mono, 'text-foreground/35 mb-1')}>{requestLabel}</p>
- <div className="text-foreground/55 max-h-48 overflow-auto font-mono">
+ <p className={cn(mono, "text-muted-foreground mb-1")}>{requestLabel}</p>
+ <div className="bg-foreground/[0.06] mx-3.5 h-px">
{request}
</div>
</div>
) : null}
{request != null && result != null ? (
- <div className="bg-foreground/[0.06] mx-3.5 h-px" />
+ <div className="px-3.5 pt-2 pb-2.5" />
) : null}
{result != null ? (
<div className="px-3.5 pt-2 pb-2.5">
- <p className={cn(mono, 'text-foreground/35 mb-1')}>{resultLabel}</p>
+ <p className={cn(mono, "text-muted-foreground font-mono break-words")}>{resultLabel}</p>
<div className="text-foreground/90 max-h-64 overflow-auto">{result}</div>
</div>
) : null}
diff --git a/app/src/components/assistant-ui/elements/tool-error.tsx b/app/src/components/assistant-ui/elements/tool-error.tsx
index 7266bf3f47..9d56cca00d 100644
--- a/app/src/components/assistant-ui/elements/tool-error.tsx
+++ b/app/src/components/assistant-ui/elements/tool-error.tsx
@@ -62,9 +62,9 @@ export function ToolError({
{...props}>
<div className="flex items-center gap-2.5">
<AlertCircleIcon className="size-3.5 shrink-0 text-red-500" />
- <span className={cn(mono, 'text-foreground/55 shrink-0')}>{name}</span>
+ <span className={cn(mono, "text-muted-foreground min-w-0 wrap-anywhere")}>{name}</span>
<span className="text-foreground/80 min-w-0 flex-1 truncate text-[13px]">{target}</span>
- <span className={cn(mono, 'text-foreground/30 shrink-0 tabular-nums')}>
+ <span className={cn(mono, "text-muted-foreground shrink-0 tabular-nums")}>
{attempt}/{maxAttempts}
</span>
</div>
@@ -72,7 +72,7 @@ export function ToolError({
<div
className={cn(
field,
- 'rounded-xl px-3 py-2 font-mono text-[11px] leading-relaxed text-red-700 dark:text-red-300'
+ "rounded-xl px-3 py-2 font-mono text-[11px] leading-relaxed break-words text-red-700 dark:text-red-300"
)}>
{message}
</div>
@@ -82,14 +82,14 @@ export function ToolError({
type="button"
onClick={onSkip}
disabled={!onSkip}
- className="text-foreground/45 hover:bg-foreground/[0.06] hover:text-foreground/90 h-7 rounded-full px-2.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96] disabled:pointer-events-none disabled:opacity-30">
+ className="text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 h-7 rounded-full px-2.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96] disabled:pointer-events-none disabled:opacity-30">
{skipLabel}
</button>
<button
type="button"
onClick={onRetry}
disabled={retrying || !onRetry}
- className="text-foreground/70 hover:bg-foreground/[0.06] hover:text-foreground/95 flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96] disabled:pointer-events-none disabled:opacity-30">
+ className="text-foreground/70 hover:bg-foreground/[0.06] hover:text-foreground/95 flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96] disabled:pointer-events-none">
{retrying ? (
<Loader2Icon className="size-3 animate-spin motion-reduce:animate-none" />
) : (
diff --git a/app/src/components/assistant-ui/elements/tool-fallback.tsx b/app/src/components/assistant-ui/elements/tool-fallback.tsx
index f781240dca..b9bf06122f 100644
--- a/app/src/components/assistant-ui/elements/tool-fallback.tsx
+++ b/app/src/components/assistant-ui/elements/tool-fallback.tsx
@@ -167,7 +167,7 @@ function ToolFallbackTrigger({
<CollapsibleTrigger
data-slot="tool-fallback-trigger"
className={cn(
- 'aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]',
+ "aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit max-w-full origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]",
className
)}
{...props}>
@@ -221,7 +221,7 @@ function ToolFallbackContent({
<CollapsibleContent
data-slot="tool-fallback-content"
className={cn(
- 'aui-tool-fallback-content relative overflow-hidden text-sm outline-hidden',
+ "aui-tool-fallback-content relative overflow-hidden text-sm outline-none",
'group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none',
'data-closed:animate-collapsible-up',
'data-open:animate-collapsible-down',
@@ -256,7 +256,7 @@ function ToolFallbackArgs({
data-slot="tool-fallback-args"
className={cn('aui-tool-fallback-args', className)}
{...props}>
- <pre className="aui-tool-fallback-args-value bg-muted/50 text-foreground/90 rounded-md p-2.5 text-xs whitespace-pre-wrap">
+ <pre className="aui-tool-fallback-args-value bg-muted/50 text-foreground/90 rounded-md p-2.5 text-xs break-words whitespace-pre-wrap">
{argsText}
</pre>
</div>
@@ -298,7 +298,7 @@ function ToolFallbackResult({
<p className="aui-tool-fallback-result-header text-muted-foreground text-xs font-medium">
{t('toolFallback.result', 'Result:')}
</p>
- <pre className="aui-tool-fallback-result-content bg-muted/50 text-foreground/90 mt-1 rounded-md p-2.5 text-xs whitespace-pre-wrap">
+ <pre className="aui-tool-fallback-result-content bg-muted/50 text-foreground/90 mt-1 rounded-md p-2.5 text-xs break-words whitespace-pre-wrap">
{formatUnknownValue(result, 2)}
</pre>
</div>
@@ -328,7 +328,7 @@ function ToolFallbackError({
<p className="aui-tool-fallback-error-header text-muted-foreground font-semibold">
{headerText}
</p>
- <p className="aui-tool-fallback-error-reason text-muted-foreground">{errorText}</p>
+ <p className="aui-tool-fallback-error-reason text-muted-foreground break-words whitespace-pre-line">{errorText}</p>
</div>
);
}
diff --git a/app/src/components/assistant-ui/elements/tool-timeline.tsx b/app/src/components/assistant-ui/elements/tool-timeline.tsx
index 62154d7019..38b11ba008 100644
--- a/app/src/components/assistant-ui/elements/tool-timeline.tsx
+++ b/app/src/components/assistant-ui/elements/tool-timeline.tsx
@@ -83,8 +83,8 @@ export function ToolTimeline({
onOpenChange={onOpenChange}
className={cn('w-full max-w-sm', className)}
{...props}>
- <CollapsibleTrigger className="group/trigger text-foreground/55 hover:text-foreground/90 flex items-center gap-1.5 rounded-md py-1 text-[13.5px] transition-colors outline-none">
- <ChevronRightIcon className={cn('size-3.5 shrink-0 opacity-60', openRotate)} />
+ <CollapsibleTrigger className="group/trigger text-muted-foreground hover:text-foreground/90 flex items-center gap-1.5 rounded-md py-1 text-[13.5px] transition-colors outline-none">
+ <ChevronRightIcon className={cn("size-3.5 shrink-0 opacity-60 transition-transform duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] group-data-open/trigger:rotate-90 group-data-panel-open/trigger:rotate-90 motion-reduce:transition-none", openRotate)} />
<SwapLabel active={streaming ? 0 : 1} className="text-start tabular-nums">
<ShimmerLabel active={streaming} className="relative inline-block leading-none">
{activeLabel}
@@ -102,8 +102,8 @@ export function ToolTimeline({
return (
<div
key={`${index}-${step.chip}`}
- className="fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-foreground/55 flex items-center gap-2 text-[13.5px] duration-300">
- <Icon className="text-foreground/35 size-3.5 shrink-0" />
+ className="fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-muted-foreground flex items-center gap-2 text-[13.5px] duration-300">
+ <Icon className="text-muted-foreground size-3.5 shrink-0" />
<ShimmerLabel active={active} className="relative inline-block leading-none">
{step.verb}
</ShimmerLabel>
diff --git a/app/src/components/assistant-ui/elements/web-preview.tsx b/app/src/components/assistant-ui/elements/web-preview.tsx
index 98d818b771..6586d57932 100644
--- a/app/src/components/assistant-ui/elements/web-preview.tsx
+++ b/app/src/components/assistant-ui/elements/web-preview.tsx
@@ -67,7 +67,7 @@ export function WebPreview({
field,
'flex min-w-0 flex-1 items-center gap-1.5 rounded-full px-2.5 py-1'
)}>
- <span className={cn(mono, 'text-foreground/45 min-w-0 truncate')}>{origin}</span>
+ <span className={cn(mono, "text-muted-foreground min-w-0 truncate")}>{origin}</span>
</span>
<button
@@ -90,7 +90,7 @@ export function WebPreview({
</div>
{loading && (
<div className="absolute inset-0 flex items-center justify-center">
- <ShimmerLabel className="text-foreground/40 relative inline-block text-xs leading-none">
+ <ShimmerLabel className="text-muted-foreground relative inline-block text-xs leading-none">
{loadingLabel}
</ShimmerLabel>
</div>
diff --git a/app/src/components/assistant-ui/elements/web-search.tsx b/app/src/components/assistant-ui/elements/web-search.tsx
index d57590f3cb..d993a46a4b 100644
--- a/app/src/components/assistant-ui/elements/web-search.tsx
+++ b/app/src/components/assistant-ui/elements/web-search.tsx
@@ -73,8 +73,8 @@ export function WebSearch({
field,
'text-foreground/70 inline-flex w-fit max-w-full items-center gap-1.5 rounded-full px-3.5 py-2 text-xs'
)}>
- <SearchIcon className="text-foreground/40 size-3 shrink-0" />
- <span className="truncate">{query}</span>
+ <SearchIcon className="text-muted-foreground size-3" />
+ <span className="text-foreground/70 inline-flex w-fit items-center gap-1.5 rounded-full px-3.5 py-2 text-xs">{query}</span>
</span>
) : null}
<div data-slot="web-search-status" className="text-foreground/45 text-xs">
@@ -91,13 +91,13 @@ export function WebSearch({
{shown.map(result => {
const content = (
<>
- <span className="bg-foreground/[0.06] text-foreground/45 flex size-4 shrink-0 items-center justify-center rounded text-[9px] font-medium">
+ <span className="bg-foreground/[0.06] text-muted-foreground flex size-4 shrink-0 items-center justify-center rounded text-[9px] font-medium">
{result.domain.charAt(0).toUpperCase()}
</span>
<span className="text-foreground/90 min-w-0 flex-1 truncate text-[13.5px]">
{result.title}
</span>
- <span className={cn(mono, 'text-foreground/35 shrink-0')}>{result.domain}</span>
+ <span className={cn(mono, "text-muted-foreground shrink-0")}>{result.domain}</span>
</>
);
const key = `${cycle}-${result.url ?? result.domain}-${result.title}`;
diff --git a/app/src/components/assistant-ui/file.tsx b/app/src/components/assistant-ui/file.tsx
index b6a5cbb297..7c8e74a322 100644
--- a/app/src/components/assistant-ui/file.tsx
+++ b/app/src/components/assistant-ui/file.tsx
@@ -173,9 +173,9 @@ const FileImpl: FileMessagePartComponent = ({ filename, data, mimeType, sourceTy
return (
<FileRoot>
<FileIconDisplay mimeType={mimeType} />
- <div className="flex min-w-0 flex-1 flex-col gap-0.5">
+ <div className="flex w-full max-w-xl flex-col gap-2">
<FileName>{filename}</FileName>
- {showSize && <FileSize bytes={getBase64Size(data)} className="text-xs" />}
+ {showSize && <FileSize bytes={getBase64Size(data)} className="text-muted-foreground text-[11px]" />}
</div>
<FileDownload
data={data}
diff --git a/app/src/components/assistant-ui/markdown-text.tsx b/app/src/components/assistant-ui/markdown-text.tsx
index 530ff707f5..e48ded6bf2 100644
--- a/app/src/components/assistant-ui/markdown-text.tsx
+++ b/app/src/components/assistant-ui/markdown-text.tsx
@@ -300,7 +300,7 @@ const defaultComponents = memoizeMarkdownComponents({
if (source) return <CitationMarker index={citationIndex} source={source} />;
return (
<a
- className={cn('aui-md-a text-primary hover:text-primary/80 no-underline', className)}
+ className={cn("aui-md-a text-primary hover:text-primary/80 underline underline-offset-2", className)}
href={href}
{...props}>
{children}
@@ -341,7 +341,7 @@ const defaultComponents = memoizeMarkdownComponents({
table: ({ className, ...props }) => (
<table
className={cn(
- 'aui-md-table my-3 w-full border-separate border-spacing-0 overflow-y-auto',
+ "aui-md-table w-full border-separate border-spacing-0",
className
)}
{...props}
diff --git a/app/src/components/assistant-ui/message-timing.tsx b/app/src/components/assistant-ui/message-timing.tsx
index 95f8332db1..57bd92ade2 100644
--- a/app/src/components/assistant-ui/message-timing.tsx
+++ b/app/src/components/assistant-ui/message-timing.tsx
@@ -70,10 +70,10 @@ export const MessageTiming: FC<{
<div className="grid min-w-35 gap-1.5 text-xs">
{timing.firstTokenTime !== undefined && (
<div className="flex items-center justify-between gap-4">
- <span className="text-muted-foreground">
+ <span className="flex items-baseline gap-1">
{t('messageTiming.firstToken', 'First token')}
</span>
- <span className="font-mono tabular-nums">
+ <span className="text-muted-foreground">
{formatTimingMs(timing.firstTokenTime)}
</span>
</div>
diff --git a/app/src/components/assistant-ui/model-selector.tsx b/app/src/components/assistant-ui/model-selector.tsx
index 7a19ef013d..79aedbc774 100644
--- a/app/src/components/assistant-ui/model-selector.tsx
+++ b/app/src/components/assistant-ui/model-selector.tsx
@@ -425,7 +425,7 @@ function ModelSelectorList({ className, children, ...props }: ModelSelectorListP
<CommandList
data-slot="model-selector-list"
className={cn(
- '[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',
+ "[scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
className
)}
{...props}>
@@ -582,7 +582,7 @@ function ModelSelectorEffort({
key={option.id}
value={option.id}
className={cn(
- 'focus-visible:ring-ring/50 text-muted-foreground hover:text-foreground rounded-md px-2 py-1 text-xs transition-colors outline-none focus-visible:ring-1',
+ "focus-visible:ring-ring/50 text-muted-foreground hover:bg-muted hover:text-foreground cursor-pointer rounded-md px-2 py-1 text-xs transition-colors outline-none focus-visible:ring-1",
'data-checked:bg-accent data-checked:text-accent-foreground data-checked:font-medium'
)}>
{option.name}
diff --git a/app/src/components/assistant-ui/thread.tsx b/app/src/components/assistant-ui/thread.tsx
index 84c64f4ed1..e398b22f09 100644
--- a/app/src/components/assistant-ui/thread.tsx
+++ b/app/src/components/assistant-ui/thread.tsx
@@ -435,8 +435,8 @@ const ThreadRoot: FC<{
{...dropHandlers}
style={{
['--thread-max-width' as string]: '44rem',
- ['--composer-bg' as string]: 'var(--color-card)',
- ['--composer-radius' as string]: '1.5rem',
+ ['--composer-bg' as string]: 'color-mix(in oklab, var(--color-muted) 30%, transparent)',
+ ['--composer-radius' as string]: '1rem',
['--composer-padding' as string]: '8px',
}}>
<ThreadPrimitive.Viewport
@@ -477,7 +477,7 @@ const ThreadRoot: FC<{
<ThreadPrimitive.ViewportFooter
className={cn(
- 'aui-thread-viewport-footer relative z-10 flex flex-col gap-4 overflow-visible bg-transparent pb-4 md:pb-6',
+ "aui-thread-viewport-footer bg-background flex flex-col gap-4 overflow-visible pb-4 md:pb-6",
!isEmpty && 'sticky bottom-0 mt-auto rounded-t-(--composer-radius)'
)}>
<ThreadScrollToBottom />
@@ -565,7 +565,7 @@ const ThreadScrollToBottom: FC = () => {
const ThreadWelcome: FC = () => {
const { t } = useT();
return (
- <div className="aui-thread-welcome-root mb-6 flex flex-col items-center px-4 text-center">
+ <div className="aui-thread-welcome-root mb-6 flex flex-col px-2">
<h1 className="aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-2xl font-medium tracking-tight duration-200">
{t('chat.newWindowPrompt', 'How can I help you today?')}
</h1>
@@ -575,7 +575,7 @@ const ThreadWelcome: FC = () => {
const ThreadSuggestions: FC = () => {
return (
- <div className="aui-thread-welcome-suggestions flex w-full flex-wrap items-center justify-center gap-2 px-4">
+ <div className="aui-thread-welcome-suggestions flex w-full flex-col">
<ThreadPrimitive.Suggestions>{() => <ThreadSuggestionItem />}</ThreadPrimitive.Suggestions>
</div>
);
@@ -588,8 +588,8 @@ const ThreadSuggestionItem: FC = () => {
<Button
variant="ghost"
className="aui-thread-welcome-suggestion text-foreground hover:bg-muted border-border/60 h-auto gap-1.5 rounded-full border px-3.5 py-1.5 text-sm font-normal whitespace-nowrap transition-colors">
- <SuggestionPrimitive.Title className="aui-thread-welcome-suggestion-text-1" />
- <SuggestionPrimitive.Description className="aui-thread-welcome-suggestion-text-2 empty:hidden" />
+ <SuggestionPrimitive.Title className="aui-thread-welcome-suggestion-text-1 text-foreground" />
+ <SuggestionPrimitive.Description className="aui-thread-welcome-suggestion-text-2 text-muted-foreground empty:hidden" />
</Button>
</SuggestionPrimitive.Trigger>
</div>
@@ -708,69 +708,7 @@ const Composer: FC<{
data-slot="aui_composer-shell"
data-dragging={onComposerFiles && isDraggingFiles ? 'true' : undefined}
onPasteCapture={handlePasteCapture}
- // Keyed to `content-faint` rather than `line`/`line-strong`, which
- // sat too close to the composer's own surface to read as an edge at
- // all; `content-faint` is a real step along the grey ramp in both
- // themes and the alpha then pulls it back.
- //
- // The border is deliberately fainter than the content card's edge
- // (0.65 in `index.css`) because it is not carrying the definition
- // alone: `shadow-soft` lifts the composer off the transcript, and a
- // lifted surface needs less outline than a flat one to read as
- // separate. Border and shadow together at low strength read calmer
- // than either at full — a hard 0.65 line under a shadow reads as
- // two competing edges.
- //
- // Two roles, kept apart: the SHADOW is constant and the BORDER is
- // what moves.
- //
- // The shadow is an explicit near-black pair rather than
- // `shadow-soft`/`shadow-medium`. Those tokens are black at 0.08
- // alpha, which is a diffuse haze — on the themed chrome behind this
- // composer it reads as a smudge rather than a cast shadow.
- //
- // Both layers are pushed DOWN rather than spread evenly, because an
- // even shadow reads as a glow: it implies light from everywhere,
- // which is no light at all, and the composer ends up looking fuzzy
- // instead of raised. The offsets (6px, 22px) exceed each layer's
- // negative spread (-4px, -16px), so the cast clears the box on the
- // bottom edge and is pulled in at the top — the asymmetry is what
- // says "lit from above".
- //
- // 0 8px 12px -4px / 0.18 — contact: tight, near the edge
- // 0 30px 44px -16px / 0.24 — cast: far, wide, and the stronger
- //
- // Both halved from 0.34 / 0.48: at those strengths the composer
- // read as hovering well above the page, and the cast crowded the
- // last message. Half keeps the lit-from-above asymmetry while the
- // surface sits closer to the transcript.
- //
- // The far layer carrying more alpha than the near one is
- // deliberate and is what gives depth; the usual instinct is the
- // reverse, which flattens it back out.
- //
- // `animate-composer-shadow` then orbits those offsets clockwise on
- // a slow loop (`composerShadowOrbit`, `index.css`), as though the
- // light above the composer circles the room. The static values here
- // are the orbit's 25% stop, so the animation starts from roughly
- // where the unanimated composer sits rather than jumping on load. The static `shadow-[…]` above is
- // not redundant: it is what `motion-reduce:animate-none` falls back
- // to, so the composer keeps its elevation when the OS asks for less
- // motion and merely stops moving. Keyframes override the utility
- // while the animation runs, which is why the two can coexist.
- //
- // Focus is now carried entirely by the border — 0.35 → 0.90 on the
- // same token, so the edge sharpens rather than changing colour —
- // and `transition` names border-color alone. Animating the shadow
- // as well meant two things moving at once for a single event; with
- // the elevation fixed, the composer stays put and only its outline
- // responds. `duration-200 ease-out` is the settle, and
- // `motion-reduce` drops it for anyone who asked the OS for less
- // motion — the cue still lands, just instantly.
- //
- // `border-ring` on drag is untouched — that state is meant to break
- // the pattern.
- className="border-content-faint/35 focus-within:border-content-faint/90 data-[dragging=true]:border-ring shadow-[0_8px_12px_-4px_rgb(0_0_0/0.09),0_30px_44px_-16px_rgb(0_0_0/0.12)] animate-composer-shadow motion-reduce:animate-none flex w-full cursor-text flex-col gap-2 rounded-(--composer-radius) border bg-(--composer-bg) p-(--composer-padding) transition-[border-color] duration-200 ease-out motion-reduce:transition-none data-[dragging=true]:border-dashed data-[dragging=true]:bg-[color-mix(in_oklab,var(--color-accent)_50%,var(--color-background))]">
+ className="border-foreground/10 focus-within:border-foreground/25 data-[dragging=true]:border-ring flex w-full cursor-text flex-col gap-2 rounded-(--composer-radius) border bg-(--composer-bg) p-(--composer-padding) transition-[border-color] data-[dragging=true]:border-dashed data-[dragging=true]:bg-[color-mix(in_oklab,var(--color-accent)_50%,var(--color-background))]">
{/* Renders only while a quote is set; dismissing it clears the quote. */}
<ComposerQuotePreview />
{HostComposerAttachments ? <HostComposerAttachments /> : <ComposerAttachments />}
@@ -903,7 +841,7 @@ const ComposerAction: FC<{
!!ComposerIdleAction && composerText.trim().length === 0 && !hasComposerAttachments;
return (
<div className="aui-composer-action-wrapper relative flex items-center justify-between">
- <div className="flex min-w-0 items-center gap-1">
+ <div className="flex items-center gap-1.5">
{HostComposerAddAttachment ? <HostComposerAddAttachment /> : <ComposerAddAttachment />}
<ChatSettingsPanel model={model} onModelChange={onModelChange} />
<ComposerExtrasSlot />
@@ -943,7 +881,7 @@ const ComposerAction: FC<{
type="button"
variant="ghost"
size="icon"
- className="aui-composer-dictate text-muted-foreground hover:text-foreground size-7 rounded-full"
+ className="aui-composer-dictate text-destructive size-7 rounded-full"
aria-label={t('assistantUi.thread.startVoiceInput', 'Start voice input')}>
<MicIcon className="aui-composer-dictate-icon size-4" />
</TooltipIconButton>
@@ -957,7 +895,7 @@ const ComposerAction: FC<{
type="button"
variant="ghost"
size="icon"
- className="aui-composer-stop-dictation text-destructive size-7 rounded-full"
+ className="aui-composer-stop-dictation size-7 rounded-full"
aria-label={t('assistantUi.thread.stopVoiceInput', 'Stop voice input')}>
<SquareIcon className="aui-composer-stop-dictation-icon size-3.5 animate-pulse fill-current" />
</TooltipIconButton>
@@ -1215,7 +1153,7 @@ const AssistantMessage: FC = () => {
data-slot="aui_assistant-message-root"
data-role="assistant"
data-testid="agent-message"
- className="fade-in slide-in-from-bottom-1 animate-in relative -mb-7.5 pb-7.5 duration-150">
+ className="fade-in slide-in-from-bottom-1 animate-in relative -mb-7.5 pb-7.5 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto]">
{/*
* One vertical rhythm for the whole message, rather than each part
* bringing its own margin. Measured before this change the gaps ran
@@ -1232,7 +1170,7 @@ const AssistantMessage: FC = () => {
*/}
<div
data-slot="aui_assistant-message-content"
- className="text-foreground [&>*+*]:mt-3 [&_[data-slot=reasoning-root]]:mb-0 px-2 leading-relaxed wrap-break-word">
+ className="text-foreground px-2 leading-relaxed wrap-break-word">
<MessagePrimitive.GroupedParts
groupBy={groupPartByType({
reasoning: ['group-activity'],
@@ -1362,7 +1300,7 @@ const AssistantActionBar: FC = () => {
<TooltipIconButton
tooltip={t('chat.message.goodResponse')}
data-testid="assistant-feedback-positive"
- className="data-[submitted=true]:text-primary-600 dark:data-[submitted=true]:text-primary-400">
+ className="data-[submitted=true]:bg-accent data-[submitted=true]:text-accent-foreground">
<ThumbsUpIcon />
</TooltipIconButton>
</ActionBarPrimitive.FeedbackPositive>
@@ -1370,7 +1308,7 @@ const AssistantActionBar: FC = () => {
<TooltipIconButton
tooltip={t('chat.message.badResponse')}
data-testid="assistant-feedback-negative"
- className="data-[submitted=true]:text-coral-600 dark:data-[submitted=true]:text-coral-400">
+ className="data-[submitted=true]:bg-accent data-[submitted=true]:text-accent-foreground">
<ThumbsDownIcon />
</TooltipIconButton>
</ActionBarPrimitive.FeedbackNegative>
@@ -1411,9 +1349,9 @@ const AssistantActionBar: FC = () => {
side="bottom"
align="start"
sideOffset={6}
- className="aui-action-bar-more-content bg-popover text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-xl border p-1.5">
+ className="aui-action-bar-more-content bg-popover text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-xl border p-1.5">
<ActionBarPrimitive.ExportMarkdown asChild>
- <ActionBarMorePrimitive.Item className="aui-action-bar-more-item hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-hidden select-none">
+ <ActionBarMorePrimitive.Item className="aui-action-bar-more-item hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none">
<DownloadIcon className="size-4" />
{t('assistantUi.thread.exportAsMarkdown', 'Export as Markdown')}
</ActionBarMorePrimitive.Item>
@@ -1479,12 +1417,12 @@ const UserMessage: FC = () => {
return (
<MessagePrimitive.Root
data-slot="aui_user-message-root"
- className="fade-in slide-in-from-bottom-1 animate-in grid auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] content-start gap-y-2 px-2 duration-150 [&:where(>*)]:col-start-2"
+ className="fade-in slide-in-from-bottom-1 animate-in grid auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] content-start gap-y-2 px-2 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto] [&:where(>*)]:col-start-2"
data-role="user">
<UserMessageAttachments />
<div className="aui-user-message-content-wrapper relative col-start-2 min-w-0">
- <div className="aui-user-message-content peer bg-muted text-foreground rounded-xl px-4 py-2 wrap-break-word empty:hidden">
+ <div className="aui-user-message-content peer bg-muted text-foreground rounded-(--composer-radius) px-4 py-2 wrap-break-word empty:hidden">
{/* `Text: DirectiveText` because the composer can put directive syntax
into a user message without anyone opting in. The `/` popover is
built from `unstable_useSlashCommandAdapter`, which returns an
@@ -1499,14 +1437,14 @@ const UserMessage: FC = () => {
components={{ Text: DirectiveText, File: UserFilePart, Image: UserImagePart }}
/>
</div>
- <div className="aui-user-action-bar-wrapper absolute inset-s-0 top-1/2 -translate-x-full -translate-y-1/2 pe-2 peer-empty:hidden rtl:translate-x-full">
+ <div className="aui-user-action-bar-wrapper absolute start-0 top-1/2 -translate-x-full -translate-y-1/2 pe-2 peer-empty:hidden rtl:translate-x-full">
<UserActionBar />
</div>
</div>
<BranchPicker
data-slot="aui_user-branch-picker"
- className="col-span-full col-start-1 row-start-3 -me-1 justify-end"
+ className="col-span-full col-start-1 -me-1 justify-end"
/>
</MessagePrimitive.Root>
);
@@ -1567,7 +1505,7 @@ const EditComposer: FC = () => {
const { t } = useT();
const discardedReplies = useAuiState(selectDiscardedReplies);
return (
- <MessagePrimitive.Root data-slot="aui_edit-composer-wrapper" className="flex flex-col px-2">
+ <MessagePrimitive.Root data-slot="aui_edit-composer-wrapper" className="flex flex-col px-2 [contain-intrinsic-size:auto_200px] [content-visibility:auto]">
<ComposerPrimitive.Root
data-slot="edit-message"
className="bg-background border-border/60 ms-auto flex w-full flex-col gap-3 rounded-2xl border p-3.5">
@@ -1575,10 +1513,10 @@ const EditComposer: FC = () => {
rows={2}
autoFocus
aria-label={t('conversations.assistantUi.edit.ariaLabel')}
- className="bg-foreground/[0.04] text-foreground/90 min-h-16 resize-none rounded-xl px-3 py-2.5 text-sm leading-relaxed outline-none focus-visible:ring-1 focus-visible:ring-ring"
+ className="text-foreground min-h-14 w-full resize-none bg-transparent px-4 pt-3 pb-1 text-base outline-none"
/>
{discardedReplies > 0 && (
- <div className="flex items-center gap-2 text-amber-700 dark:text-amber-400">
+ <div className="mx-2.5 mb-2.5 flex items-center gap-1.5 self-end">
<AlertTriangleIcon aria-hidden className="size-3.5 shrink-0" />
<span className="font-mono text-[11px] tabular-nums">
{t(
@@ -1591,12 +1529,12 @@ const EditComposer: FC = () => {
)}
<div className="flex items-center justify-end gap-2">
<ComposerPrimitive.Cancel asChild>
- <Button variant="ghost" size="sm" className="rounded-full">
+ <Button variant="ghost" size="sm" className="h-8 px-3">
{t('common.cancel')}
</Button>
</ComposerPrimitive.Cancel>
<ComposerPrimitive.Send asChild>
- <Button size="sm" className="rounded-full">
+ <Button size="sm" className="h-8 px-3">
{t('chat.elicitation.send')}
</Button>
</ComposerPrimitive.Send>
diff --git a/app/src/components/layout/shell/AppSidebar.tsx b/app/src/components/layout/shell/AppSidebar.tsx
index 6fc4a0b44c..ea532b3c8a 100644
--- a/app/src/components/layout/shell/AppSidebar.tsx
+++ b/app/src/components/layout/shell/AppSidebar.tsx
@@ -1,7 +1,6 @@
import debugFactory from 'debug';
import { useEffect } from 'react';
import { LuPanelLeftOpen } from 'react-icons/lu';
-import { useLocation } from 'react-router-dom';
import { useT } from '../../../lib/i18n/I18nContext';
import {
@@ -19,29 +18,6 @@ import { isWindowsDesktop } from './WindowsWindowControls';
const log = debugFactory('sidebar');
-/**
- * Routes whose projected sidebar region is hidden behind an `opacity-0`
- * separator rather than a visible one.
- *
- * Hidden, not removed: the separator's `my-*` is the ONLY gap between the nav
- * group above and the projected region below (both give up their own padding —
- * see `SidebarNav` and `ThreadList`), so unmounting it would collapse the two
- * lists together. `opacity-0` keeps the box, and with it the spacing.
- *
- * Chat is the case that wanted it: its region opens with an outlined "new
- * conversation" button, so a rule directly above a box that already draws its
- * own top edge put two horizontal lines within a few pixels of each other.
- * Regions that open with a plain list still want the divider.
- */
-const ROUTES_WITHOUT_SIDEBAR_SEPARATOR = ['/chat'];
-
-/** True when the current route's projected region draws its own top edge. */
-function hidesSidebarSeparator(pathname: string): boolean {
- return ROUTES_WITHOUT_SIDEBAR_SEPARATOR.some(
- route => pathname === route || pathname.startsWith(`${route}/`)
- );
-}
-
/**
* The root-shell sidebar. Mounted as the sole child of `RootShellLayout`'s
* `<Sidebar collapsible="icon">` column, so it renders one of two bodies
@@ -75,8 +51,6 @@ function hidesSidebarSeparator(pathname: string): boolean {
*/
export default function AppSidebar() {
const { t } = useT();
- const { pathname } = useLocation();
- const separatorHidden = hidesSidebarSeparator(pathname);
const { state: sidebarState } = useSidebar();
const collapsed = sidebarState === 'collapsed';
@@ -145,31 +119,9 @@ export default function AppSidebar() {
<div className="flex h-full min-h-0 flex-col">
<SidebarHeader />
<SidebarNav />
- {/* Closes the primary-nav group off from whatever a route projects below
- it. The region comment above notes that spacing alone separated these
- bands; that held while the only thing under the nav was more spacing,
- but the projected region is a titled, scrolling list of its own, and
- two adjacent groups of rows with nothing between them read as one long
- list whose headings arrive at random.
-
- `content-faint/40` rather than `line-subtle` (the primitive's default,
- stone-100), which washes out entirely on a light themed chrome — the
- sidebar has no fill of its own, so this hairline is drawn on the
- window chrome rather than inside a panel, and it has to hold up
- against whatever the theme puts there. /40 is twice the /20 this
- started at, which was faint enough to disappear.
-
- The separator owns the ENTIRE gap between the two lists: the nav
- group's `pb-0` and the projected region's `pt-0` both give up their
- padding. Regular regions use `my-2.5`; chat uses `my-2` while the rule
- is hidden, matching the thread list's 8px gap below New Conversation.
-
- `mx-3` lines its ends up with the nav rows' own inset rather than the
- primitive's narrower `mx-2`. */}
<SidebarSeparator
- aria-hidden={separatorHidden || undefined}
data-testid="sidebar-nav-separator"
- className={`mx-3 bg-content-faint/40 ${separatorHidden ? 'my-2 opacity-0' : 'my-2.5'}`}
+ className="mx-3 my-2.5 bg-content-faint/40"
/>
<SidebarScrollRegion className="gap-0">
{/* Flex column so routes that project more than one region can order
diff --git a/app/src/features/conversations/aui/PinnedTodoCard.tsx b/app/src/features/conversations/aui/PinnedTodoCard.tsx
index 7c862e55c1..42f1b62658 100644
--- a/app/src/features/conversations/aui/PinnedTodoCard.tsx
+++ b/app/src/features/conversations/aui/PinnedTodoCard.tsx
@@ -1,148 +1,24 @@
-/**
- * The thread's live steps pinned above the composer using assistant-ui's
- * AgentPlan, in a disclosure that remembers the user's choice.
- *
- * Open by default while a step is in progress and collapsed otherwise, until
- * the user opens or closes it by hand: that choice is remembered per thread in
- * `userScopedStorage` and wins from then on.
- */
-import debugFactory from 'debug';
-import { ChevronRightIcon, ListChecksIcon } from 'lucide-react';
-import { useCallback, useEffect, useState } from 'react';
-
+/** Maps the live harness steps onto the upstream AgentPlan presentation. */
import { AgentPlan } from '../../../components/assistant-ui/elements/agent-plan';
import { type TodoItem, todoProgress } from '../../../components/assistant-ui/elements/todo-list';
-import { cn } from '../../../components/assistant-ui/lib/utils';
-import { Button } from '../../../components/assistant-ui/ui/button';
-import {
- Collapsible,
- CollapsibleContent,
- CollapsibleTrigger,
-} from '../../../components/assistant-ui/ui/collapsible';
import { useT } from '../../../lib/i18n/I18nContext';
-import { userScopedStorage } from '../../../store/userScopedStorage';
-
-const debug = debugFactory('conversations:todos');
-
-/** `userScopedStorage` key holding `{ [threadId]: open }`. */
-export const TODO_CARD_OPEN_KEY = 'chat.todoCardOpen';
-/** How many threads' choices are kept; the oldest are dropped first. */
-const MAX_REMEMBERED = 50;
-
-type OpenMap = Record<string, boolean>;
-
-async function readOpenMap(): Promise<OpenMap> {
- try {
- const raw = await userScopedStorage.getItem(TODO_CARD_OPEN_KEY);
- const parsed: unknown = raw ? JSON.parse(raw) : {};
- return parsed && typeof parsed === 'object' ? (parsed as OpenMap) : {};
- } catch {
- return {};
- }
-}
-
-async function rememberOpen(threadId: string, open: boolean): Promise<void> {
- const map = await readOpenMap();
- delete map[threadId];
- map[threadId] = open;
- const keys = Object.keys(map);
- for (const stale of keys.slice(0, Math.max(0, keys.length - MAX_REMEMBERED))) {
- delete map[stale];
- }
- await userScopedStorage.setItem(TODO_CARD_OPEN_KEY, JSON.stringify(map));
-}
-
-/** The card's open state: the user's remembered choice, else open while a step runs. */
-export function useTodoCardOpen(
- threadId: string,
- anyActive: boolean
-): [boolean, (open: boolean) => void] {
- const [remembered, setRemembered] = useState<{ threadId: string; open: boolean } | null>(null);
-
- useEffect(() => {
- let cancelled = false;
- void readOpenMap().then(map => {
- if (cancelled) return;
- const open = map[threadId];
- setRemembered(typeof open === 'boolean' ? { threadId, open } : null);
- });
- return () => {
- cancelled = true;
- };
- }, [threadId]);
-
- const setOpen = useCallback(
- (open: boolean) => {
- setRemembered({ threadId, open });
- debug('todo card %s thread=%s', open ? 'opened' : 'closed', threadId);
- void rememberOpen(threadId, open);
- },
- [threadId]
- );
-
- const choice = remembered?.threadId === threadId ? remembered.open : undefined;
- return [choice ?? anyActive, setOpen];
-}
-export function PinnedTodoCard({
- threadId,
- items,
- className,
-}: {
- threadId: string;
- items: readonly TodoItem[];
- className?: string;
-}) {
+export function PinnedTodoCard({ threadId, items, className }: { threadId: string; items: readonly TodoItem[]; className?: string }) {
const { t } = useT();
const progress = todoProgress(items);
- const [open, setOpen] = useTodoCardOpen(threadId, progress.anyActive);
- const countLabel = t('chat.todos.ofTotal')
- .replace('{done}', String(progress.done))
- .replace('{total}', String(progress.total));
return (
- <Collapsible open={open} onOpenChange={setOpen} asChild>
- <div
- data-testid="todo-checklist"
- data-open={open ? 'true' : 'false'}
- data-todo-completed={progress.done}
- data-todo-total={progress.total}
- className={cn('bg-background flex w-full flex-col gap-1 rounded-lg px-2 py-1', className)}>
- <CollapsibleTrigger asChild>
- <Button
- variant="ghost"
- size="sm"
- aria-label={t('conversations.runMode.plan')}
- className="h-auto w-full justify-start gap-2 px-0 py-1 text-xs">
- <ListChecksIcon aria-hidden className="text-muted-foreground size-3.5" />
- <span className="flex-1 text-start">{t('conversations.runMode.plan')}</span>
- <span className="text-muted-foreground font-mono text-[11px]">
- {progress.allDone ? t('chat.todos.completed') : countLabel}
- </span>
- <ChevronRightIcon
- aria-hidden
- className={cn('size-3 transition-transform', open && 'rotate-90')}
- />
- </Button>
- </CollapsibleTrigger>
- <CollapsibleContent forceMount asChild>
- <div hidden={!open} className="max-h-[min(160px,24dvh)] overflow-y-auto pb-1">
- <AgentPlan
- steps={items.map(item =>
- item.reason && item.status === 'failed'
- ? `${item.text} — ${item.reason}`
- : item.text
- )}
- statuses={items.map(item => item.status)}
- activeIndex={progress.done}
- compact
- showHeader={false}
- stepTestId="todo-item"
- className="max-w-none"
- />
- </div>
- </CollapsibleContent>
- </div>
- </Collapsible>
+ <AgentPlan
+ data-testid="todo-checklist"
+ data-thread-id={threadId}
+ data-todo-completed={progress.done}
+ data-todo-total={progress.total}
+ title={t('conversations.runMode.plan')}
+ steps={items.map(item => ({ id: item.id, label: item.reason && item.status === 'failed' ? `${item.text} — ${item.reason}` : item.text }))}
+ statuses={items.map(item => item.status)}
+ activeIndex={progress.done}
+ stepTestId="todo-item"
+ className={className}
+ />
);
}
diff --git a/app/src/features/conversations/threadList/ThreadList.tsx b/app/src/features/conversations/threadList/ThreadList.tsx
index e7c367a3d5..159d47ff23 100644
--- a/app/src/features/conversations/threadList/ThreadList.tsx
+++ b/app/src/features/conversations/threadList/ThreadList.tsx
@@ -2,7 +2,6 @@ import {
ThreadListItem,
ThreadListNew,
ThreadListRoot,
- ThreadListSearch,
} from '@/components/assistant-ui/thread-list';
import {
AssistantRuntimeProvider,
@@ -142,13 +141,10 @@ export function ThreadList(props: ThreadListProps) {
function ThreadListView() {
const props = useContext(ThreadListHostContext)!;
const { t } = useT();
- const [search, setSearch] = useState('');
const threadIds = useAuiState(s => s.threads.threadIds);
const filtered = threadIds.flatMap(id => {
const thread = props.threads.find(item => item.id === id);
- return thread && props.resolveTitle(id).toLowerCase().includes(search.trim().toLowerCase())
- ? [thread]
- : [];
+ return thread ? [thread] : [];
});
const groups = groupThreads(filtered, new Date(), props.isPinned ?? isThreadPinned);
return (
@@ -188,7 +184,7 @@ function ThreadListView() {
))}
{groups.length === 0 && (
<p className="text-muted-foreground px-2.5 py-4 text-center text-xs">
- {t(search ? 'assistantUi.threadList.noThreadsFound' : 'chat.noThreads')}
+ {t('chat.noThreads')}
</p>
)}
</div>
diff --git a/app/src/index.css b/app/src/index.css
index b7e1eaa739..12e8b0ef71 100644
--- a/app/src/index.css
+++ b/app/src/index.css
@@ -299,10 +299,6 @@
--animate-float: float 3s ease-in-out infinite;
--animate-ticker: ticker 30s linear infinite;
--animate-wiggle: wiggle 0.5s ease-in-out;
- /* The composer's ambient shadow orbit — see the `composerShadowOrbit`
- keyframes below. `linear`, not an ease: the offset traces a circle, and an
- ease would make the light appear to speed up and stall twice per lap. */
- --animate-composer-shadow: composerShadowOrbit 18s linear infinite;
/* Same clockwise light model as the composer, reduced for the much larger
sidebar surface so it reads as quiet separation rather than a glow. */
--animate-sidebar-shadow: sidebarShadowOrbit 24s linear infinite;
@@ -420,76 +416,7 @@
opacity: 0.5;
}
}
- /* Orbits the composer's shadow clockwise, as though the light above it
- circles the room. Deliberately slow (18s a lap) and small: the point is
- that you never catch it moving, only notice the composer feels lit rather
- than stamped on.
- The offset traces a CIRCLE, so both x and y move — that is the difference
- between this and a sideways drift. Each layer orbits a centre that stays
- below the box (y=8 near, y=30 far) with a radius smaller than that centre
- (4 and 8), so the shadow swings but never rises above the composer, which
- would read as light from underneath.
-
- Eight stops, not four. Four corners interpolate as a diamond — the shadow
- visibly tracks straight lines and turns hard at the compass points. The
- 45-degree stops (x and y both at 0.707 of the radius) round it into an
- actual circle. Clockwise on screen: top, right, bottom, left, with y
- growing downward.
-
- The two layers orbit with different radii (4px near, 8px far) in phase.
- That is parallax — a shadow cast further moves more for the same change in
- light angle. Equal radii would read as one flat sheet swinging.
-
- Blur and spread are identical in every frame. Animating blur would pulse
- the shadow in and out of focus, which no light source does.
-
- Paired with `motion-reduce:animate-none` at the call site, which falls back
- to the static `shadow-[…]` utility beside it — so the composer keeps its
- elevation when motion is off, it just stops moving. */
- @keyframes composerShadowOrbit {
- 0%,
- 100% {
- box-shadow:
- 0 4px 12px -4px rgb(0 0 0 / 0.09),
- 0 22px 44px -16px rgb(0 0 0 / 0.12);
- }
- 12.5% {
- box-shadow:
- 3px 5px 12px -4px rgb(0 0 0 / 0.09),
- 6px 24px 44px -16px rgb(0 0 0 / 0.12);
- }
- 25% {
- box-shadow:
- 4px 8px 12px -4px rgb(0 0 0 / 0.09),
- 8px 30px 44px -16px rgb(0 0 0 / 0.12);
- }
- 37.5% {
- box-shadow:
- 3px 11px 12px -4px rgb(0 0 0 / 0.09),
- 6px 36px 44px -16px rgb(0 0 0 / 0.12);
- }
- 50% {
- box-shadow:
- 0 12px 12px -4px rgb(0 0 0 / 0.09),
- 0 38px 44px -16px rgb(0 0 0 / 0.12);
- }
- 62.5% {
- box-shadow:
- -3px 11px 12px -4px rgb(0 0 0 / 0.09),
- -6px 36px 44px -16px rgb(0 0 0 / 0.12);
- }
- 75% {
- box-shadow:
- -4px 8px 12px -4px rgb(0 0 0 / 0.09),
- -8px 30px 44px -16px rgb(0 0 0 / 0.12);
- }
- 87.5% {
- box-shadow:
- -3px 5px 12px -4px rgb(0 0 0 / 0.09),
- -6px 24px 44px -16px rgb(0 0 0 / 0.12);
- }
- }
@keyframes sidebarShadowOrbit {
0%,
100% {
@@ -976,21 +903,3 @@
--cmd-shadow-palette: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.25);
}
-/* Composer cards share the input's width, including cards inside decks.
- Keep these overrides local: gallery cards and popovers retain their sizing. */
-.chat-composer-surfaces > *,
-.aui-thread-root :is([data-slot='task-card'], [data-slot='subagent-list']),
-.chat-composer-surfaces
- :is(
- [data-slot='approval-card'],
- [data-slot='elicitation-form'],
- [data-slot='artifact-card'],
- [data-slot='task-card'],
- [data-slot='subagent-list'],
- [data-slot='background-inbox'],
- [data-testid='plan-review-card']
- ) {
- width: 100%;
- max-width: none;
- min-width: 0;
-}