[codex] fix(ui): proxy inbound media previews#90172
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 8:00 AM ET / 12:00 UTC. Summary PR surface: Source +24, Tests +51. Total +75 across 2 files. Reproducibility: yes. at source level: current main extracts image Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Proof path suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this or an equivalent narrow renderer fix after real browser or live Control UI proof shows a canonical inbound image rendering inline through the authenticated, ticketed assistant-media route. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main extracts image Is this the best way to solve the issue? Yes for the implementation shape: reusing the existing authenticated, ticketed assistant-media route is narrower and safer than adding a new public inbound media serving path. Merge readiness still needs real browser or live Control UI proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6cb82eaab865. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +24, Tests +51. Total +75 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
@sweetcornna thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward. Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive. Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it. |
|
Superseded by #100725, now landed as The replacement rebuilt this fix on current |
Summary
media://inbound/photo.pngthrough the existing authenticated Control UI__openclaw__/assistant-mediaroute.media://inbound/<id>refs so othermedia://locations do not bypass the existing gateway validation.MediaPathinbound image refs with empty local preview roots.Fixes #89591
Verification
node scripts/run-vitest.mjs ui/src/ui/chat/grouped-render.test.ts -t "renders canonical inbound media refs" --reporter=dotnode scripts/run-vitest.mjs ui/src/ui/chat/grouped-render.test.ts src/gateway/control-ui.http.test.ts --reporter=dotnpx oxfmt --check ui/src/ui/chat/grouped-render.ts ui/src/ui/chat/grouped-render.test.tsnode scripts/run-oxlint.mjs ui/src/ui/chat/grouped-render.ts ui/src/ui/chat/grouped-render.test.tsgit diff --checknode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.jsonReal behavior proof
Behavior addressed: WebUI transcript images stored as
media://inbound/...were detected as imageMediaPathentries, but the renderer left the browser-facing<img src>asmedia://...instead of using the existing authenticated__openclaw__/assistant-mediaroute. Browsers cannot load that scheme, so inbound Telegram/iMessage images showed as attachments without an inline preview.Real environment tested: Local OpenClaw worktree at commit
98f8ec1fafcf2e32320e0a488a21462d84a3067fon macOS with repo dependencies installed viapnpm install --frozen-lockfile. The proof used the actual Control UI grouped renderer in jsdom, the actual async media-ticket path, and the existing Gateway HTTP media route tests.Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix: The renderer now treats
media://inbound/proof-photo.pngas a managed inbound media ref, requests authenticated metadata from/openclaw/__openclaw__/assistant-media?...&meta=1, receives a media ticket, and renders the final<img>with/openclaw/__openclaw__/assistant-media?source=media%3A%2F%2Finbound%2Fproof-photo.png&mediaTicket=proof-ticket.What was not tested: I did not run a live Telegram or iMessage account through the full Gateway UI in a browser screenshot pass. The channel receive path was not changed; existing Gateway tests cover serving canonical inbound refs, and the new proof exercises the shared WebUI renderer path that was leaving
media://inboundunloadable.