GeezerVison is showing github.com — fix(web): viewed images in expanded tool rows page through the group's images by juliusmarminge · Pull Request #36051 · pingdotgg/t3code
Conversation
The review item is correct and is fixed. ToolOutputImages (V2ItemInspector.tsx) rendered a tool result's output images with no [data-image-gallery] ancestor, so markdownImageGallery fell back to only the clicked image. The earlier linked-strip fix reached only workspace viewed images, never tool-output-image resources. ToolOutputImages now wraps its images in and renders nothing when there are no images. Clicking any image of a tool result now opens all that result's images at the clicked index, so Left/Right page between them. Both parents (ToolCallBody and FetchedToolOutput) are space-y-1.5 containers, so the wrapper keeps the same spacing. A temporary measurement in the browser test showed identical image positions, following-line position and row height with and without the wrapper. The earlier viewed-image fix (expanded tool rows link to the group's viewed-images strip) is unchanged. No new regex or parser.
Fixes #36028
Reproduction on main
Commit 2cb56cb (origin/main). Ran T3CODE_DEV_SEED=0 vp run dev in a fresh worktree and added a scratch git project with three PNGs (shot1/2/3.png). Started a real Claude thread (provider claudeAgent, model claude-haiku-5-5): 'Use the Read tool on shot1.png, then shot2.png, then shot3.png, one Read call each'. It made three separate Read calls. Paired a headless Chromium (Playwright) to the dev web app, opened the thread, expanded 'Worked for', the 'Read 3 files' group and each 'Read project/shotN.png' row. Each expanded row shows the screenshot twice (the viewed image and a 'Tool output image'), and none is inside [data-image-gallery]. Clicking shot1 in the expanded row opened the viewer showing 'shot1.png' with no counter; after ArrowRight the viewer still showed shot1.png (same src). Control: clicking shot1 in the thumbnail strip under the group (which is a data-image-gallery) opened 'shot1.png (1/3)', and ArrowRight moved to 'shot2.png (2/3)'. The Replay provider could not show this because ACP tool images become text and ACP sets no viewedImagePath. A failing browser test is on factory/repro-36028: it gets { images: [second.png], index: 0 } where three images at index 1 are expected.
Evidence
Being captured: before and after in the real app. This section is filled in before the pull request can merge.
Tests
Added the browser test 'pages between the images of one expanded tool result' to MessagesTimeline.browser.test.tsx. It failed before the change (index 0, one image) and passes after. vp test run src/components/chat/MessagesTimeline.browser.test.tsx: 69/69 passed, including the original repro test. vp run check:changed passed (format, lint, knip, typecheck of 2 packages, tests in 3 files, react compiler).
Not in this change
- The 'Tool output image' (ToolOutputImages in V2ItemInspector) in an expanded row still opens as a single image. Its tool-output-image asset URL differs from the strip's media-file URL, so it cannot be matched to a slot in the viewed-images gallery without a mapping from tool output to viewed path.
- Tool calls that return images but set no viewedImagePath have no viewed-images strip, so their output images still open individually.
- Output images from different tool calls in the same group do not form one gallery: each tool result is its own gallery, and the group's viewed-images strip stays separate from tool output images.
- A Read row's 'Tool output image' (one image per result) still opens as a single image; it cannot be matched to the group's viewed-images strip because its asset URL differs.
Who did the work
- Written by Claude Opus 5.5, in Claude Code
- Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
- Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5
Run by the t3code factory in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Failing repro for #36028: clicking a viewed image inside an expanded tool
row opens the viewer with only that image, so arrow keys cannot page to the
other screenshots the turn viewed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s images
An image in an expanded tool row had no [data-image-gallery] or
.chat-markdown ancestor, so the viewer opened it alone and arrow keys did
nothing. The expanded group row now names its viewed-images strip, and an
image with no gallery of its own opens that strip as its gallery, found
there by source and name.
Fixes #36028
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ewer
A tool result's output images had no [data-image-gallery] ancestor, so the
viewer opened the clicked one alone. They now render inside a gallery
container with the same spacing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Approvability
Verdict: Approved at 33cdc70
Macroscope's review found this PR approvable — Expanded tool-row images now page through their group's images while retaining the selected tool-output snapshot. The change is limited to preview navigation and does not alter stored data or access controls.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Tool-result images now open in galleries that can include images from linked viewed-image rows. Browser tests check gallery contents and selected indexes for viewed images and multi-image tool results.
Changes: Tool image galleries
| Layer / File(s) |
Summary |
Gallery association and tool-output expansion apps/web/src/components/chat/MessagesTimeline.logic.ts, apps/web/src/components/chat/MessagesTimeline.tsx, apps/web/src/components/chat/TimelineWorkEntryRow.tsx, apps/web/src/components/chat/V2ItemInspector.tsx |
Work rows reference the ID of their viewed-images row. Viewed-image rows and tool-output images expose gallery containers. Tool-output image expansion can use a matching linked viewed-image row. |
Gallery lookup and selection apps/web/src/components/chat/markdownImageGallery.ts, apps/web/src/components/chat/MessagesTimeline.browser.test.tsx |
Gallery lookup falls back to a linked gallery when an image is outside its local scope. Registered linked images match by source and name. Browser tests check gallery contents and selected indexes. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant TimelineRow
participant WorkEntryRow
participant GalleryLookup
participant ImageViewer
TimelineRow->>WorkEntryRow: Pass linked viewed-image row ID
WorkEntryRow->>GalleryLookup: Resolve gallery for expanded image
GalleryLookup->>ImageViewer: Forward gallery images and selected index
Loading
Suggested reviewers: t3dotgg, maria-rcks
Merge Risk: Minimal · up to 33cdc
-
Clicking an image in an expanded tool result now opens a gallery that supports paging. The changes are confined to chat image viewing, and no merge-blocking risk is evident. Paging across images from separate tool calls, as the linked issue requested, is not covered.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: viewed images in expanded tool rows now page through the group's images. The diff, however, adds a data-image-gallery wrapper to ToolOutputImages so tool-result images… |
| Description check |
 |
The description follows the template. It has Problem, Change, Scope, Verification, and a note on who did the work. It links the issue (#36028) and gives concrete reproduction steps and test results. T… |
| Linked Issues check |
 |
Issue #36028 requires Left/Right paging and a counter for images returned by tool calls. The reproduction uses one Claude Read call per PNG. Two code paths at the reviewed head address this. (1) ToolO… |
| Out of Scope Changes check |
 |
Each changed area supports gallery paging for #36028. MessagesTimeline.logic.ts adds imageGalleryId. MessagesTimeline.tsx adds data-image-gallery-for. TimelineWorkEntryRow.tsx adds the viewed-images r… |
Full details: Title check
-
Explanation
The title names the main change: viewed images in expanded tool rows now page through the group's images. The diff, however, adds a data-image-gallery wrapper to ToolOutputImages so tool-result images open as one per-result gallery. The title's wording is "viewed images" and "the group's images", which describes the earlier viewed-images strip fix. The description says that earlier fix is unchanged, so the title points at the wrong part of the changeset. The title is conventional-commit style and specific, so it is only partially related to the change.
Full details: Description check
-
Explanation
The description follows the template. It has Problem, Change, Scope, Verification, and a note on who did the work. It links the issue (#36028) and gives concrete reproduction steps and test results. The Verification section explains the focused browser test and its before/after result. The Evidence section says before and after screenshots are pending and must be filled in before merge. The template requires before/after screenshots for UI changes, so that gap is still open. The Scope section does not state a reason for a bug fix over a feature, but it does link the issue that shows the bug.
Resolution
Add the before and after screenshots promised in the Evidence section. Upload them to GitHub and embed or link them in the description. Remove the placeholder text once they are in place.
Full details: Linked Issues check
-
Explanation
Issue #36028 requires Left/Right paging and a counter for images returned by tool calls. The reproduction uses one Claude Read call per PNG. Two code paths at the reviewed head address this. (1) ToolOutputImages in V2ItemInspector.tsx wraps its images in a data-image-gallery container. The images of one tool result now page together. It returns null when no images exist. (2) WorkEntryLogRow in TimelineWorkEntryRow.tsx routes a lone tool-output image through onOutputImageExpand. When the row has a rendered viewed image, the handler opens markdownImageGallery for that viewed image. It then places the output image in the matching gallery slot. The gallery is the group's viewed-images strip, which carries data-image-gallery={row.id} and the linked data-image-gallery-for attribute. This gives paging across separate Read rows. The browser test 'pages between the images of one expanded tool result' covers the multi-image case. The PR description says a Read row's tool-output image still opens as a single image. The code at the reviewed head does not match that statement. The description is stale or inaccurate. The real-app after-state evidence is still pending, so the Read behavior rests on code inspection and the browser test. Remaining gaps, which the PR states: tool calls without viewedImagePath have no strip, and images from different tool results do not form one gallery. The issue lists a turn-level gallery as a suggested direction, not a required outcome.
Full details: Out of Scope Changes check
-
Explanation
Each changed area supports gallery paging for #36028. MessagesTimeline.logic.ts adds imageGalleryId. MessagesTimeline.tsx adds data-image-gallery-for. TimelineWorkEntryRow.tsx adds the viewed-images row ID attribute and the onOutputImageExpand routing. V2ItemInspector.tsx adds the gallery wrapper and the empty-state return. markdownImageGallery.ts adds the linked-gallery fallback. MessagesTimeline.browser.test.tsx adds regression tests. No unrelated code change was found. The PR description's 'Not in this change' section conflicts with the routing code in TimelineWorkEntryRow.tsx. This is a description inaccuracy, not an out-of-scope code change.
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
Note This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 321c4e5 and 33cdc70.
Files selected for processing: 2
-
apps/web/src/components/chat/MessagesTimeline.browser.test.tsx
apps/web/src/components/chat/TimelineWorkEntryRow.tsx
Limit details: You’ve used all 10 included reviews currently available.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ages
A Read row shows its image twice: the viewed image and the tool output
image. The output image sat in its own one-image gallery, so the viewer
opened it alone. A lone output image in a row that shows a viewed image
now opens the gallery that viewed image opens.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…gallery
The output image opened its viewed image's gallery with the viewed copy
selected, a workspace file read fresh from disk. When the agent had since
overwritten that path, the viewer showed the new file instead of what the
tool returned. The clicked output image now keeps its slot in the gallery.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The automated pipeline stopped on this pull request and will not merge it:
the reviewers still had findings after 3 rounds (the work is on main...factory/issue-36028):
- [major] apps/web/src/components/chat/markdownImageGallery.ts:61: Not fixed: paging still fails when the group's viewed-images strip has been virtualized away. The expanded work group and strip are separate LegendList rows, and only the mounted DOM is searched. When the strip is absent, both the viewed thumbnail and the stored-output callback fall back to a singleton preview. Build the gallery independently of the strip's mounted DOM, or ensure the linked strip remains mounted whenever its work row is rendered.
Fails with: A desktop or web user reviews several screenshots in a tall expanded work group, scrolls forward to later work containing another viewed-image strip, then scrolls back to the first screenshot near the top of the original group. The original strip lies below the render buffer and its container has been recycled. Clicking the screenshot opens one image; Right does nothing. A focused Chromium reproduction using the installed LegendList, production-style item types, a 4000px work row and later gallery confirmed that the work row was mounted while its linked strip was absent.
It stays open for a person to finish or close.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Three rounds of review did not settle this fix, so it is closed and written again from main. The new pull request will link here.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|