The best way to control Claude Code, Codex and more from any computer or phone
fix(web): keep agent images collapsed (#9460)
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
maria committed
Sep 3, 2026 at 14:04 UTC
8bd544cdfd22aa38ab82bc1adc0b851755a299ef
1 file changed
+4
-3
apps/web/src/components/chat/MessagesTimeline.tsx
+4
-3
@@ -3049,16 +3049,17 @@ const PlainWorkEntryRow = memo(function PlainWorkEntryRow(props: {
3049
const previewText = displayLabel ?? workEntryDisplayLabel(workEntry, workspaceRoot);
3050
const displayText =
3051
!toolPresentation && expanded && workEntry.command?.trim() ? "Command" : previewText;
3052
+ const viewedImagePath = workEntryViewedImagePath(workEntry);
3053
const canExpand =
3054
(workEntry.itemType === "mcp_tool_call" && workEntry.toolData !== undefined) ||
3055
Boolean(
3056
workEntryRawCommand(workEntry) ||
3057
workEntry.command?.trim() ||
3058
workEntry.detail?.trim() ||
3058
- workEntry.changedFiles?.length,
3059
+ workEntry.changedFiles?.length ||
3060
+ viewedImagePath,
3061
);
3062
const expandedBody = expanded ? buildToolCallExpandedBody(workEntry, workspaceRoot) : null;
3061
- const viewedImagePath = workEntryViewedImagePath(workEntry);
3063
const viewedImage =
3064
viewedImagePath && threadRef
3065
? resolveViewedImageAsset(viewedImagePath, {
@@ -3159,7 +3160,7 @@ const PlainWorkEntryRow = memo(function PlainWorkEntryRow(props: {
3160
</span>
3161
</div>
3162
</div>
3162
- {viewedImage && threadRef ? (
3163
+ {expanded && viewedImage && threadRef ? (
3164
<div
3165
className="mt-1 ms-7 cursor-default"
3166
onClick={stopRowToggle}