Skip to content

fix(ui): hide trust wrappers in imported chat history - #140338

Merged
roboclaw-bot merged 1 commit into
mainfrom
openclaw/beam-hide-import-trust-markers
Sep 6, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
openclaw/beam-hide-import-trust-markers

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes an issue where users importing chat history through Beam would see EXTERNAL_UNTRUSTED_CONTENT markers and a Source: External header in user and assistant bubbles. Markdown also interpreted the header separator as a heading.

Why This Change Was Made

Project imported messages for presentation only, requiring catalog-import provenance and a complete matching-ID, no-warning wrapper. Both text extraction and message normalization use the projection, keeping display, search, reply context, full-message recovery, and assistant clipboard copy consistent. The importer, persisted history, and model-facing untrusted-content protections are unchanged.

User Impact

Imported history reads as ordinary chat again. Message bodies and code examples remain intact; literal quoted wrappers, warning-bearing content, tool output, and malformed/truncated wrappers are not silently discarded.

Evidence

  • Red/green regression: the original code failed 16 newly added display/extraction cases; preservation cases already passed.
  • 430 focused UI tests pass across five files, including 47 new cases covering both roles, string/block/text forms, immutable history, Markdown, clipboard/reply behavior, CRLF, import labels, nested examples, and malformed frames.
  • 85 external-content safety tests and the catalog-import persistence/deduplication test pass.
  • Targeted lint, formatting, conflict-marker checks, and git diff --check pass.
  • Isolated Chromium with a mocked Gateway confirms wrappers in the before state and their absence in both imported bubbles afterward. The parent reviewer inspected both 1200×950 captures: message text, the TypeScript example, controls, and surrounding layout are preserved without clipping or overlap. Captures precede the final malformed-separator-only tightening; the captured fixture uses the exact trimmed import layout, so that delta does not alter the depicted behavior.

Before

Imported user and assistant bubbles showing generated trust framing

After

Imported message bodies and TypeScript example preserved without generated trust framing

  • Pre-publication review caught overly permissive leading separators; the matcher was tightened and six additional red cases were demonstrated against the previous matcher. Fresh independent P0–P2 review reports no actionable findings.

Local full changed-check execution and the standalone declaration typecheck remain unavailable under the existing host package-age and shared-dependency guards; neither guard was bypassed. The initial full CI run failed only on the inherited docs-navigation assertion. That baseline issue was repaired on main by #140337 (96bf3652adabc25d86af15a950a72be63575acc5). This branch was rebased onto the fixed main with an unchanged stable patch ID and intact co-author credit; 430 UI tests and all 10 docs-publisher tests pass on rebased head 25b90df636458be30e75b30b61f6e202bc4db0df. Fresh exact-head CI passed, including the aggregate gate; the native watcher reports GREEN. The prior run’s three UI check lanes, seven UI E2E shards, and real-Gateway UI tests all passed.

The current-head ClawSweeper review reports no patch defect and rates the visual proof sufficient. Its remaining note concerns its own environment being unable to retrieve attachments, not missing inspection: both full-resolution images were independently inspected in the parent session, with the results and captures recorded above. No additional product or safety change is needed for that environment-only limitation.

Worked on by

@clawsweeper

clawsweeper Bot commented Sep 6, 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: M maintainer Maintainer-authored PR labels Sep 6, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 6, 2026 17:47
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 2:16 PM ET / 18:16 UTC.

ClawSweeper review

What this changes

Hide generated trust wrappers in imported chat display, search, reply previews, and copied text while preserving stored messages.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful, focused fix absent from inspected main. No actionable patch defect was found, and the updated body addresses the previous request for visual evidence; independent attachment inspection was blocked by this review environment.

