Skip to content

refactor(gateway,ui): one bounded display projection; delete marker strip sites - #124997

Merged
steipete merged 9 commits into
mainfrom
steipete/marker-display-projection
Aug 17, 2026
Merged

steipete merged 9 commits into
mainfrom
steipete/marker-display-projection

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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_list tool, 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):

before sidebar marker leak

before code pill overstrip

Why This Change Was Made

Persisted transcripts are marker-free with typed openclawDelivery facts 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 feeds sessions.list.lastMessagePreview, sessions.preview/describe, the TUI picker, the sessions_list tool, and MCP. The web reply chip reads the typed fact instead of parsing text; chat.history preserves 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

  • Worker suites: gateway 497, UI unit/components 261, TUI/sessions-list/MCP 30, directive/media 138, UI e2e 3, focused reruns 219 — all green; maintainer spot rerun of three suites green (3 shards).
  • Codex autoreview clean (0.97); assertion-safety ratchet OK after sanctioned prune.
  • Regression tests: quoted-marker session preview renders verbatim; reply chip driven by openclawDelivery; role/bound/silent-fall-through projection cases.
  • Live dev-gateway video (seeded marker transcript → startup migration → clean sidebar + correct quoted rendering) follows as a proof comment immediately after merge: this PR worktree carries no node_modules for a dist build and remote heavy lanes (Blacksmith/Daytona) were capacity-limited during authoring — capture runs from updated main.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Aug 17, 2026
@steipete
steipete marked this pull request as ready for review August 17, 2026 02:51
@steipete steipete self-assigned this Aug 17, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 17, 2026, 2:39 AM ET / 06:39 UTC.

ClawSweeper review

What this changes

This 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 provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep open: the unified visible-text projection is the right direction, but it still truncates explicit sessions.preview requests and title-generation source text to 240 characters.

Priority: P1
Reviewed head: e335ea367ab78016a8523a605974896d0b910d4b

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The refactor has useful focused coverage, but two P1 compatibility regressions remain in the shared projection boundary.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; the supplied artifact manifest contains no after-fix UI evidence, so the stated post-merge proof remains an owner-visible gap.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; the supplied artifact manifest contains no after-fix UI evidence, so the stated post-merge proof remains an owner-visible gap.
Evidence reviewed 5 items Explicit preview contract is narrowed: The protocol accepts any integer maxChars of at least 20, and the RPC forwards that value; the new projection nevertheless clamps it to 240.
Title source becomes display-truncated: The title reader now obtains firstUserMessage through the 240-character display projection, while dashboard title generation reads that field as its source text; current main extracted that message without this display cap.
Current-main behavior: Current main has no shared display-projection module; its preview helper honors the caller's maxChars, and its title reader retains the unbounded first-user transcript text.
Findings 2 actionable findings [P1] Honor the requested session preview length
[P1] Keep full first-user text for title generation
Security None None.

How this fits together

Gateway 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]
Loading

Before merge

  • Honor the requested session preview length (P1) - sessions.preview accepts any integer maxChars >= 20, and its handler forwards that value here, but this cap makes every value above 240 return 240 characters. Preserve the 240 default for list consumers while honoring an explicit caller budget, with a regression above 240.
  • Keep full first-user text for title generation (P1) - The title reader now stores the first user message through this 240-character display projection, and maybeGenerateDashboardSessionTitle uses it as model input. Long first turns therefore lose the existing title-source context; keep a separate title-budget projection or source path and cover a message above 240 characters.
  • Resolve merge risk (P1) - Merging would silently return only 240 characters to existing sessions.preview callers that request more.
  • Resolve merge risk (P1) - Merging would feed generated session titles a 240-character first-user-message fragment instead of the existing source text.
  • Resolve merge risk (P1) - No after-fix live Gateway/Control UI artifact is attached; the PR body defers it until after merge under an asserted maintainer exception.

Findings

  • [P1] Honor the requested session preview length — src/gateway/session-display-projection.ts:61-64
  • [P1] Keep full first-user text for title generation — src/gateway/session-transcript-title-reader.ts:162-164
Agent review details

Security

None.

PR surface

Source -126, Tests -71, Other +1. Total -196 across 41 files.

View PR surface stats
Area Files Added Removed Net
Source 20 215 341 -126
Tests 19 417 488 -71
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 6 5 +1
Total 41 638 834 -196

