Repository navigation
refactor(gateway,ui): one bounded display projection; delete marker strip sites - #124997
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed August 17, 2026, 2:39 AM ET / 06:39 UTC. ClawSweeper reviewWhat this changesThis PR replaces scattered transcript-marker stripping with a shared Gateway display projection and typed delivery facts consumed by session previews, the Control UI, TUI, MCP, and session tools. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the unified visible-text projection is the right direction, but it still truncates explicit Priority: P1 Review scores
Verification
How this fits togetherGateway transcript readers turn persisted session rows into previews for the session list, RPC consumers, TUI, MCP, and title generation. The Control UI renders the resulting preview text and typed delivery facts rather than parsing marker-like text itself. flowchart TD
A[Persisted session transcripts] --> B[Gateway transcript readers]
B --> C[Visible-text projection]
C --> D[Session list and TUI picker]
C --> E[Session preview RPC]
C --> F[Dashboard title generator]
E --> G[Tools and MCP]
D --> H[Control UI]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource -126, Tests -71, Other +1. Total -196 across 41 files. View PR surface stats
Review metrics
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:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep one shared role/control filter, but reserve 240 characters for default list previews only; explicit RPC limits and the dashboard title source must retain their own caller budgets. Do we have a high-confidence way to reproduce the issue? Yes—an 800-character assistant row requested through Is this the best way to solve the issue? No—the shared filtering owner is appropriate, but a global display cap is not the best boundary for explicit RPC budgets or generated-title source text. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ac5c8be00196. LabelsLabel justifications:
EvidenceAcceptance criteria:
What 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 (8 earlier review cycles)
|
4c06c8f to
2c3169a
Compare
|
@clawsweeper re-review Rank-up handling for this landing attempt:
Landing stopped before |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
CI note: run 31992421445's three failing shards are runner-environment flakes, not this diff. Scoped proof: all 34 |
|
Flake triage complete for the remaining two shards (evidence-based, not vibes):
Rerunning the failed shards; landing only on a green exact-head gate. |
f7b281c to
9756174
Compare
|
ClawSweeper handling for head
Focused repair proof after rebasing onto current |
…trip sites Persisted transcripts are marker-free since the write-boundary projection (#124793), the historical migration (#124888), and TTS facts (#124913), so display surfaces stop compensating. sessions.list.lastMessagePreview and its siblings (sessions.preview/describe, TUI picker, sessions_list tool, MCP) now share one bounded role-aware projection (240 chars, tool/system/thinking and suppressed control replies excluded, directive-only rows fall through). The web reply chip reads the typed openclawDelivery fact instead of parsing text; chat.history preserves the field to the UI. Post-hoc display strips are deleted across web/TUI/MCP/sessions-list; live streaming cleaners stay. Stale gateway-protocol preview comments corrected; no schema change. Assertion-safety baseline pruned for shrunk files (sanctioned direction). Production net -173, tests net -137. Fixes the sidebar [[reply_to_current]] preview leak and the empty-code-pill overstrip of quoted markers.
9756174 to
e335ea3
Compare
|
Land-ready at Proof completed:
ClawSweeper handling is recorded in #124997 (comment). Known proof gap: the pre-merge Control UI video was explicitly skipped by the maintainer work order; the PR body retains the post-merge live-Gateway after-video commitment. |
|
Merged via squash.
|
|
Post-merge live proof, as promised in the PR body — captured against a real dev gateway (isolated After — sidebar preview clean (the seeded last assistant message began with a raw After — quoted marker renders as code (no empty pill; Video (full flow: sidebar → leak session with "Replying to current message" chip driven by the migrated fact → quoted-marker session): marker-campaign-live-proof.mp4Assertions in the recording script: preview contains no |
update-cli.test.ts used a fixed /tmp/openclaw-update-tests root with deterministic case-dir names; some cases write real fixture files there and cleanup rm -rf's them, so concurrent runs on one machine (CI shards, sibling checkouts) deleted each other's live fixtures — observed as 34 spurious failures on PR #124997 run 31992421445. migrate.test.ts had the same shape via a fixed mocked resolveStateDir root rm -rf'd in beforeEach/afterEach. Both suites now use per-run mkdtemp roots, realpath'd for the macOS /var -> /private/var symlink, removed on suite exit.
…trip sites (openclaw#124997) * refactor(gateway,ui): one bounded display projection; delete marker strip sites Persisted transcripts are marker-free since the write-boundary projection (openclaw#124793), the historical migration (openclaw#124888), and TTS facts (openclaw#124913), so display surfaces stop compensating. sessions.list.lastMessagePreview and its siblings (sessions.preview/describe, TUI picker, sessions_list tool, MCP) now share one bounded role-aware projection (240 chars, tool/system/thinking and suppressed control replies excluded, directive-only rows fall through). The web reply chip reads the typed openclawDelivery fact instead of parsing text; chat.history preserves the field to the UI. Post-hoc display strips are deleted across web/TUI/MCP/sessions-list; live streaming cleaners stay. Stale gateway-protocol preview comments corrected; no schema change. Assertion-safety baseline pruned for shrunk files (sanctioned direction). Production net -173, tests net -137. Fixes the sidebar [[reply_to_current]] preview leak and the empty-code-pill overstrip of quoted markers. * fix(agents): preserve restart recovery transcript reads * refactor(gateway): remove obsolete transcript exports * fix(gateway): normalize injected delivery directives * fix(ci): scope projection and recovery checks * chore(ci): shrink plugin SDK surface budgets * test: deflake loaded side question and worker checks * test: align display projection CI fixtures * style: format display projection fixture
…aw#125171) update-cli.test.ts used a fixed /tmp/openclaw-update-tests root with deterministic case-dir names; some cases write real fixture files there and cleanup rm -rf's them, so concurrent runs on one machine (CI shards, sibling checkouts) deleted each other's live fixtures — observed as 34 spurious failures on PR openclaw#124997 run 31992421445. migrate.test.ts had the same shape via a fixed mocked resolveStateDir root rm -rf'd in beforeEach/afterEach. Both suites now use per-run mkdtemp roots, realpath'd for the macOS /var -> /private/var symlink, removed on suite exit.


What Problem This Solves
Session-list subtitles leaked raw
[[reply_to_current]]markers (transcript-derived previews skipped every display normalization), while the chat renderer over-stripped markers quoted in backticks into empty code pills. Root cause: each display surface (web normalizer, sidebar, TUI picker,sessions_listtool, MCP) independently compensated for control syntax embedded in persisted text. Campaign finale — siblings: #124755, #124793, #124830, #124888, #124913.Before (sidebar leak; empty code pill in the same frame):
Why This Change Was Made
Persisted transcripts are marker-free with typed
openclawDeliveryfacts since #124793/#124888/#124913, so consumers stop compensating. One bounded role-aware projection (src/gateway/session-display-projection.ts: 240 chars UTF-16-safe, tool/system/thinking and suppressed control replies excluded, directive-only rows fall through) now feedssessions.list.lastMessagePreview,sessions.preview/describe, the TUI picker, thesessions_listtool, and MCP. The web reply chip reads the typed fact instead of parsing text;chat.historypreserves the field. All post-hoc display strips are deleted; live streaming cleaners remain (drafts still carry markers mid-run by design). Protocol comments corrected, no schema change. Assertion-safety baseline pruned for shrunk files.User Impact
Sidebar previews stop leaking control syntax; quoted marker examples render verbatim; previews stop selecting tool/reasoning text and respect the short-preview bound. Net −173 production LOC.
Evidence
openclawDelivery; role/bound/silent-fall-through projection cases.main.