feat(web): preview generated images in right panel - #6029
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
One finding: the generated-image branch of assetsCreateUrl wraps a projection-read failure in an error whose semantics (and caller-visible message) describe filesystem inspection of the image. Everything else in the changed Effect code follows the conventions (namespace subpath imports, structured Schema.TaggedErrorClass errors with cause and derived messages, errors constructed at the failure boundary, no hidden runtimes or service-instance injection).
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 62a40ae. Configure here.
ApprovabilityVerdict: Needs human review New feature introducing user-facing image preview capability with new UI components, state management, asset types, and server-client integration. New features with this scope warrant human review. You can customize Macroscope's approvability policy. Learn more. |

Problem
Completed Codex image-generation activities render their saved filenames in the transcript, but selecting one follows the normal workspace-file path. In the desktop app that hands the image to the configured editor instead of previewing it inside T3 Code.
Solution
Other providers are unchanged because this is based on Codex's existing
imageGenerationactivity payload.Impact
Users can inspect a generated image without leaving their conversation or opening an external editor. Reopening the same image refreshes and activates its existing tab instead of creating duplicates.
Validation
t3,@t3tools/web, and@t3tools/contractstypechecks passed.The full
AssetAccess.test.tsfile currently has two pre-existing Windows-only favicon assertions that expect/instead of the native\separator. The generated-image cases pass independently, and this change does not modify those favicon paths.Screenshots
Before
After
Coordination
The contributor requested review before #2829 lands. The implementation may need adaptation when orchestration V2 merges.
Authored with GPT-5.6 in T3 Code using the Codex harness.
Note
Add generated image preview panel to the chat right panel
generated-imageright panel surface kind tracksactivityId,name, and aloadRequestIdcounter; each call toopenGeneratedImageincrementsloadRequestIdto cache-bust the asset URL.GeneratedImagePanelfetches the image viauseAssetUrlState, appends at3LoadRequestquery param, and shows loading/error states.ProjectionSnapshotQuery.getGeneratedImagePathSQL query and issues a signed asset URL throughassetsCreateUrlWS method using a newgenerated-imageAssetResourcevariant.itemType: 'image_view'are now projected to expose onlyfileName(nosavedPath) to the client.generated-imagesurfaces are dropped on migration.Macroscope summarized 89b8332.
Note
Medium Risk
Touches signed asset issuance and filesystem path validation for provider files; mitigations include exact-file tokens, symlink rejection, and activity-scoped lookups.
Overview
Adds in-app preview for completed Codex image-generation activities instead of treating them like workspace file links.
Server: New
generated-imageasset resource resolves the providersavedPathvia a narrow projection lookup (getGeneratedImagePath), issues signed URLs withgenerated-imageclaims, and serves only the exact basename with canonical-path and symlink checks. Activity projection strips full paths from payloads (filename only).Web: Work log rows expose a link that opens a reusable right-panel tab (
GeneratedImagePanel) backed by signed asset URLs and aloadRequestIdcache-bust on reopen. Timeline folding keeps generated-image links visible after tool activity collapses.Docs: User guide for generated image preview.
Reviewed by Cursor Bugbot for commit 89b8332. Bugbot is set up for automated code reviews on this repo. Configure here.