Repository navigation
fix(ui): keep uploaded images visible during worktree startup - #139323
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 3:41 PM ET / 19:41 UTC. ClawSweeper reviewWhat this changesPreserves uploaded chat image previews during workspace startup while retaining access revalidation, with regression coverage and documentation. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main still invalidates uploaded-image presentation when workspace metadata arrives. No actionable correctness or security defect was found in the introduced patch. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI renders uploaded images from local previews and canonical transcript media references. Session metadata updates affect image presentation and trigger authenticated media availability checks. flowchart TD
A[Uploaded image] --> C[Chat image renderer]
B[Session workspace update] --> C
C --> D[Keep mounted upload preview]
C --> E[Recheck media access]
E --> F[Refresh authorized image]
E --> G[Remove denied image]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +10, Tests +75, Docs +2. Total +87 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep upload presentation stable at the gallery owner while independently renewing access and immediately clearing denied or identity-replaced media. Do we have a high-confidence way to reproduce the issue? Yes, from source: render an uploaded image, leave canonical metadata pending, then hydrate workspace details; current main changes the gallery scope and replaces the loaded image. This review did not execute that scenario. Is this the best way to solve the issue? Yes—the gallery owns the unwanted remount, making this the narrow repair. Removing policy invalidation from the media resource instead would suppress necessary access revalidation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a2421a2c08c9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users uploading an image into a new chat would see the already-loaded preview replaced by a loading card when the session's worktree details arrived.
Why This Change Was Made
Workspace and permission metadata was part of the entire image gallery's identity, so hydrating the session recreated its image elements. Preserve mounted inline and inbound uploads across those updates while retaining policy-triggered metadata revalidation. Filesystem previews still reset on policy changes, and explicit access denial or changed credentials/session identity still clears retained images.
The production change adds ten net lines to separate gallery identity from per-image workspace invalidation. Regression coverage extends the existing new-session browser flow and checks inline, pending-metadata, and fully loaded uploads.
User Impact
Uploaded images stay visible through worktree startup and canonical history loading, without flashing a loading placeholder or losing their layout.
Evidence
check:changedgates passed in an isolated checkout with an owned dependency install; all four edited files were verified byte-identical to this patch.Before
After