Repository navigation
fix(chat): hide untrusted frames in continue-imported Beam history - #197788
Conversation
Continue imports stored wrapExternalContent output untrimmed, so each frame began with an LF the anchored display unwrap rejected, leaving raw EXTERNAL_UNTRUSTED_CONTENT markers in Beam histories. Accept exactly that one LF for already-stored transcripts and trim new continue imports like preservation imports do.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Screenshot gate waived by maintainer for this PR: the change only alters which text a bubble shows. Before: raw |
|
Codex review: blocked before merge. What this changesThis PR hides generated trust frames in continued catalog history by accepting the previously stored leading newline and trimming new import wrappers. Example: A continued Beam contains the message “Keep this body”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this maintainer-authored PR addresses a source-confirmed display bug with a focused fix; no introduced correctness or security defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway copies external catalog items into session transcripts, and shared display projections convert those persisted messages into Control UI chat content. flowchart LR
A[Beam catalog] --> B[Gateway continuation]
B --> C[External content wrapper]
C --> D[Session transcript]
D --> E[Shared display projection]
E --> F[Control UI chat]
Technical reviewBest possible solution: Keep the shared display parser compatible with existing one-LF frames and normalize new continuation wrappers at the existing copy writer. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes the path: disabling wrapper warnings emits one leading LF, continuation persists it, and current main's anchored display matcher rejects it; no target code was executed during this review. Is this the best way to solve the issue? The patch is the smallest complete repair using existing owners: the parser handles already-imported messages, and the writer prevents the same separator mismatch in new imports without removing model-facing markers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against de6dc6249746. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests +14, Docs +1. Total +17 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 12, 2026, 10:09 AM ET / 15:09 UTC. |
|
Merged via squash.
|
…penclaw#197788) * fix(chat): unwrap continue-imported catalog frames in Control UI Continue imports stored wrapExternalContent output untrimmed, so each frame began with an LF the anchored display unwrap rejected, leaving raw EXTERNAL_UNTRUSTED_CONTENT markers in Beam histories. Accept exactly that one LF for already-stored transcripts and trim new continue imports like preservation imports do. * chore: drop release-owned changelog entry (note lives in PR body)
What Problem This Solves
Beam handoffs (and other session-catalog histories imported through
sessions.catalog.continue) show raw<<<EXTERNAL_UNTRUSTED_CONTENT id="…">>>/Source: Externalframes in Control UI. The---separator also turnsSource: Externalinto a markdown heading, so every imported message is a wall of security markers.User Impact
Imported Beam conversations read as normal chat again, including already-imported sessions. Stored history and model context keep their untrusted-content framing unchanged; this is display-only plus a trim on new continue imports.
Why This Change Was Made
wrapExternalContent(..., { includeWarning: false })joins an empty warning slot with"\n", so its output begins with one LF. Preservation imports.trim()it; the continue path (session-catalog-gateway-copy.ts) did not, so persisted frames start with\n<<<….IMPORT_FRAMEinsrc/chat/session-catalog-display.tsis anchored at^<<<, so the unwrap never matched. The existing tests also trimmed the wrapper, which is why nothing caught it.Evidence
sessions.catalog.continuerendered raw frames for every imported item.wrapExternalContentoutput, with and without aThinkinglabel, and moved the rejected-separator cases to two-LF forms.