Repository navigation
fix(ui): keep loaded chat images visible during gateway outages - #136446
Conversation
Separate unconfirmed metadata failures from explicit missing or denied media. Let the mounted image retain its decoded pixels without extending read authorization, and route parsed raster attachments through the same image owner. Preserve retry, source/auth/epoch fences, and ignore load events from removed images. Related to #136072; adds prolonged-outage, late-load, and sibling attachment regressions.
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 2:11 PM ET / 18:11 UTC. ClawSweeper reviewWhat this changesThe PR preserves already decoded Control UI chat images through temporary media-metadata failures while clearing previews for definitive denial or source-scope changes. Merge readinessKeep open: fetched main still converts an expired or failed local-media renewal into an unavailable card, while this PR adds the missing temporary-failure distinction and keeps only the mounted image visible. Direct review found no blocking patch defect; exact-head CI must complete successfully before merge. Priority: P2 Review scores
Verification
How this fits togetherControl UI obtains short-lived, source-scoped media tickets from the Gateway before native browser images load them in the chat transcript. The change lets a mounted image retain already decoded pixels during an unconfirmed renewal failure without granting another media read. flowchart LR
A[Chat attachment] --> B[Metadata availability]
B --> C{Renewal result}
C -->|Available| D[Ticketed image URL]
C -->|Temporary failure| E[Retain mounted pixels]
C -->|Denied or missing| F[Unavailable card]
D --> G[Chat transcript]
E --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +18, Tests +116, Docs +2. Total +136 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the owner-boundary distinction after a successful exact-head CI run, retaining decoded pixels only for unconfirmed renewal failures and preserving definitive denial, retry, source, auth, and connection-scope fences. Do we have a high-confidence way to reproduce the issue? Yes, from source: fetched main turns an expired ticket into unavailable and the renderer replaces nonavailable media with a status card; this branch preserves a loaded element only for unconfirmed renewal states. Is this the best way to solve the issue? Yes: recording uncertainty at the metadata owner and consuming it in the existing canonical image presenter avoids duplicate render paths and does not extend ticket authorization or add a compatibility surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1212f991db46. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Addressing both pre-merge points in the latest ClawSweeper review: Production +18: accepted with the owner-boundary rationale. The absorbing refactor is included: parsed rasters share the canonical image presenter, metadata results publish once, and duplicate classification plus an unreachable refresh branch are removed. The remaining growth records unconfirmed versus definitive outcomes, fences removed-element load events, and preserves the existing Retry action when consolidating callers. Removing those distinctions breaks the reproduced retention/denial/Retry contracts. No simpler net-neutral refactor was found that preserves these behaviors. This follow-up is explicitly +18; the related original repair was −24, not a reason to hide this PR's delta. Screenshot retrieval: verified from the maintainer environment. Both published image URLs returned HTTP 200 at 2026-09-02 17:09 UTC and match the original inspected captures byte-for-byte. SHA-256:
The full synthetic before/after captures were inspected, along with reconnect/reload captures and raw frame/test records. The review environment's DNS failure is an independent-fetch limitation, not missing or replaced proof. The reported brief disconnect remount and sampling limits still apply. No code changed after the reviewed head |
|
CI resolved: normal PR run 33663432654, attempt 2 completed successfully on the unchanged reviewed head The fresh 18:11 UTC ClawSweeper review has no patch or security findings. Its remaining exact-head CI requirement is now satisfied; the previously recorded +18 production-line ownership rationale and independently verified before/after media evidence are unchanged. The source commit, local regression/stress results, and live outage proof have not changed. Three attempt-1 failures were public Git-fetch failures, not test assertions: bundled-protocol passed all 210 bundled tests, then failed fetching its baseline; guards failed its later baseline fetch; docs exhausted the existing five ClawHub checkout attempts. All reported an HTTPS username/ref-listing error. Clean anonymous local probes of the public repositories succeeded, but that does not prove runner recovery or establish the precise cause. Checkout credentials intentionally end before test execution. Named CI follow-up: prepare required baseline history through the existing checkout owner before credentials end, retaining the full downstream checks; do not persist or lend those credentials to unrelated checkouts. The fourth attempt-1 failure was the scroll-disclosure browser case: one wheel-interruption assertion observed A selective failed-jobs retry was initially rejected with CI refresh chronology
|
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Merged via squash.
|
…w#136446) Separate unconfirmed metadata failures from explicit missing or denied media. Let the mounted image retain its decoded pixels without extending read authorization, and route parsed raster attachments through the same image owner. Preserve retry, source/auth/epoch fences, and ignore load events from removed images. Related to openclaw#136072; adds prolonged-outage, late-load, and sibling attachment regressions.
Related: #136072
What Problem This Solves
Fixes an issue where users viewing uploaded or local chat images would see an already-loaded image replaced by “Attachment unavailable” when the Gateway stayed offline or media-ticket renewal failed. The initial send/history continuity repair did not cover this later lifecycle: a longer live test reproduced the reported unavailable cards on current main.
Why This Change Was Made
The metadata owner treated an unconfirmed renewal failure like an explicit missing/denied result, and the image renderer discarded its loaded element. Media tickets authorize future reads; their renewal is not a lease on pixels already decoded by that mounted image.
Record unconfirmed outcomes at the metadata owner and let the existing image presenter retain only its own loaded element. Explicit missing/denied responses, source/auth/access-scope changes, and decode failures still clear it; expired tickets remain unavailable to fresh reads. Ignore late load events from removed images so Retry cannot resurrect a denied preview. Preserve subscriptions when the parent callback changes instead of dropping the resource.
Parsed local raster attachments now use that same presenter, retaining their Retry action. This removes duplicate availability publishing and image classification paths. SVG, audio/video/documents, and explicit managed-artifact transport keep their existing owners. No dependency, configuration, persistence, protocol, or ticket-lifetime change.
User Impact
Already-loaded images remain visible through temporary metadata/network failures and ticket expiry within the same mounted access scope. Duplicate attachments remain distinct and recover normally after reconnect/reload. The existing access-scope reset on disconnect can still briefly remount images; this is not a claim of zero flicker across connection or authorization changes.
Evidence
ad3268ecccbc7758878662b31adcd72475343d3e) reproduced the failure in real Chrome with an isolated, normally authenticated Gateway and a real image prompt/reply. It also failed canonical/inline-handoff and parsed-local-raster regressions. A strengthened late-load-only denial test failed before the removed-element guard.check:changedpassed, including UI/core-test types, formatting, lint, i18n, and dead exports. Independent Codex review: no actionable P0–P2 findings. A test fixture type error was corrected to use native Responses, then the final suite and checks were rerun successfully.Production delta: +116/−98, net +18; tests +193/−77, net +116; docs +2. The growth preserves the explicit unconfirmed-vs-denied state, mounted-element fencing, and existing Retry behavior while consolidating the raster path. Combined with the original repair’s −24 production lines, this request remains net −6 production lines.
Named follow-up: consolidate the explicit managed-raster attachment path only after proving full-ticket/error/Retry parity. Standard generated images already use the blob-gallery owner; this PR does not claim to repair every managed-artifact lifecycle. The earlier short-duration live proof was valid for send/handoff/reload but insufficient for a prolonged renewal outage.