Skip to content

fix(ui): bound realtime Talk conversation text - #117581

Merged
vincentkoc merged 6 commits into
mainfrom
fix/talk-conversation-text-cap-20260801
Aug 1, 2026
Merged

vincentkoc merged 6 commits into
mainfrom
fix/talk-conversation-text-cap-20260801

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Related: #116201

What Problem This Solves

Fixes an issue where a long browser Realtime Talk turn could retain an indefinitely growing conversation bubble even though the conversation already limits itself to 60 entries.

Why This Change Was Made

The Control UI conversation-state owner now caps each merged user or assistant entry at 8,000 UTF-16 code units. It keeps a small leading context for late authoritative-final replacement detection, retains the newest useful transcript tail, marks the omitted middle, and uses the shared surrogate-safe slicing primitive.

The bound is applied after existing provider-specific merge behavior, so OpenAI-style full finals still replace streamed drafts and Google-style tail finals still append. No transport, provider, config, environment-variable, protocol, or SDK surface changes.

User Impact

Long-running Talk sessions can no longer retain unbounded text in a single rendered conversation row. Recent speech remains visible, final transcripts still settle correctly, and Unicode text is not split into invalid surrogate halves.

Evidence

  • Current-main reproduction before the fix: 5 new focused cases failed; observed retained rows reached 8,437 and 15,742 UTF-16 code units.
  • Refreshed focused suite: 15/15 passed, including natural-marker regressions at UTF-16 offsets 255 and 256.
  • Exact feature-head hosted changed gate: passed UI/core-test typechecks, type-aware lint, formatting, i18n, dead-export, dependency, and repository guards.
  • P1 autoreview: clean, no findings; patch rated correct at 0.93.
  • Targeted oxfmt, oxlint, and git diff --check: passed.
  • Current-main refresh had no touched-path overlap; both scoped file blobs remained unchanged.

No screenshot is included because this is a stress-path memory bound rather than a visual layout change.

AI-assisted implementation; maintainer-reviewed.

