@devries-cameron20 / t3code-1 / commits / f4d0855a50
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): PDF attachment chips no longer look like failed ones (#33805)

Julius Marminge committed Nov 16, 2026 at 12:48 UTC f4d0855a50d3baafdcc5b8955a382ac40ba29e07
2 files changed +6 -4
apps/web/src/components/ContextChip.tsx
+5 -3
@@ -6,7 +6,7 @@ import type * as React from "react";
6 import { cn } from "~/lib/utils";
7
8 const contextChipVariants = cva(
9 - "inline-flex max-w-full items-center gap-[0.2em] font-medium leading-[normal] text-(--context-chip-ink) [--context-chip-ink:var(--context-chip-accent)] [--document-icon-stroke:var(--context-chip-ink)] [&_svg]:block [&_svg]:size-[1em] [&_svg]:shrink-0 [&_svg]:self-center [button&,a&,[data-popup-open]&]:cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-current rounded-sm disabled:cursor-default",
9 + "inline-flex max-w-full items-center gap-[0.2em] font-medium leading-[normal] text-(--context-chip-ink) [--context-chip-ink:var(--context-chip-message-ink,var(--context-chip-accent))] [--document-icon-stroke:var(--context-chip-ink)] [&_svg]:block [&_svg]:size-[1em] [&_svg]:shrink-0 [&_svg]:self-center [button&,a&,[data-popup-open]&]:cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-current rounded-sm disabled:cursor-default",
10 {
11 defaultVariants: { kind: "neutral" },
12 variants: {
@@ -30,7 +30,9 @@ const contextChipVariants = cva(
30 thread: "[--context-chip-accent:var(--context-chip-thread)]",
31 environment: "[--context-chip-accent:var(--context-chip-environment)]",
32 citation: "[--context-chip-accent:var(--context-chip-citation)]",
33 - "doc-pdf": "[--context-chip-accent:var(--context-chip-doc-pdf)]",
33 + // PDF red reads as the invalid state, so only the icon carries it.
34 + "doc-pdf":
35 + "[--context-chip-accent:var(--context-chip-doc-pdf)] [--context-chip-ink:var(--context-chip-message-ink,currentColor)] [--document-icon-stroke:var(--context-chip-message-ink,var(--context-chip-accent))]",
36 "doc-word": "[--context-chip-accent:var(--context-chip-doc-word)]",
37 "doc-spreadsheet": "[--context-chip-accent:var(--context-chip-doc-spreadsheet)]",
38 "doc-slides": "[--context-chip-accent:var(--context-chip-doc-slides)]",
@@ -43,7 +45,7 @@ const contextChipVariants = cva(
45 state: {
46 unresolved: "data-[state=unresolved]:[--context-chip-accent:currentColor]",
47 invalid:
46 - "data-[state=invalid]:[--context-chip-accent:var(--context-chip-invalid,var(--destructive-foreground))]",
48 + "data-[state=invalid]:[--context-chip-accent:var(--context-chip-invalid,var(--destructive-foreground))] data-[state=invalid]:[--context-chip-ink:var(--context-chip-message-ink,var(--context-chip-accent))]",
49 },
50 },
51 },
apps/web/src/components/chat/TimelineUserMessageRow.tsx
+1 -1
@@ -102,7 +102,7 @@ const MEDIA_EDGE_CLASS_NAME =
102 "relative after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:ring-1 after:ring-inset after:ring-black/9 dark:after:ring-white/12";
103
104 const BUBBLE_CHIP_CLASS_NAME =
105 - "[&_[data-slot=context-chip]]:[--context-chip-ink:var(--context-chip-message,var(--context-chip-accent))]";
105 + "[&_[data-slot=context-chip]]:[--context-chip-message-ink:var(--context-chip-message)]";
106
107 function UserFileCard({
108 file,