diff --git a/apps/desktop/DESIGN.md b/apps/desktop/DESIGN.md index dae529dca90..e2f3614022a 100644 --- a/apps/desktop/DESIGN.md +++ b/apps/desktop/DESIGN.md @@ -91,10 +91,11 @@ for call-site shadow or border inventions. | Token | Use | | --- | --- | | `--ui-stroke-primary…quaternary` | hairlines, in descending strength | -| `--ui-stroke-tertiary` | the default in-panel divider / list hairline | +| `--ui-stroke-tertiary` | the default in-panel divider / list hairline — and every bordered surface in the transcript | | `--stroke-nous` | the overlay hairline (pairs with `shadow-nous`) | | `--ui-text-primary / -secondary / -tertiary` | text hierarchy | | `--ui-bg-quaternary` | soft control fill (secondary button) | +| `--ui-widget-surface-background` | fill for inline chat widgets (`WIDGET_SHELL_CLASS`) | | `--chrome-action-hover` | hover fill for quiet controls | | `--theme-primary`, `--ui-accent` | brand/accent | @@ -196,6 +197,14 @@ Notes: existing components under `src/components/assistant-ui` and `src/app/chat/composer`; do not fork a second markdown, message, tool-call, or approval renderer for one feature. +- **Inline widgets** — a tool result that renders as a panel the user reads or + acts on (clarify, artifact card) wears `WIDGET_SHELL_CLASS` + (`src/components/chat/widget-shell.ts`): shared radius, the + `--ui-widget-surface-background` fill, no border. Its actions sit *outside* + the panel, below it. Don't give one widget its own radius or fill. +- Bordered surfaces in the transcript (tables, fences, callouts, attachments) + use `--ui-stroke-tertiary`. Not `border-border` — that's the app-wide + default and reads too hot against the thread. - A tool result may expose an inline action that opens a preview. It must not open the rail automatically. - Install, onboarding, connecting, boot failure, and reauthentication are diff --git a/apps/desktop/src/components/assistant-ui/artifact-card.tsx b/apps/desktop/src/components/assistant-ui/artifact-card.tsx index feb9b06c951..e7fb043f6d5 100644 --- a/apps/desktop/src/components/assistant-ui/artifact-card.tsx +++ b/apps/desktop/src/components/assistant-ui/artifact-card.tsx @@ -5,6 +5,7 @@ import { useEffect, useMemo } from 'react' import { useSessionView } from '@/app/chat/session-view' import { CodeCardIcon } from '@/components/chat/code-card' +import { WIDGET_SHELL_CLASS } from '@/components/chat/widget-shell' import { useI18n } from '@/i18n' import type { ArtifactDetection } from '@/lib/artifact-detect' import { codiconForLanguage } from '@/lib/markdown-code' @@ -96,8 +97,9 @@ export function ArtifactCard({ code, detection, streaming = false }: ArtifactCar return ( - - - - +
+ + +
+ ) } diff --git a/apps/desktop/src/components/assistant-ui/directive-text.tsx b/apps/desktop/src/components/assistant-ui/directive-text.tsx index 418f59eda71..3c6e4df2760 100644 --- a/apps/desktop/src/components/assistant-ui/directive-text.tsx +++ b/apps/desktop/src/components/assistant-ui/directive-text.tsx @@ -418,7 +418,7 @@ export function DirectiveContent({ text }: { text: string }) { {images.map((src, index) => ( = ({ id, label }) => { return (
diff --git a/apps/desktop/src/components/assistant-ui/markdown-text.tsx b/apps/desktop/src/components/assistant-ui/markdown-text.tsx index f6a35b57647..cad8f0d7407 100644 --- a/apps/desktop/src/components/assistant-ui/markdown-text.tsx +++ b/apps/desktop/src/components/assistant-ui/markdown-text.tsx @@ -197,7 +197,7 @@ function MediaAttachment({ path }: { path: string }) { if (kind === 'audio' && src) { return ( - + {name}