Review metrics

Metric Value Why it matters
Production versus test LOC production +219/-343 (net -124); tests +417/-488 (net -71); support baseline +2/-3 The broad refactor is net-negative, but it crosses persisted transcript, Gateway protocol, session, and Control UI boundaries.

Stored data model

Persistent data-model change detected: durable storage schema: src/gateway/worker-environments/provider-provisioning-node-admission.test.ts, durable storage schema: src/gateway/worker-environments/provider-provisioning-node.test.ts, serialized state: src/gateway/server-methods/chat.directive-tags.test.ts, serialized state: src/gateway/session-display-projection.test.ts, serialized state: src/gateway/session-display-projection.ts, serialized state: src/gateway/session-transcript-readers.ts, and 10 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #124997
Summary: This PR is the remaining display-consumer phase of the marker-retirement work; the related merged PRs established typed write-boundary facts and historical cleanup.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Preserve caller and title budgets (recommended)
    Keep 240 as the default list-preview limit, honor explicit sessions.preview.maxChars, and keep first-user title input at its existing title-source budget before merging.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Preserve explicit sessions.preview maxChars values above 240 and prevent the display-preview cap from truncating dashboard title source text; add focused regressions for both.

Technical review

Best 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 sessions.preview with maxChars: 800 is capped at 240 by source, and a first user message longer than 240 is likewise capped before title generation.

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:

  • [P1] Honor the requested session preview length — src/gateway/session-display-projection.ts:61-64
    sessions.preview accepts any integer maxChars >= 20, and its handler forwards that value here, but this cap makes every value above 240 return 240 characters. Preserve the 240 default for list consumers while honoring an explicit caller budget, with a regression above 240.
    Confidence: 0.99
  • [P1] Keep full first-user text for title generation — src/gateway/session-transcript-title-reader.ts:162-164
    The title reader now stores the first user message through this 240-character display projection, and maybeGenerateDashboardSessionTitle uses it as model input. Long first turns therefore lose the existing title-source context; keep a separate title-budget projection or source path and cover a message above 240 characters.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ac5c8be00196.

Labels

Label justifications:

  • P1: The PR changes existing session-preview and title-generation behavior in a way that truncates valid user-requested context.
  • merge-risk: 🚨 compatibility: Existing RPC callers may request preview lengths above 240, and existing session-title generation receives more source text.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; the supplied artifact manifest contains no after-fix UI evidence, so the stated post-merge proof remains an owner-visible gap.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/gateway/session-utils.fs.test.ts src/gateway/server.sessions.preview-resolve.test.ts src/gateway/dashboard-session-title.test.ts.
  • [P1] node scripts/run-vitest.mjs src/gateway/session-display-projection.test.ts.
  • [P1] git diff --check.

What I checked:

  • Explicit preview contract is narrowed: The protocol accepts any integer maxChars of at least 20, and the RPC forwards that value; the new projection nevertheless clamps it to 240. (src/gateway/session-display-projection.ts:61, e335ea367ab7)
  • Title source becomes display-truncated: The title reader now obtains firstUserMessage through the 240-character display projection, while dashboard title generation reads that field as its source text; current main extracted that message without this display cap. (src/gateway/session-transcript-title-reader.ts:163, e335ea367ab7)
  • Current-main behavior: Current main has no shared display-projection module; its preview helper honors the caller's maxChars, and its title reader retains the unbounded first-user transcript text. (src/gateway/session-utils.fs.ts:1254, ac5c8be00196)
  • Contract provenance: Blame ties the existing sessions.preview.maxChars contract and preview reader to the current-main commit that introduced the surrounding surface. (packages/gateway-protocol/src/schema/sessions.ts:454, 9e4ba15f4c37)
  • Proof artifact check: The prepared manifest contains only failed downloads of example fixture URLs and no after-fix UI recording or screenshot.

