void handleTabContextMenu(event, surface)}
className={cn(
"group flex h-7 min-w-25 max-w-44 shrink-0 items-center gap-1.5 rounded-md px-2 text-sm",
active
diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx
index df9bbbda09..7294b6ed03 100644
--- a/apps/web/src/components/chat/ChatComposer.tsx
+++ b/apps/web/src/components/chat/ChatComposer.tsx
@@ -60,6 +60,7 @@ import {
import { useComposerPathSearch } from "../../lib/composerPathSearchState";
import { type ElementContextDraft } from "../../lib/elementContext";
import { ComposerPendingElementContexts } from "./ComposerPendingElementContexts";
+import { ComposerPendingReviewComments } from "./ComposerPendingReviewComments";
import { ComposerPreviewAnnotationCards } from "./ComposerPreviewAnnotationCards";
import {
shouldUseCompactComposerPrimaryActions,
@@ -121,6 +122,7 @@ import {
import { formatProviderSkillDisplayName } from "../../providerSkillPresentation";
import { searchProviderSkills } from "../../providerSkillSearch";
import { useMediaQuery } from "../../hooks/useMediaQuery";
+import type { ReviewCommentContext } from "../../reviewCommentContext";
const IMAGE_SIZE_LIMIT_LABEL = `${Math.round(PROVIDER_SEND_TURN_MAX_IMAGE_BYTES / (1024 * 1024))}MB`;
@@ -410,6 +412,7 @@ export interface ChatComposerHandle {
terminalContexts: TerminalContextDraft[];
elementContexts: ElementContextDraft[];
previewAnnotations: PreviewAnnotationPayload[];
+ reviewComments: ReviewCommentContext[];
selectedPromptEffort: string | null;
selectedModelOptionsForDispatch: unknown;
selectedModelSelection: ModelSelection;
@@ -619,6 +622,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
const composerTerminalContexts = composerDraft.terminalContexts;
const composerElementContexts = composerDraft.elementContexts;
const composerPreviewAnnotations = composerDraft.previewAnnotations;
+ const composerReviewComments = composerDraft.reviewComments;
const nonPersistedComposerImageIds = composerDraft.nonPersistedImageIds;
const setComposerDraftPrompt = useComposerDraftStore((store) => store.setPrompt);
@@ -640,6 +644,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
const removeComposerDraftPreviewAnnotation = useComposerDraftStore(
(store) => store.removePreviewAnnotation,
);
+ const removeComposerDraftReviewComment = useComposerDraftStore(
+ (store) => store.removeReviewComment,
+ );
const clearComposerDraftPersistedAttachments = useComposerDraftStore(
(store) => store.clearPersistedAttachments,
);
@@ -900,12 +907,16 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
prompt,
imageCount: composerImages.length,
terminalContexts: composerTerminalContexts,
- elementContextCount: composerElementContexts.length + composerPreviewAnnotations.length,
+ elementContextCount:
+ composerElementContexts.length +
+ composerPreviewAnnotations.length +
+ composerReviewComments.length,
}),
[
composerElementContexts.length,
composerImages.length,
composerPreviewAnnotations.length,
+ composerReviewComments.length,
composerTerminalContexts,
prompt,
],
@@ -2002,6 +2013,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
terminalContexts: composerTerminalContextsRef.current,
elementContexts: composerElementContextsRef.current,
previewAnnotations: composerPreviewAnnotations,
+ reviewComments: composerReviewComments,
selectedPromptEffort,
selectedModelOptionsForDispatch,
selectedModelSelection,
@@ -2021,6 +2033,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
composerTerminalContextsRef,
composerElementContextsRef,
composerPreviewAnnotations,
+ composerReviewComments,
isConnecting,
isComposerApprovalState,
pendingUserInputs.length,
@@ -2276,6 +2289,19 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
/>
)}
+ {!isComposerCollapsedMobile &&
+ !isComposerApprovalState &&
+ pendingUserInputs.length === 0 &&
+ composerReviewComments.length > 0 && (
+
+ removeComposerDraftReviewComment(composerDraftTarget, commentId)
+ }
+ className="mb-3"
+ />
+ )}
+
{!isComposerCollapsedMobile &&
!isComposerApprovalState &&
pendingUserInputs.length === 0 &&
diff --git a/apps/web/src/components/chat/ComposerPendingReviewComments.browser.tsx b/apps/web/src/components/chat/ComposerPendingReviewComments.browser.tsx
new file mode 100644
index 0000000000..a5aa6e224e
--- /dev/null
+++ b/apps/web/src/components/chat/ComposerPendingReviewComments.browser.tsx
@@ -0,0 +1,41 @@
+import "../../index.css";
+
+import { afterEach, describe, expect, it, vi } from "vite-plus/test";
+import { page } from "vite-plus/test/browser";
+import { render } from "vitest-browser-react";
+
+import { ComposerPendingReviewComments } from "./ComposerPendingReviewComments";
+
+describe("ComposerPendingReviewComments", () => {
+ afterEach(() => {
+ document.body.innerHTML = "";
+ });
+
+ it("renders a removable file comment pill", async () => {
+ const onRemove = vi.fn();
+ const screen = await render(
+ ,
+ );
+
+ await expect.element(page.getByText("src/app.ts L2 to L3")).toBeVisible();
+ await page.getByRole("button", { name: "Remove comment on src/app.ts L2 to L3" }).click();
+ expect(onRemove).toHaveBeenCalledWith("comment-1");
+
+ await screen.unmount();
+ });
+});
diff --git a/apps/web/src/components/chat/ComposerPendingReviewComments.tsx b/apps/web/src/components/chat/ComposerPendingReviewComments.tsx
new file mode 100644
index 0000000000..0a47b02357
--- /dev/null
+++ b/apps/web/src/components/chat/ComposerPendingReviewComments.tsx
@@ -0,0 +1,60 @@
+import { MessageCircle, X } from "lucide-react";
+
+import {
+ COMPOSER_INLINE_CHIP_CLASS_NAME,
+ COMPOSER_INLINE_CHIP_DISMISS_BUTTON_CLASS_NAME,
+ COMPOSER_INLINE_CHIP_ICON_CLASS_NAME,
+ COMPOSER_INLINE_CHIP_LABEL_CLASS_NAME,
+} from "../composerInlineChip";
+import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
+import type { ReviewCommentContext } from "~/reviewCommentContext";
+import { cn } from "~/lib/utils";
+
+interface ComposerPendingReviewCommentsProps {
+ comments: ReadonlyArray;
+ onRemove: (commentId: string) => void;
+ className?: string;
+}
+
+export function ComposerPendingReviewComments({
+ comments,
+ onRemove,
+ className,
+}: ComposerPendingReviewCommentsProps) {
+ if (comments.length === 0) return null;
+
+ return (
+
+ {comments.map((comment) => {
+ const label = `${comment.filePath} ${comment.rangeLabel}`;
+ return (
+
+
+
+ {label}
+
+
+ }
+ />
+
+ {comment.text}
+
+
+ );
+ })}
+
+ );
+}
diff --git a/apps/web/src/components/chat/MessagesTimeline.test.tsx b/apps/web/src/components/chat/MessagesTimeline.test.tsx
index f1cf01d82b..3207876f70 100644
--- a/apps/web/src/components/chat/MessagesTimeline.test.tsx
+++ b/apps/web/src/components/chat/MessagesTimeline.test.tsx
@@ -300,6 +300,44 @@ describe("MessagesTimeline", () => {
expect(markup).not.toContain("</review_comment>");
});
+ it("renders file review comments as source code instead of diffs", async () => {
+ const { MessagesTimeline } = await import("./MessagesTimeline");
+ const markup = renderToStaticMarkup(
+ ',
+ "Clarify this.",
+ "```md",
+ "# Plan",
+ "- Step one",
+ "```",
+ "",
+ ].join("\n"),
+ turnId: null,
+ createdAt: "2026-03-17T19:12:28.000Z",
+ updatedAt: "2026-03-17T19:12:28.000Z",
+ streaming: false,
+ },
+ },
+ ]}
+ />,
+ );
+
+ expect(markup).toContain("plan.md");
+ expect(markup).toContain("Clarify this.");
+ expect(markup).toContain("# Plan");
+ expect(markup).not.toContain('data-testid="file-diff"');
+ });
+
it("renders a failure marker for failed tool lifecycle entries", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
const markup = renderToStaticMarkup(
diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx
index 515e32e0f3..b0d83be7b1 100644
--- a/apps/web/src/components/chat/MessagesTimeline.tsx
+++ b/apps/web/src/components/chat/MessagesTimeline.tsx
@@ -102,6 +102,7 @@ import { SkillInlineText } from "./SkillInlineText";
import { formatWorkspaceRelativePath } from "../../filePathDisplay";
import {
buildReviewCommentRenderablePatch,
+ formatReviewCommentFence,
parseReviewCommentMessageSegments,
type ReviewCommentContext,
} from "../../reviewCommentContext";
@@ -1264,6 +1265,7 @@ const UserMessageBody = memo(function UserMessageBody(props: {
function UserMessageReviewCommentCard({ comment }: { comment: ReviewCommentContext }) {
const ctx = use(TimelineRowCtx);
+ const fenceLanguage = comment.fenceLanguage ?? "diff";
const renderablePatch = getRenderablePatch(
buildReviewCommentRenderablePatch(comment),
`review-comment:${comment.id}`,
@@ -1284,6 +1286,15 @@ function UserMessageReviewCommentCard({ comment }: { comment: ReviewCommentConte
)}
+ {fenceLanguage !== "diff" && comment.diff.trim().length > 0 && (
+