* origin/main:
  refactor(plugins): consolidate registry snapshots (#117561)
  fix(plugins): fail blocked enable commands (#117536)
  test(secrets): dedupe runtime state fixtures (#117563)
* origin/main:
  refactor(policy): centralize doctor health-check descriptors (#117578)
  perf(gateway): mark recovery before model preparation (#117544)
  fix(openai): keep embedding identity stable across upgrades (#117557)
  fix(googlechat): drop invalid thread resource names before send (#108324)
  fix(skills): preserve profile in ClawHub command hints (#117555)
  fix(cli): explain filtered plugin policy without unsafe recovery (#117556)
  fix(irc): strip markdown from outbound text (#112961)
@vincentkoc vincentkoc self-assigned this Aug 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 1, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 1, 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 repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. labels Aug 1, 2026
@clawsweeper clawsweeper Bot added the P2 Normal backlog priority with limited blast radius. label Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 3:35 PM ET / 19:35 UTC.

ClawSweeper review

What this changes

This PR caps each browser Realtime Talk conversation entry at 8,000 UTF-16 code units while preserving an initial transcript prefix, the newest tail, final-transcript merge behavior, and valid Unicode surrogate boundaries.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for ordinary owner review. The current Control UI state owner is source-reproducible as retaining unbounded text within one streamed row, and this branch applies a focused bound at that owner without changing transport, provider, configuration, or SDK contracts; the prior marker-boundary finding is covered by the refreshed implementation and regressions. Because the author is a repository member and the PR carries the protected maintainer label, it should not be auto-closed or routed to an automated repair lane.

Priority: P2
Reviewed head: 07822aaefdb249c2678bea03cca6c8db4863a650

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused state-owner repair with targeted regression coverage and no remaining discrete correctness finding; it awaits normal member-owner review and completion of the exact-head hosted checks.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a member-authored PR, so the external-contributor real-behavior gate does not apply; its body nevertheless supplies before/after focused-suite results and a hosted changed-gate link for maintainer review.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a member-authored PR, so the external-contributor real-behavior gate does not apply; its body nevertheless supplies before/after focused-suite results and a hosted changed-gate link for maintainer review.
Evidence reviewed 8 items Current-main defect path: Current main limits the number of conversation entries but stores a new entry's full trimmed text and keeps merged transcript text without a per-entry character bound. Assistant streaming therefore can retain arbitrary text in one of the 60 retained rows.
Runtime owner and caller: Realtime Talk session callbacks send every transcript update through this conversation-state owner, publish its entries to the UI state, and request rendering; bounding at this layer prevents retained state growth rather than only hiding text in a renderer.
Proposed owner-boundary repair: The PR applies the bound after existing user/assistant merge logic, including the new-entry path, then preserves a 256-code-unit prefix plus newest tail using the shared surrogate-safe slice helper.
Findings None None.
Security None None.

How this fits together

Realtime Talk sends incremental user and assistant transcripts into Control UI conversation state, which is then rendered as Talk bubbles. The changed state owner merges provider-specific transcript updates and now limits the retained text for each individual bubble before the UI renders it.

flowchart LR
  A[Realtime Talk transcript events] --> B[Conversation state owner]
  B --> C[Provider-specific transcript merge]
  C --> D[Safe per-entry text bound]
  D --> E[Rendered Talk conversation bubbles]
  E --> F[Bounded browser session memory]
Loading

Before merge

  • Resolve merge risk (P1) - The branch is cleanly mergeable, but the supplied exact-head hosted check matrix still had several lanes in progress; wait for the normal exact-head merge gates rather than infer their outcome from the earlier focused evidence.
  • Complete next step (P2) - No narrow repair remains to automate; this member-authored, maintainer-labeled bug fix needs ordinary area-owner review and the normal exact-head CI gate.
Agent review details

Security

None.

PR surface

Source +32, Tests +131. Total +163 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 34 2 +32
Tests 1 131 0 +131
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 165 2 +163

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the bound in the Control UI conversation-state owner, keep the focused merge and Unicode regressions, and land it once the responsible owner accepts the exact head and its normal hosted checks finish.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the bound in the Control UI conversation-state owner, keep the focused merge and Unicode regressions, and land it once the responsible owner accepts the exact head and its normal hosted checks finish.

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

Yes, by source: current main concatenates streamed assistant transcript updates into a retained entry while only limiting entry count, not entry text length. The PR body also records focused pre-fix failures, but this read-only review did not execute them locally.

Is this the best way to solve the issue?

Yes. Bounding text after the existing provider-specific merge at the conversation-state owner constrains the retained object that feeds rendering; a renderer-only truncation would leave the memory-retention defect intact, while transport limits would not cover all merged transcript shapes.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This fixes bounded retained text in a limited but user-visible Realtime Talk browser path without evidence of a broader runtime outage or data-loss event.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a member-authored PR, so the external-contributor real-behavior gate does not apply; its body nevertheless supplies before/after focused-suite results and a hosted changed-gate link for maintainer review.

Evidence

What I checked:

Likely related people:

  • steipete: Git blame attributes the current conversation entry creation and merge path to the commit that introduced the Realtime Talk conversation module. (role: original feature contributor; confidence: high; commits: 060a541c9276; files: ui/src/pages/chat/realtime-talk-conversation.ts, ui/src/pages/chat/chat-realtime.ts)
  • vincentkoc: Module history includes prior Talk work by Vincent Koc, and this PR continues that established Control UI conversation-state area. (role: recent area contributor; confidence: high; commits: c5372430b3e2, 07822aaefdb2; files: ui/src/pages/chat/realtime-talk-conversation.ts, ui/src/pages/chat/realtime-talk-conversation.test.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-01T19:16:27.672Z sha 35799b6 :: found issues before merge. :: [P2] Do not treat an in-band marker as prior truncation
  • reviewed 2026-08-01T19:24:45.339Z sha 07822aa :: needs maintainer review before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Addressed the P2 on 07822aaefdb249c2678bea03cca6c8db4863a650: retained prefixes now always pass through sliceUtf16Safe, a trailing lone high surrogate is removed at the retained boundary, and focused regressions cover natural markers at UTF-16 offsets 255 and 256. Focused Talk conversation suite: 15/15 passed.

@clawsweeper

clawsweeper Bot commented Aug 1, 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 repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. and removed 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. labels Aug 1, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 1, 2026 19:30
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 1, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer landing record for the requested no-squash merge:

  • Exact PR head: 07822aaefdb249c2678bea03cca6c8db4863a650
  • Frozen main parent: 165c968f951c8fc3a863409bf14f91256aee5321
  • Signed two-parent merge: 2f92c17db6e3f46e59c979038b1e476bdb2628a2
  • Parents: 165c968f951c8fc3a863409bf14f91256aee5321 07822aaefdb249c2678bea03cca6c8db4863a650

The repo-native prepare and merge verification passed. GitHub rejected the native merge only because merge commits are disabled, so this preserves the reviewed signed history without squashing.

Merged-tree proof:

  • 15/15 focused Talk conversation tests passed.
  • Scoped oxfmt, git diff --check, and merge signature verification passed.
  • Exact-head full CI passed with 63 successful jobs and no failures or cancellations.
  • ClawSweeper re-review reported no findings or rank-up moves after the UTF-16 boundary correction.

@vincentkoc
vincentkoc merged commit 2f92c17 into main Aug 1, 2026
150 of 161 checks passed
@vincentkoc
vincentkoc deleted the fix/talk-conversation-text-cap-20260801 branch August 1, 2026 19:40
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* commit '9c1371650528331a39a57634b7c136be1b49f5f6':
  fix(ui): preserve Talk transcript surrogate bounds
  fix(ui): harden Talk transcript marker bounds
  test(ui): cover bounded realtime Talk entries
  fix(ui): bound realtime Talk conversation text
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. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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