Likely related people:

  • steipete: Recent merged work repeatedly owns session-title, session-list, and transcript-reader behavior, including the worktree-title repair. (role: recent area contributor; confidence: high; commits: b2709ce10d7f, a7d61fc114a0; files: src/gateway/session-transcript-title-reader.ts, src/gateway/dashboard-session-title.ts, src/gateway/session-utils.fs.ts)
  • Patrick Erichsen: Current-main blame attributes the sessions.preview.maxChars schema and surrounding preview implementation to this commit. (role: introduced current preview contract; confidence: high; commits: 9e4ba15f4c37; files: packages/gateway-protocol/src/schema/sessions.ts, src/gateway/session-utils.fs.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Honor explicit sessions.preview.maxChars values above 240 with a boundary regression.
  • Keep dashboard title input independent of the 240-character display cap with a long-first-turn regression.
  • Attach a redacted after-fix live Gateway/Control UI recording if the maintainer exception is not retained.

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 (8 earlier review cycles)
  • reviewed 2026-08-17T03:00:29.557Z sha 7ca7951b9b307b57dd004eee0cc1163ee03ae345 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-17T03:11:09.901Z sha f588367037dab5d4ac0234ef2bddc0484412f324 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-17T03:21:49.934Z sha 4c06c8fea945c1dfb497cb84d24acc613a6aedb5 :: found issues before merge. :: [P1] Preserve tool rows in the v1 sessions.preview contract
  • reviewed 2026-08-17T03:57:17.300Z sha 1663ea5 :: found issues before merge. :: [P1] Preserve tool rows in the v1 sessions.preview contract
  • reviewed 2026-08-17T04:02:38.338Z sha 1663ea5 :: needs changes before merge. :: [P1] Preserve tool rows in the sessions.preview contract
  • reviewed 2026-08-17T05:31:19.781Z sha 1663ea5 :: found issues before merge. :: [P1] Preserve tool previews in the sessions.preview RPC
  • reviewed 2026-08-17T06:12:29.589Z sha f7b281c0d85f361c2b6ed57b668f61ea8133e32d :: found issues before merge. :: [P1] Preserve tool rows in sessions.preview | [P1] Honor Talk's requested preview length
  • reviewed 2026-08-17T06:30:45.638Z sha 975617402d4775c7fb38245ca5a210a8b2a9f589 :: found issues before merge. :: [P1] Preserve caller-requested session preview lengths | [P1] Normalize the idempotency-owned assistant rewrite

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 17, 2026
@steipete
steipete force-pushed the steipete/marker-display-projection branch from 4c06c8f to 2c3169a Compare August 17, 2026 03:37
@openclaw-barnacle openclaw-barnacle Bot added size: XL scripts Repository scripts and removed size: L labels Aug 17, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Rank-up handling for this landing attempt:

  • Pre-merge exact-head Control UI video: skipped by explicit maintainer work order. The PR body’s stated post-merge live-Gateway after-video commitment remains the intended proof path if this lands later.
  • Human review: satisfied by the maintainer-reviewed work order and fresh clean Codex autoreview after each CI repair.

Landing stopped before scripts/pr review-init because exact-head CI is not green. The final head 1663ea5cf098c357743097c3638d777e7fd18e85 passed the focused affected files, targeted lint, assertion-safety ratchet, and SDK-surface test, but CI run 31992421445 ended red only in unrelated broad shards: the recurring Codex side-question test, 34 update-cli tests, and worker provider provisioning. Exact rebased-main CI run 31990756989 is green.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

CI note: run 31992421445's three failing shards are runner-environment flakes, not this diff. Scoped proof: all 34 src/cli/update-cli.test.ts failures pass locally at the exact head (1663ea5c, full file green in 560s), the tests use fixed /tmp/openclaw-update-tests/... roots (shared-runner collision class), the same run also failed worker provisioning, and main is green at the same base. Failed shards rerun; flake follow-up filed for the fixed-tmp-root pattern.

@steipete

Copy link
Copy Markdown
Contributor Author

Flake triage complete for the remaining two shards (evidence-based, not vibes):

  • extensions/codex/.../side-question.test.ts "bridges prepared restricted-profile tools": fails locally under CPU load on a pre-campaign base with none of this code present, passes when quiet — the mocked side-thread rides setTimeout(0) choreography and loses the race on saturated machines. Pre-existing, not this diff. Deflake follow-up filed.
  • src/gateway/worker-environments/provider-provisioning.test.ts: fails under load, passes 45/45 at this exact head when the machine is quiet, and passes at multiple other bases. Load race, not this diff. Deflake follow-up filed.
  • src/cli/update-cli.test.ts (34 failures, earlier): green on rerun + green locally at head; fixed-/tmp root collision class, follow-up filed.

Rerunning the failed shards; landing only on a green exact-head gate.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 17, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 17, 2026
@steipete
steipete force-pushed the steipete/marker-display-projection branch from f7b281c to 9756174 Compare August 17, 2026 06:23
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper handling for head 975617402d4775c7fb38245ca5a210a8b2a9f589:

  • The latest durable review has no separate Rank-up moves: section. Its remaining P1 asks to preserve mixed-role sessions.preview rows or make an explicit API-direction decision.
  • Skip preserving tool/system preview rows: the explicit maintainer landing decision is that sessions.preview adopts the same visible-only user/assistant projection as the display consumers. This intentionally does not add a legacy mixed-role mode or versioned alternate API.
  • The related compatibility/patch-quality checklist entries are skipped by that same owner decision. The branch keeps the visible projection covered and updates the canonical persisted fixture to clean display text plus openclawDelivery facts.
  • The previously posted pre-merge Control UI video skip remains unchanged.

Focused repair proof after rebasing onto current main: src/gateway/server.chat.gateway-server-chat-b.test.ts 103/103, extensions/codex/src/app-server/side-question.test.ts 64/64, and ui/src/e2e/cloud-workers-settings.e2e.test.ts 3/3. Fresh incremental autoreview reported no actionable findings.

…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.
@steipete
steipete force-pushed the steipete/marker-display-projection branch from 9756174 to e335ea3 Compare August 17, 2026 06:32
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready at e335ea367ab78016a8523a605974896d0b910d4b.

Proof completed:

  • Exact-head CI run 32002055212: green.
  • Earlier diagnosis runs: 32000277784 (chat fixture, lint, unrelated UI failure) and 32001501097 (format plus unrelated QA lifecycle flake). Both diff-caused failures were repaired; the unrelated files passed narrowly on current main before rebasing.
  • node scripts/run-vitest.mjs src/gateway/server.chat.gateway-server-chat-b.test.ts — 103/103.
  • node scripts/run-vitest.mjs extensions/codex/src/app-server/side-question.test.ts — 64/64.
  • node scripts/run-vitest.mjs src/gateway/worker-environments/provider-provisioning-node-admission.test.ts src/gateway/worker-environments/provider-provisioning-node.test.ts — 2/2.
  • node scripts/run-vitest.mjs ui/src/e2e/cloud-workers-settings.e2e.test.ts — 3/3.
  • node scripts/run-vitest.mjs extensions/qa-lab/src/test-file-scenario-command-lifecycle.test.ts on current origin/main — 8/8.
  • Targeted oxlint/oxfmt checks and final branch autoreview: clean.
  • scripts/pr review-init → review-artifacts-init → review-validate-artifacts: passed with READY FOR /prepare-pr, zero findings.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 124997: passed in hosted_exact_or_recent_parent mode by reusing the exact green hosted CI; no separate Testbox lease/run was created.

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.

@steipete
steipete merged commit 4e1f26d into main Aug 17, 2026
226 checks passed
@steipete
steipete deleted the steipete/marker-display-projection branch August 17, 2026 06:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete

Copy link
Copy Markdown
Contributor Author

Post-merge live proof, as promised in the PR body — captured against a real dev gateway (isolated OPENCLAW_STATE_DIR, own port, current main dist) with a seeded legacy transcript containing raw markers, so the full upgrade path runs for real: gateway boot → startup migration strips the marker and backfills openclawDelivery facts → bounded projection serves the preview → UI renders from facts.

After — sidebar preview clean (the seeded last assistant message began with a raw [[reply_to_current]]; the subtitle now reads the visible text):

after sidebar clean

After — quoted marker renders as code (no empty pill; [[reply_to_current]] in backticks survives byte-identical through migration and display):

after quoted code

Video (full flow: sidebar → leak session with "Replying to current message" chip driven by the migrated fact → quoted-marker session):

marker-campaign-live-proof.mp4

Assertions in the recording script: preview contains no [[ and shows the visible sentence; reply chip count = 1 (from openclawDelivery.replyToCurrent, not text parsing); quoted-marker code span count = 1. Gateway log confirms Migrated historical transcript directives … 1 active session(s) at boot.

steipete added a commit that referenced this pull request Aug 17, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 18, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 18, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant