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

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

fix(web): queued message preview keeps inline image labels in place (#33405)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Ragul Sundaram committed Nov 13, 2026 at 02:38 UTC c0df40aa545620064789bd26b624e93cd6350c2a
2 files changed +20 -3
apps/web/src/components/chat/QueuedRunsControl.browser.test.tsx
+19
@@ -1,5 +1,9 @@
1 import { EnvironmentId, MessageId, ThreadId } from "@t3tools/contracts";
2 import { serializeAssistantCitation } from "@t3tools/shared/assistantCitations";
3 +import {
4 + formatComposerContextReference,
5 + toComposerContextId,
6 +} from "@t3tools/shared/composerContextReferences";
7 import * as DateTime from "effect/DateTime";
8 import type { ComponentProps } from "react";
9 import { expect, it, vi } from "vite-plus/test";
@@ -89,6 +93,11 @@ it("previews assistant quotes as readable text and preserves the citation when e
93 suffix: "",
94 });
95 const quoteAndText = `${quote}\n\nWhy per worktree?`;
96 + const inlineImage = formatComposerContextReference({
97 + kind: "image",
98 + contextId: toComposerContextId("header"),
99 + label: "header.png",
100 + });
101 state.projection = { projection: { messages: [] } };
102 state.workflow = {
103 activeRun: { id: "run:active" },
@@ -104,6 +113,11 @@ it("previews assistant quotes as readable text and preserves the citation when e
113 text: quoteAndText,
114 attachments: [],
115 },
116 + {
117 + run: { id: "run:inline-image", userMessageId: "message:inline-image" },
118 + text: `Make the header look like ${inlineImage} and keep the logo.`,
119 + attachments: [{ type: "image", id: "attachment:header", name: "header.png" }],
120 + },
121 ],
122 };
123 const onEditQueuedRun = vi.fn();
@@ -113,6 +127,11 @@ it("previews assistant quotes as readable text and preserves the citation when e
127 await expect
128 .element(page.getByText(`${quotedText} Why per worktree?`, { exact: true }))
129 .toBeVisible();
130 + await expect
131 + .element(
132 + page.getByText("Make the header look like header.png and keep the logo.", { exact: true }),
133 + )
134 + .toBeVisible();
135
136 await page.getByRole("button", { name: "Edit queued message", exact: true }).nth(1).click();
137 expect(onEditQueuedRun).toHaveBeenCalledExactlyOnceWith(
apps/web/src/components/chat/QueuedRunsControl.tsx
+1 -3
@@ -253,9 +253,7 @@ export function QueuedRunsControl({
253 const previewText = isAttachmentOnlyBootstrapPrompt(item.text)
254 ? ""
255 : assistantCitationsToPlainText(
256 - replaceComposerContextReferences(item.text, (reference) =>
257 - reference.kind === "image" && item.thumbnails.length > 0 ? "" : reference.label,
258 - ),
256 + replaceComposerContextReferences(item.text, (reference) => reference.label),
257 ).trim();
258 const isEditing = item.runId !== null && item.runId === props.editingRunId;
259 return (