Repository navigation
fix(ui): managed image replies render once under base paths - #113163
Merged
Merged
Conversation
Member
Author
|
Maintainer landing update for head
No owner-boundary, security, config, protocol, or sibling-runtime concerns remain. Proceeding through the repo-native merge gate once the durable ClawSweeper publication catches up. |
Member
Author
|
Merged via squash.
|
Member
Author
|
Current-main drift proof completed before merge:
The overlapping main change (#113157) only replaces the shared chat-run-state test fixture; the exact transcript rewrite and base-path behavior remain green on the actual merge result. This satisfies the ClawSweeper rank-up intent without rewriting the PR branch. |
Member
Author
|
Merged via squash.
|
Member
Author
|
Landed via squash as Post-merge verification:
|
vincentkoc
pushed a commit
that referenced
this pull request
Jul 24, 2026
(cherry picked from commit 09c6d66)
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
This was referenced Jul 27, 2026
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #113161
Related prior art: #75727
AI-assisted: yes. I understand the change and verified the full ownership path.
What Problem This Solves
Fixes an issue where users viewing managed assistant images in a Control UI mounted below a base path would get a missing preview, and a Codex-managed media answer could appear as both a raw and managed assistant reply.
Why This Change Was Made
Managed outgoing media URLs remain origin-root Gateway API paths instead of being rebased under the Control UI mount. For Codex runtime-owned replies, the harness now carries the exact mirrored transcript idempotency key through finalization so Gateway replaces only that canonical assistant row with managed content rather than appending a parallel row.
The identity-based rewrite preserves the existing transcript event/message ID and neighboring assistant entries. Other harnesses without an attested transcript identity retain the existing append path.
Direct Codex contract check: app-server item completion is the authoritative item/result state, while turn completion is the final turn status (Codex app-server protocol). That matches the existing OpenClaw Codex projector’s item-owned assistant lifecycle and makes the mirror idempotency key the durable reconciliation identity.
User Impact
Managed images render normally when Control UI is served under a path such as
/rosita, and one Codex media answer remains one logical assistant reply. Distinct neighboring assistant replies are not deduplicated.Evidence
8a2b2b35f50: deterministic Chromium requested/rosita/api/chat/media/outgoing/..., receivedtext/html, and attached no image (red Testbox run).afaddab0a90: Chromium requested only/api/chat/media/outgoing/..., receivedimage/png, decoded a non-zero image width, showed the managed reply once, and preserved a distinct second reply.Before (base; image absent):
After (exact head; image decoded and replies remain distinct):
Raw recordings: base reproduction · exact-head fix · manifest and checksums
bd48b7b26bb:src/agents/embedded-agent-runner/run/payloads.test.ts: 54 passedsrc/agents/embedded-agent-runner/run/run-attempt-dispatch.media.test.ts: 10 passedsrc/gateway/server-methods/chat.directive-tags.test.ts: 157 passedui/src/e2e/managed-media-base-path.e2e.test.ts: 1 passed$behavior-validator: 4 contract clauses passed; 0 failed/blocked. Anti-cheat route returned HTML for any incorrectly prefixed request, decoded dimensions proved real image bytes, and the distinct second reply guarded against broad content dedupe.$autoreview: clean, no accepted/actionable findings; overall correctness 0.94.git diff --check: passed.