Priority: P2
Reviewed head: 25b90df636458be30e75b30b61f6e202bc4db0df

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with meaningful preservation coverage and reported before/after visual proof; no actionable correctness finding remains.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The captured body reports inspected before/after Chromium captures exercising imported user and assistant bubbles through the UI with a mocked Gateway, showing wrapper removal and preserved Markdown/code. This is appropriate visual evidence for the changed presentation owner; independent image retrieval failed in this review environment.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The captured body reports inspected before/after Chromium captures exercising imported user and assistant bubbles through the UI with a mocked Gateway, showing wrapper removal and preserved Markdown/code. This is appropriate visual evidence for the changed presentation owner; independent image retrieval failed in this review environment.
Evidence reviewed 7 items Verified patch scope: The host's complete merge-base-to-head evidence identifies only the UI projection, its two consumers, and regression tests. Its verified test merge preserves the base-only update-command work.
Importer and display contract: The Gateway copy path wraps catalog text with source unknown and includeWarning false. The importer trims the frame, adds optional item labels, and persists a catalog-prefixed idempotency key; transcript readers expose that key in __openclaw. These are OpenClaw-owned contracts, without a dependency-specific Codex requirement.
Still necessary on inspected main: Main's extraction path still processes raw imported text without this projection, and its normalizer likewise lacks the projection. The new helper is absent from the supplied latest-release tree; no merged fixing PR is established by the related context.
Findings None None.
Security None None.

How this fits together

The Gateway wraps imported catalog history before storing it. The Control UI reads those messages and prepares their text for chat bubbles, search, replies, and copying.

flowchart TD
  A[Catalog history] --> B[Gateway trust wrapping]
  B --> C[Stored transcript]
  C --> D[UI checks import metadata and complete frame]
  D --> E[Display copy without wrapper]
  D --> F[Preserve unmatched text]
  E --> G[Chat, search, reply and copy]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - Independent inspection of the attached before/after images was unavailable because this review environment could not retrieve GitHub attachments; the visual assessment relies on the captured body's explicit inspection report.
Agent review details

Security

None.

PR surface

Source +56, Tests +187. Total +243 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 3 59 3 +56
Tests 1 187 0 +187
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 246 3 +243

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +56 net lines; tests +187 lines Production growth provides one shared projection for two existing consumers; tests cover visible behavior and preservation boundaries.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one shared presentation projection for imported history while retaining the original trust framing in stored and model-facing messages.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one shared presentation projection for imported history while retaining the original trust framing in stored and model-facing messages.

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

Yes, from source: Gateway catalog copies persist the generated frame, and inspected main passes it into chat presentation without removing it. No runtime reproduction was executed in this review.

Is this the best way to solve the issue?

Yes. A shared, non-mutating UI projection matches the importer contract and keeps display and text actions consistent without rewriting history or weakening model-facing framing.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3d602cd4172f.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports inspected before/after Chromium captures exercising imported user and assistant bubbles through the UI with a mocked Gateway, showing wrapper removal and preserved Markdown/code. This is appropriate visual evidence for the changed presentation owner; independent image retrieval failed in this review environment.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The captured body reports inspected before/after Chromium captures exercising imported user and assistant bubbles through the UI with a mocked Gateway, showing wrapper removal and preserved Markdown/code. This is appropriate visual evidence for the changed presentation owner; independent image retrieval failed in this review environment.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: Imported chat readability is a concrete, bounded UI defect without evidence of an urgent runtime or delivery failure.
  • 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): The captured body reports inspected before/after Chromium captures exercising imported user and assistant bubbles through the UI with a mocked Gateway, showing wrapper removal and preserved Markdown/code. This is appropriate visual evidence for the changed presentation owner; independent image retrieval failed in this review environment.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports inspected before/after Chromium captures exercising imported user and assistant bubbles through the UI with a mocked Gateway, showing wrapper removal and preserved Markdown/code. This is appropriate visual evidence for the changed presentation owner; independent image retrieval failed in this review environment.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The captured body reports inspected before/after Chromium captures exercising imported user and assistant bubbles through the UI with a mocked Gateway, showing wrapper removal and preserved Markdown/code. This is appropriate visual evidence for the changed presentation owner; independent image retrieval failed in this review environment.

Evidence

What I checked:

Likely related people:

  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-06T17:54:30.719Z sha 20d0ea2b4e63eb80c7e1d6ba3b3d53cf7d608535 :: needs changes before merge. :: none

Keep catalog-import framing in stored and model-facing history while projecting only the message body into chat display, search, reply, and copy surfaces. Require import provenance and a complete matching wrapper; retain literal examples and malformed text.

Worked on by:
- @fuller-stack-dev

Co-authored-by: fuller-stack-dev <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/beam-hide-import-trust-markers branch from 20d0ea2 to 25b90df Compare September 6, 2026 18:08
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 6, 2026
@roboclaw-bot
roboclaw-bot merged commit a00168b into main Sep 6, 2026
141 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/beam-hide-import-trust-markers branch September 6, 2026 18:22
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via rebase.

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: M 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