Skip to content

fix(chat): keep submitted images visible during history handoff - #143407

Merged
steipete merged 1 commit into
mainfrom
codex/ui-image-custody-retirement
Sep 9, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ui-image-custody-retirement

Conversation

@steipete

@steipete steipete commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Related: #143227, #134931

What Problem This Solves

Fixes an issue where a submitted image disappears behind a loading placeholder when outbox history confirms delivery before the live transcript event arrives. The image has already been accepted, but canonical media metadata is still loading.

Why This Change Was Made

Delivery retirement now recognizes when the current session's pending-input custody already owns the submitted run. It retires the retained submission before local admission can replace the displayed image. The existing local fallback remains available when custody belongs to another physical session or has not accepted the submission.

User Impact

Submitted images remain visible while delivery moves from the local preview to canonical history, regardless of whether the history receipt or live event arrives first. This is a separate ten-line production repair discovered while validating #143227.

Evidence

The pinned-main regression failed before the repair and passed afterward. On Linux Chromium 144, receipt-first ordering reproduced the original image detachment while event-first ordering passed; after the repair, both orders preserve the original image handle, decoded pixels, and frame continuity through metadata and image loading. The owner suite also covers replay after custody removal and the fallback for a replaced physical session.

Validation passed: 417 owner/sibling tests, 18 Linux Chromium E2E cases across four files, the full changed-file gate, and independent review through P2. Completed Testbox run. All owned Testboxes were stopped.

Before and after captures below use synthetic data with canonical metadata deliberately held. Exact-head required CI passed after one unchanged-head retry of an unrelated text-streaming frame-budget failure; source and thresholds were unchanged. Native review, prepare, and merge completed; the landed files match the reviewed patch.

Before: accepted image disappears while canonical metadata loads

After: the submitted image remains visible through the same handoff

Recognize current session custody before delivery retirement re-admits a local preview. This preserves the displayed image while canonical media loads and retains the fallback for missing or replaced-session custody.

The original image detaches when an outbox history receipt precedes the live transcript event. The repaired producer preserves the original handle, pixels, and frame continuity in both receipt-first and event-first orders. Owner/sibling tests, Linux browser proof, changed checks, and independent P2 review passed.

Related: #143227, #134931
@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 9, 2026
@steipete
steipete marked this pull request as ready for review September 9, 2026 21:27
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 5:33 PM ET / 21:33 UTC.

ClawSweeper review

What this changes

Preserve submitted chat images while delivery confirmation hands display ownership from the local preview to session history, with regression coverage for both arrival orders.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, focused repair absent from fetched main and the latest release. No actionable introduced defect was found; inspected before/after captures support the visible improvement.

Priority: P2
Reviewed head: 02c2fef53c55ad5bf6681f03c6bdce4287bd0160

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful ordering coverage and direct visual evidence; no blocking correctness or security concern was found.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Chromium captures show the actual Control UI changing from an image placeholder to the retained submitted image during the described metadata hold. The browser scenario exercises the changed delivery-retention owner through chat submission and controlled Gateway events; temporal continuity assertions are supplemental and were not rerun here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after Chromium captures show the actual Control UI changing from an image placeholder to the retained submitted image during the described metadata hold. The browser scenario exercises the changed delivery-retention owner through chat submission and controlled Gateway events; temporal continuity assertions are supplemental and were not rerun here.
Evidence reviewed 9 items Focused production repair: The introduced guard retires only a pending delivered submission already represented by current-session custody. Existing outbox removal, payload preparation, and connection checks remain unchanged.
Session-scoped lookup: The existing pending-input accessor requires matching logical session, physical session ID, and selected agent. A replacement physical session therefore retains the local fallback.
Still necessary on fetched main: Fetched main still calls local submission admission without first checking existing pending-input custody.
Findings None None.
Security None None.

How this fits together

The Control UI combines locally submitted messages, Gateway-accepted pending inputs, and canonical session history into one conversation. This change prevents delivery reconciliation from replacing an accepted image while its canonical media is still loading.

flowchart LR
  A[Submitted image] --> B[Local preview]
  C[Gateway pending inputs] --> D{Current session owns this run?}
  E[Delivery confirmation] --> D
  D -->|Yes| F[Retire local display admission]
  D -->|No| B
  F --> G[Preserve accepted image]
  G --> H[Canonical history and media]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +10, Tests +62. Total +72 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 10 0 +10
Tests 2 68 6 +62
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 78 6 +72

Review metrics

Metric Value Why it matters
Production versus regression coverage production +10 net lines; tests +62 net lines The small production guard is accompanied by ordering and replacement-session coverage that directly protects the repaired boundary.

Technical review

Best possible solution:

Keep accepted-image presentation authoritative throughout delivery reconciliation while retaining local display fallback when matching session custody is absent.

Do we have a high-confidence way to reproduce the issue?

Yes: current source exposes the custody-before-retention ordering gap, and the browser regression explicitly delays media while delivering history confirmation before the transcript event. This review did not execute the scenario.

Is this the best way to solve the issue?

Yes: using the existing session-scoped custody accessor repairs local display admission at its owner without introducing another presentation store or changing delivery authorization.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 13083df05f8e.

Labels

Label changes:

  • add P2: This fixes a bounded chat-image display regression during delivery handoff without evidence of lost messages or a blocked core workflow.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after Chromium captures show the actual Control UI changing from an image placeholder to the retained submitted image during the described metadata hold. The browser scenario exercises the changed delivery-retention owner through chat submission and controlled Gateway events; temporal continuity assertions are supplemental and were not rerun here.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after Chromium captures show the actual Control UI changing from an image placeholder to the retained submitted image during the described metadata hold. The browser scenario exercises the changed delivery-retention owner through chat submission and controlled Gateway events; temporal continuity assertions are supplemental and were not rerun here.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after Chromium captures show the actual Control UI changing from an image placeholder to the retained submitted image during the described metadata hold. The browser scenario exercises the changed delivery-retention owner through chat submission and controlled Gateway events; temporal continuity assertions are supplemental and were not rerun here.

Label justifications:

  • P2: This fixes a bounded chat-image display regression during delivery handoff without evidence of lost messages or a blocked core workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after Chromium captures show the actual Control UI changing from an image placeholder to the retained submitted image during the described metadata hold. The browser scenario exercises the changed delivery-retention owner through chat submission and controlled Gateway events; temporal continuity assertions are supplemental and were not rerun here.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after Chromium captures show the actual Control UI changing from an image placeholder to the retained submitted image during the described metadata hold. The browser scenario exercises the changed delivery-retention owner through chat submission and controlled Gateway events; temporal continuity assertions are supplemental and were not rerun here.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after Chromium captures show the actual Control UI changing from an image placeholder to the retained submitted image during the described metadata hold. The browser scenario exercises the changed delivery-retention owner through chat submission and controlled Gateway events; temporal continuity assertions are supplemental and were not rerun here.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 9601bb2 into main Sep 9, 2026
279 of 281 checks passed
@steipete
steipete deleted the codex/ui-image-custody-retirement branch September 9, 2026 21:59
@steipete

steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
…claw#143407)

Recognize current session custody before delivery retirement re-admits a local preview. This preserves the displayed image while canonical media loads and retains the fallback for missing or replaced-session custody.

The original image detaches when an outbox history receipt precedes the live transcript event. The repaired producer preserves the original handle, pixels, and frame continuity in both receipt-first and event-first orders. Owner/sibling tests, Linux browser proof, changed checks, and independent P2 review passed.

Related: openclaw#143227, openclaw#134931
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant