authorgravatar for maria@kuuro.netmaria <maria@kuuro.net> 2026-09-03 14:04:10-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-03 14:04:10-04:00
log8bd544cdfd22aa38ab82bc1adc0b851755a299ef
treea6b48f125564acf547b6a7be6b1e1a464c2179cc
parentc78f05a45e1c2b274d8b0ab2b4d2d88b4767c968
signature Signed by PGP key B5690EEEBB952194

fix(web): keep agent images collapsed (#9460)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>

1 files changed, 4 insertions(+), 3 deletions(-)

apps/web/src/components/chat/MessagesTimeline.tsx+4-3
...@@ -3049,16 +3049,17 @@ const PlainWorkEntryRow = memo(function PlainWorkEntryRow(props: {...@@ -3049,16 +3049,17 @@ const PlainWorkEntryRow = memo(function PlainWorkEntryRow(props: {
3049 const previewText = displayLabel ?? workEntryDisplayLabel(workEntry, workspaceRoot);3049 const previewText = displayLabel ?? workEntryDisplayLabel(workEntry, workspaceRoot);
3050 const displayText =3050 const displayText =
3051 !toolPresentation && expanded && workEntry.command?.trim() ? "Command" : previewText;3051 !toolPresentation && expanded && workEntry.command?.trim() ? "Command" : previewText;
3052 const viewedImagePath = workEntryViewedImagePath(workEntry);
3052 const canExpand =3053 const canExpand =
3053 (workEntry.itemType === "mcp_tool_call" && workEntry.toolData !== undefined) ||3054 (workEntry.itemType === "mcp_tool_call" && workEntry.toolData !== undefined) ||
3054 Boolean(3055 Boolean(
3055 workEntryRawCommand(workEntry) ||3056 workEntryRawCommand(workEntry) ||
3056 workEntry.command?.trim() ||3057 workEntry.command?.trim() ||
3057 workEntry.detail?.trim() ||3058 workEntry.detail?.trim() ||
3058 workEntry.changedFiles?.length,3059 workEntry.changedFiles?.length ||
3060 viewedImagePath,
3059 );3061 );
3060 const expandedBody = expanded ? buildToolCallExpandedBody(workEntry, workspaceRoot) : null;3062 const expandedBody = expanded ? buildToolCallExpandedBody(workEntry, workspaceRoot) : null;
3061 const viewedImagePath = workEntryViewedImagePath(workEntry);
3062 const viewedImage =3063 const viewedImage =
3063 viewedImagePath && threadRef3064 viewedImagePath && threadRef
3064 ? resolveViewedImageAsset(viewedImagePath, {3065 ? resolveViewedImageAsset(viewedImagePath, {
...@@ -3159,7 +3160,7 @@ const PlainWorkEntryRow = memo(function PlainWorkEntryRow(props: {...@@ -3159,7 +3160,7 @@ const PlainWorkEntryRow = memo(function PlainWorkEntryRow(props: {
3159 </span>3160 </span>
3160 </div>3161 </div>
3161 </div>3162 </div>
3162 {viewedImage && threadRef ? (3163 {expanded && viewedImage && threadRef ? (
3163 <div3164 <div
3164 className="mt-1 ms-7 cursor-default"3165 className="mt-1 ms-7 cursor-default"
3165 onClick={stopRowToggle}3166 onClick={stopRowToggle}