Repository navigation
fix(control-ui): restore sandbox media previews - #117689
Conversation
52afe80 to
14a4b51
Compare
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 10:01 PM ET / August 2, 2026, 02:01 UTC. ClawSweeper reviewWhat this changesThe branch converts workspace-anchored relative media paths into stable persisted transcript paths, keeps history-pruning recognition for the old relative marker text, and extends the Control UI Chromium test for sandbox-staged inbound images. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep this PR open for maintainer review. Current main still preserves a workspace-relative Priority: P2 Review scores
Verification
How this fits togetherSandbox staging supplies media facts to the user-turn transcript recorder. Control UI later reads those persisted facts and requests media through its authenticated, ticketed preview route, so a path that is only meaningful inside the sandbox must be made stable before transcript persistence. flowchart LR
A[Inbound attachment] --> B[Sandbox media staging]
B --> C[User-turn transcript]
C --> D[Persisted media fact]
D --> E[Control UI session history]
E --> F[Authenticated media preview]
Decision needed
Why: The code changes the canonical persisted representation for newly recorded workspace-anchored media, while the available browser evidence simulates Gateway and assistant-media responses rather than exercising the complete sandbox persistence path. Before merge
Agent review detailsSecurityNone. PR surfaceSource +26, Tests +36. Total +62 across 4 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep path canonicalization at transcript persistence, retain the pruning alias bridge, and land only after an integrated sandbox-to-persisted-transcript-to-Control-UI proof confirms both new and existing session behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: on current main a structured media entry with Is this the best way to solve the issue? Yes for the code shape: transcript persistence owns the authoritative workspace anchor, so resolving there is preferable to a Control UI-specific path reconstruction rule. The associated history-pruning alias handling is necessary to keep the existing relative marker contract intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b2da7aa106dc. 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
HistoryReview history (6 earlier review cycles)
|
|
@clawsweeper re-review Exact-head proof is now in the PR body. The release-owned changelog entry is removed, and a fabricated-only Control UI browser proof passed on Testbox run 30724759179: absolute sandbox source, authenticated metadata request, ticketed image fetch, and rendered image width 128. The captured screenshot was manually inspected and contains no real/private data. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Exact-head inspectable browser proof is now in the PR body and the fresh Real behavior proof check is green. {"proof":"control-ui-sandbox-transcript-media","source":"/workspace/media/inbound/fabricated-sandbox.png","metadataAuthenticated":true,"ticketScoped":true,"rawRequestHasBearer":false,"renderedNaturalWidth":128}The 1280x900 capture was manually inspected and contains only stock Control UI chrome plus the fabricated SANDBOX tile and caption; no real/private data. |
|
Merged via squash.
|
* fix(control-ui): restore sandbox media previews * fix(media): preserve anchored history pruning * style: format anchored history pruning * chore: drop release-owned changelog entry * test(ui): cover sandboxed inbound image previews
…elf-release * commit '10a390ed7fa88d09da0d4523c3ed1e3550ece5c6': (4646 commits) fix(release): allow larger npm plugin artifacts (openclaw#117745) refactor(macos): consolidate gateway process fixtures (openclaw#117740) fix(ui): preserve complete persisted log messages (openclaw#117666) fix(ui): decode artifact previews as UTF-8 (openclaw#117657) fix(control-ui): restore sandbox media previews (openclaw#117689) fix(plugins): link host declared as direct dependency (openclaw#117738) fix(macos): avoid self-named defaults suite (openclaw#117690) fix(inference): preserve run ownership and completion delivery (openclaw#117731) test(talk): align browser E2E tool completion test: consolidate OpenClaw E2E fixtures (openclaw#117701) fix(release): ignore bundle fields in npm locks (openclaw#117730) fix(meeting-bot): keep configured host options internal refactor(line): remove dead card helpers (openclaw#117729) perf(cli): attribute command startup stages (openclaw#117720) refactor(whatsapp): deduplicate reply delivery test fixtures (openclaw#117710) docs(changelog): note bounded WebRTC tool calls docs(changelog): note meeting audio bounds fix(meeting-bot): preserve node host SDK surface test(talk): split WebRTC tool lifecycle coverage fix(meeting-bot): break node host import cycle ... # Conflicts: # package.json # src/agents/model-auth.ts
What Problem This Solves
Fixes #108174: sandbox-staged inbound images can be analyzed by the agent but render as broken previews in Control UI because the persisted transcript retains a workspace-relative media path.
Why This Change Was Made
User Impact
Sandboxed inbound image attachments now render through the existing authenticated assistant-media route in Control UI session history without introducing a separate UI-side path reconstruction rule.
Evidence
pnpm test src/sessions/user-turn-transcript.media.test.ts src/agents/embedded-agent-runner/run/history-image-prune.test.tspassed 56/56.tbx_01kz02d20s9t5vasjh6q2wchbd, executed the exact parentd5afd92f0c6209d8b361fd802c921e66db8b72f0with synced E2E blobba19112cabd3da442d5af837c35e2d4da8ad031b; committed PR headd41a4a01e2b20e7f1586076d4b9fae906fb796eacontains that exact identical blob.OPENCLAW_UI_E2E_ARTIFACT_DIR=/tmp/openclaw-ui-pr117689 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.media-files.e2e.test.ts --testNamePattern "ticketed media route" --reporter=verbose.Test Files 1 passed; Tests 2 passed | 12 skipped; both canonicalmedia://inbound/telegram-photo.pngand sandbox/workspace/media/inbound/fabricated-sandbox.pngassert the exact source query, authenticated Bearer metadata request, ticketed image-body request without Bearer authorization, and a visibly decoded image withnaturalWidth = 1.canonical-inbound-image.png(30139 bytes) andsandbox-inbound-image.png(30758 bytes). These screenshots stayed on the ephemeral Testbox and were not uploaded as public artifacts.{"exitCode":0,"runStatus":"succeeded"}and stopped its one-shot lease. Its backing Actions run may show canceled during externally managed lease cleanup; the remote command output and wrapper exit code are the authoritative delegated Testbox result.gpt-5.6-sol, reasoningxhigh, 12143-byte bundle, TruffleHog clean, exit 0, no accepted or actionable findings.Closes #108174