Skip to content

fix(ui): keep Talk answers after timeout and cleanup - #172159

Merged
steipete merged 5 commits into
openclaw:mainfrom
masatohoshino:fix/split-talk-detach-on-failure
Oct 15, 2026
Merged

steipete merged 5 commits into
openclaw:mainfrom
masatohoshino:fix/split-talk-detach-on-failure

Conversation

@masatohoshino

@masatohoshino masatohoshino commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #172157

What Problem This Solves

Fixes: split browser Talk (talk.realtime.mode: "stt-tts") cancels an accepted agent turn and loses its answer when the two-minute voice wait expires or the page cleans up the call.

User Impact

Slow answers continue into chat history after Talk stops waiting. The timeout now says, “Talk stopped waiting. The agent's answer will appear in chat when it finishes.” Leaving the chat, losing the connection, or switching to Read aloud also leaves accepted work running. Stop voice input still cancels that call's run. Detached answers are not spoken later.

Why This Change Was Made

The Gateway owns accepted chat work and history; Talk owns capture, playback, and its wait. This applies the existing #171377 contract—failure cleanup detaches; explicit Stop aborts—through the shared page/session teardown and split transport. The first close disposition also governs a late chat.send acknowledgment, so cleanup cannot cancel the run after its acknowledgment arrives. The relay consumes the same close options, removing its separate close wrapper. Direct WebRTC and provider-websocket consult behavior is unchanged.

Original fix by @masatohoshino; maintainer cleanup covers the remaining non-user close paths, late acknowledgments, clearer timeout copy, and focused regressions. Contributor commit attribution is retained, with verified human coauthor credit in the cleanup commit.

Evidence

  • Source/history: current main still routes split Talk fail() through aborting stop(); the path originated in c4649b0a64a6. The separate relay repair in 6b274894dc15 does not repair split Talk. Issue/search/history collision checks found no other repair for this issue.
  • Regression tests in ui/src/pages/chat/talk/split.test.ts: leaves the accepted run running when waiting for its answer times out; detaches the accepted run when %s supersedes Talk (page cleanup and Read aloud); preserves the %s disposition when chat admission acknowledges late (Stop and cleanup). Existing stopping during the model response aborts the owned run and ignores late output remains. All new timing uses fake timers/deferred acknowledgments, with no real sleeps or polling.
  • PR CI is the test gate and covers the changed UI tests, related Talk suites, typechecks, and broader selected checks. Local unit tests, typechecks, negative controls, screenshots, and live Gateway proof were intentionally skipped per maintainer policy; no Crabbox/Testbox lease was created. The first exact-head CI passed all 20 split-Talk tests in checks-ui (2/3) (job 116268458450), reporting 69.9 ms of test time for the file; new regressions took 1–5 ms each. Standalone process wall time was not measured. These results precede the test-only lifecycle expectation follow-up.
  • Changed-file static oxlint and oxfmt pass; git diff --check passes. The nested checkout lacks its own dependencies, so installed parent tools were used without installation. Static oxlint retained the core rules and applicable overrides, excluding only the unavailable, nonmatching ui/**/*.tsx plugin override; this PR changes .ts, not .tsx.
  • Deslop removed the redundant relay close wrapper and shortened the cleanup comment. Production LOC is +42/-27 (net +15), tests +99/-3, docs +10/-2. The production increase carries the existing disposition through the owners, preserves it across late admission, and adds localized timeout copy; unrelated deletions were not added to meet a numerical target.
  • Review: the full latest original ClawSweeper review (comment 6169728530) reported no findings; no human/inline findings existed. Precommit review identified only the old index snapshot's cleanup bug, resolved by staging this revision. Final branch autoreview: scoped-clean through P2, no accepted/actionable findings. The CI follow-up also received a scoped-clean P0–P2 review. Current main was merged without conflicts; the reviewed Talk implementation is unchanged by both merges.
  • Exact-head CI: 38689323007 passed for 7456ea218118456e9684fc05672793ecf1488357 (includes main fc10ecb7990a601e86e1d71cee876b9f500b586e): all 35 selected checks passed, including all three UI unit shards, selected UI E2E, Node tests, lint, production/test typechecks, docs, i18n, and openclaw/ci-gate. First run 38688275121 passed 27 checks, including production/test types, lint, i18n, and selected UI E2E. Its UI unit shard exposed three old lifecycle expectations for the now-explicit detach option; those assertions are corrected without changing production code or weakening close-count/transcript checks. Six Node jobs failed before execution on the pinned actions/setup-go codeload 404, matching scheduled-main run 38687324602, job 116265300406 and PR job 116268458594. The archive returned HTTP 200 at 05:52 UTC; the follow-up push passed fresh CI with corrected assertions and the unchanged action pin. No infrastructure failure remains on the final head.

Captured facts in deferred cleanup: cancellation uses the originating client, session key, and run identity; a late acknowledgment is cancelled only when that same transport's recorded first close disposition is abort. Those identities intentionally continue to refer to the original call, not a newly selected route. Capture/playback cleanup stays instance-owned. Detach queues no run mutation, and no config, paths, limits, or persistence policy are added.

Contributor's earlier behavior evidence

At original head 4a622ea287bcb1ddf9172e434a69716af90fceb2, the contributor recorded Chromium plus an isolated Gateway and a 130-second mock model: main sent chat.abort at 120 seconds and lost the answer; the original fix omitted that abort and retained the answer after reload; explicit Stop still aborted. This evidence predates the maintainer cleanup and has not been rerun here.

Original before Original after
Original timeout cancels answer Original fix retains answer

Split browser Talk aborted its accepted chat run whenever the transport failed, including the 120-second answer wait. Failure cleanup now leaves the run to finish in the conversation; explicit Stop still aborts it, matching the Gateway relay transport.
@clawsweeper

clawsweeper Bot commented Oct 14, 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 docs Improvements or additions to documentation app: web-ui App: web-ui size: XS labels Oct 14, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Oct 14, 2026
@clawsweeper

clawsweeper Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

The PR lets accepted Talk requests finish after timeout or non-user cleanup while explicit Stop still cancels them.

Example: A split Talk question takes 130 seconds to answer.

  • Before: At 120 seconds, Talk aborts the agent request and the answer never reaches chat.
  • After: Talk stops waiting, explains where the answer will appear, and lets the request finish without speaking the detached answer.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The focused implementation appears correct and useful, but the supplied real-browser evidence predates its expanded cleanup behavior.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A slow Talk answer disappears because browser timeout or cleanup cancels work the Gateway already accepted.
Reason: The repair restores the existing accepted-work ownership contract, retains user cancellation, and includes feature-owner cleanup on the PR branch.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it repairs answer loss still present on current main, preserves explicit Stop cancellation, and has no identified actionable code defects.

Priority: P1
Reviewed head: 7456ea218118456e9684fc05672793ecf1488357

Before merge

  • Add real behavior proof - Inspected Chromium/Gateway screenshots from the original head support timeout answer retention after reload, but the later page/session teardown and late-acknowledgment changes have only mocked transport coverage. Provide a recording or browser/Gateway trace of the current implementation showing timeout copy and retained history, cleanup or Read aloud without chat.abort or late speech, and delayed admission preserving cleanup versus explicit Stop; redact IPs, keys, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: Current-implementation browser/Gateway evidence does not cover non-user teardown, delayed admission, or the revised timeout message, and the new regressions have no reported failing-base run.
Agent review details

How this fits together

Browser Talk submits transcribed speech through normal chat admission; the Gateway owns accepted agent work and history, while Talk owns microphone capture, playback, and its local wait.

flowchart LR
  A[Microphone input] --> B[Split Talk transport]
  B --> C[Gateway chat admission]
  C --> D[Agent execution]
  D --> E[Conversation history]
  D --> F[Talk answer wait]
  F --> G[Speech playback]
Loading

Technical review

Best possible solution:

Keep accepted agent work under Gateway ownership and carry the existing detach-versus-abort contract through every Talk cleanup path.

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

Current-main source directly connects the 120-second wait failure to chat.abort, matching the paired report's browser and Gateway traces; this read-only review ran no target code.

Is this the best way to solve the issue?

The implementation fixes the cancellation owner rather than extending the timeout, reuses the existing close contract, and preserves explicit Stop and suppression of detached speech.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 520302d8ee63.

Provenance checked

  • Split Talk failure and late admission changes intended behavior with a stated reason (c4649b0: Configured split speech was introduced using ordinary chat admission and shared speech owners; its common stop path also canceled accepted work.)
  • Page and session teardown changes intended behavior with a stated reason (c4a6c17: Transport retirement centralizes lifecycle cleanup and voice replacement; the PR deliberately separates that cleanup from user-requested cancellation.)
  • Gateway relay close behavior keeps the original intent (6b27489: Failure cleanup must detach before callbacks can invoke Stop, while explicit Stop aborts accepted work.)
  • Shared answer-wait timeout keeps the original intent (4581d2a: The shared waiter reports timeout to its caller; the optional message preserves existing callers while explaining split Talk's detached-answer outcome.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Current main still contains the defect: The fetched main implementation routes split Talk failures through stop(), which sends chat.abort for the active run; its closed-admission branch also aborts a late acknowledgment unconditionally. (ui/src/pages/chat/talk/split.ts, 520302d8ee63)
  • Introduced repair preserves cancellation intent: The reviewed patch records the first close disposition, aborts late acknowledgments only for explicit abort, forwards cleanup disposition through the session owner, and removes the relay's redundant close wrapper. (ui/src/pages/chat/talk/split.ts:132, 7456ea218118)
  • Reported production boundary: The paired report documents Chromium and an isolated Gateway with a 130-second model response: chat.abort occurs at 120 seconds, followed by an aborted run and missing answer after reload.
  • Original intent and feature history: Split Talk was added by c4649b0 to reuse configured transcription, chat, and speech owners; the merged relay repair separately establishes failure-detaches and explicit-Stop-aborts behavior. (ui/src/pages/chat/talk/split.ts:23, c4649b0a64a6)
  • Inspected browser proof has narrower coverage: The downloaded before/after images show the original timeout error and subsequent answer retention after reload. The PR explicitly identifies these captures as evidence from the original head, before the session-cleanup and late-admission changes; the other prepared screenshots show earlier speech functionality. (4a622ea287bc)
  • Live PR state: GitHub confirms the reviewed head remains open, non-draft, and cleanly mergeable; no human reviews or requested reviewers were returned. Peter Steinberger requested this re-review. (7456ea218118)

Likely related people:

  • Peter Steinberger: Raw commit c4649b0 adds ui/src/pages/chat/talk/split.ts:22 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c4649b0a64a6; files: ui/src/pages/chat/talk/split.ts)
  • Vincent Koc: Raw commit a2679ca adds ui/src/pages/chat/realtime-talk.ts:302 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: a2679ca314e3; files: ui/src/pages/chat/realtime-talk.ts)

PR surface

Source +15, Tests +96, Docs +8. Total +119 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 42 27 +15
Tests 2 99 3 +96
Docs 2 10 2 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 151 32 +119

Review metrics

Metric Value Why it matters
Production versus test LOC Production +42/-27; tests +99/-3 The modest production growth carries close disposition through existing owners and late admission; the tests cover timeout, supersession, and explicit cancellation without real sleeps.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • remove proof: sufficient: Current real behavior proof status is insufficient, not sufficient.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: 📣 needs proof.

Label justifications:

  • P1: Current main cancels accepted split Talk requests after two minutes, losing slow answers from the conversation.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

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

  • Provide current-implementation browser/Gateway evidence for cleanup and delayed admission alongside explicit Stop.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-14T13:39:23.550Z sha 4a622ea :: needs maintainer review before merge. :: none

Reviewed October 15, 2026, 2:13 AM ET / 06:13 UTC (Revision 2).

steipete and others added 2 commits October 14, 2026 22:41
Keep cleanup disposition through page/session teardown and late admission acknowledgments. Explicit Stop still cancels; timeout tells users the answer will appear in chat. Reuse the existing Talk close contract and remove the relay close wrapper.

Co-authored-by: Masato Hoshino <[email protected]>
@steipete steipete changed the title fix(ui): split browser Talk cancels the agent's answer when it takes longer than two minutes fix(ui): keep Talk answers after timeout and cleanup Oct 15, 2026
@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Oct 15, 2026
@steipete
steipete merged commit 16cb6ce into openclaw:main Oct 15, 2026
111 of 113 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

steipete added a commit that referenced this pull request Oct 15, 2026
Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).
steipete added a commit that referenced this pull request Oct 15, 2026
Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).
steipete added a commit that referenced this pull request Oct 15, 2026
* refactor(ui): consolidate chat owners and remove obsolete adapters

Keep both live rendering routes and the existing DOM, text, persisted shapes,
security boundaries, draft durability, and ordinary session concurrency.
Consolidate effective-tool loading, header registration, transcript refs,
history target capture, and PCM output ownership. Remove unused adapters
after their completed native-control cutovers and redundant internal work.

Best-effort tradeoffs accepted:
- Pending-page/live-update overlap: #145240 records synthetic request-order
  proof, not a cited human incident. Displayed disposition can briefly lag
  until the next ordinary refresh; durable receipts remain authoritative.
- Synchronous rail self-retirement: #153245 records a synthetic benchmark,
  not a cited human incident. Focus restoration is best effort in that case.
- Obsolete intersection callbacks: #142227 records synthetic E2E proof, not
  a cited stale-delivery incident. Target maps ignore retired rows; a late
  callback can request redundant layout.
- Obsolete mutation callbacks: the same #142227 provenance. Native disconnect
  remains; a late delivery can resample the current scroller.
- Obsolete resize callbacks: #162617 records synthetic performance traces,
  not a cited stale-delivery incident. Native cleanup remains; a late callback
  can sample current layout.
- Wrong bundled Gateway PR identity: #148070/#147952 describe the feature,
  not a wrong-target incident. The producer constructs the exact requested
  target; a contract violation now displays its returned result.
- Cross-tab prefetch election: #125128 covered a retired five-session idle
  sweep with synthetic performance proof. Two tabs can now redundantly read
  one explicitly hover/focus-intended target; per-tab limits remain.
- Malformed internal sidebar maps: #113712 introduced feature normalization,
  not a cited incident. Settings validates load/save and all callers use that
  output; impossible malformed typed values are not repaired at every update.

* refactor(ui): consolidate chat lifecycle and internal state paths

Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: #158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  #125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: #158335 added reply persistence
  and #166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: #146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: #171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report #171310 and fixes #171377/#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: c399fb7
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: #123874 flattened the flexible
  #113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 5716bb1 (tests/support excluded).

* test(ui): align talk fixtures with transport contracts

Require detach disposition when append rejection closes the relay. The UI and
Gateway ship together; the prior fallback's omitted field is no longer valid.

Close the Google socket before start settles when testing startup rejection.
Synchronous frame decoding removed the fixture's former artificial decode
microtask; waiting one turn now settles start before the close. Preserve all
error, callback, microphone, socket and timer assertions.

No production change or new best-effort tradeoff. The preceding commit records
the accepted transport assumptions and their provenance.

* refactor(agents): consolidate runner lifecycle plumbing

Share lifecycle hook capture, native policy loops and gated diagnostic content
construction. Combine initial session metadata updates through the existing
writer and reuse the persisted-input notifier. Keep delivery evidence in a
typed WeakMap without mutating or wrapping frozen error objects.

Security checks, public contracts, transcript durability, parallel tool
correlation and ordinary shutdown settlement remain. No schema, configuration,
dependency, protocol or public SDK signature changes. The standalone session
memory backend and its lifecycle machinery are untouched.

Best-effort tradeoffs accepted:
- Reusing the same engine during active disposal no longer has a WeakRef
  tombstone rejection. #168789 cites synthetic #143426/#143592 disposal cases,
  not a human production report. Misuse may fail in the engine normally;
  closing admission and actual resource settlement remain.
- Fresh bounded primitive diagnostics are not redundantly cloned before
  publication (#108304). Listener egress still isolates its payloads.
- Internal delivery-evidence readers receive the attachment-time snapshot,
  not another defensive copy (0ea0807). No human mutation report was found;
  unsupported internal mutation could affect a later reader. Confirmed-send
  suppression and attachment-time copying remain.

Lane y08: 105 net production lines removed (165 added / 270 removed), excluding
tests; tests add 67 net lines. Below-500 branch-only handoff for coordinator
bundling after recent, older and largest-owner audits found no further sound
candidate. No PR or hosted-CI success is claimed.

Proof: production and affected test types, changed-file lint/format, runtime
and madge cycles (zero), lint-suppressions (3/3), and independent P2 review
passed. Maintenance resources (6/6), CLI spawn (40/40), and restart recovery
(33/33) completed. Support proof was stopped after ten minutes without an
assertion result; Gateway cancellation timed out during startup/imports with
no assertion result, and deletion was not reached. CLI reliability was only
partially exercised in an earlier interrupted selection. These are unresolved
proof gaps, not attributed main failures.

* refactor(agents): remove duplicate runner preparation work

Trust canonical inline model modalities and waiter-owned cleanup. Fold the
sole-caller HTTP setup wrapper and stage warning predicate into their owners,
and remove an unused diagnostic clock option.

This pass removes 32 net production lines; the branch total is 137. Core and
affected test types, lint, format, cycle checks, stage timing and suppression
tests pass. Independent P2 review is clean. Wider focused runtime selections
remain incomplete under host load; coordinator bundling needs broad CI proof.

* refactor: withdraw inconclusive stream cleanup and repair bundle ratchets

Retain current main stream-state contracts after the UI failure replay could not establish an exact-main comparison. Shrink the delivery-evidence assertion allowance and keep its frozen/primitive regression intact in a focused unit file.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
* fix(ui): keep accepted split Talk runs after client failures

Split browser Talk aborted its accepted chat run whenever the transport failed, including the 120-second answer wait. Failure cleanup now leaves the run to finish in the conversation; explicit Stop still aborts it, matching the Gateway relay transport.

* fix(ui): detach accepted Talk turns during non-user cleanup

Keep cleanup disposition through page/session teardown and late admission acknowledgments. Explicit Stop still cancels; timeout tells users the answer will appear in chat. Reuse the existing Talk close contract and remove the relay close wrapper.

Co-authored-by: Masato Hoshino <[email protected]>

* test(ui): expect detachment during Talk lifecycle cleanup

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Masato Hoshino <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…w#173015)

* refactor(ui): consolidate chat owners and remove obsolete adapters

Keep both live rendering routes and the existing DOM, text, persisted shapes,
security boundaries, draft durability, and ordinary session concurrency.
Consolidate effective-tool loading, header registration, transcript refs,
history target capture, and PCM output ownership. Remove unused adapters
after their completed native-control cutovers and redundant internal work.

Best-effort tradeoffs accepted:
- Pending-page/live-update overlap: openclaw#145240 records synthetic request-order
  proof, not a cited human incident. Displayed disposition can briefly lag
  until the next ordinary refresh; durable receipts remain authoritative.
- Synchronous rail self-retirement: openclaw#153245 records a synthetic benchmark,
  not a cited human incident. Focus restoration is best effort in that case.
- Obsolete intersection callbacks: openclaw#142227 records synthetic E2E proof, not
  a cited stale-delivery incident. Target maps ignore retired rows; a late
  callback can request redundant layout.
- Obsolete mutation callbacks: the same openclaw#142227 provenance. Native disconnect
  remains; a late delivery can resample the current scroller.
- Obsolete resize callbacks: openclaw#162617 records synthetic performance traces,
  not a cited stale-delivery incident. Native cleanup remains; a late callback
  can sample current layout.
- Wrong bundled Gateway PR identity: openclaw#148070/openclaw#147952 describe the feature,
  not a wrong-target incident. The producer constructs the exact requested
  target; a contract violation now displays its returned result.
- Cross-tab prefetch election: openclaw#125128 covered a retired five-session idle
  sweep with synthetic performance proof. Two tabs can now redundantly read
  one explicitly hover/focus-intended target; per-tab limits remain.
- Malformed internal sidebar maps: openclaw#113712 introduced feature normalization,
  not a cited incident. Settings validates load/save and all callers use that
  output; impossible malformed typed values are not repaired at every update.

* refactor(ui): consolidate chat lifecycle and internal state paths

Continue the y01 largest-owner, export/caller and duplicate-helper audit.
Delegate composer mounting to the canonical interop boundary while retaining
field equality, keyed renderer identity and foreground picker cleanup. Remove
test-only panel refresh methods and commit counters; exercise the actual view,
polling and committed DOM instead. Trust admitted immutable composer metadata
and the full tool-stream owner contract. Narrow sidebar traversal to its
normalized single column and simplify browser/Gateway realtime decoding.

Both shipping Lit/Solid paths and rendered markup remain unchanged. No config,
protocol, storage, dependency, security-boundary or Phase E backend changes.

Best-effort tradeoffs accepted

- Malformed internal tool-stream hosts: openclaw#158032 introduced shape probes during
  a bookkeeping refactor, not a human incident. Real owners have complete state;
  a broken internal caller now fails rather than silently skipping cleanup.
  openclaw#125197's human steering/order report still justifies the unchanged causal
  reconciliation algorithm; no report ties malformed-host probes to that bug.
- In-place mutation of admitted draft metadata: openclaw#158335 added reply persistence
  and openclaw#166682 moved the annotation copies, without a mutation incident. Actual
  editors replace records/arrays. A future in-place mutator must follow that
  contract or it may alter a pending snapshot. Durable receipts/revisions stay.
- Non-JSON relay events: openclaw#146676 added transport machinery without a human
  cyclic-frame incident. Frames already crossed JSON decoding; an impossible
  internal cycle or BigInt now throws. Activation count/byte bounds remain.
- Older Gateway close-disposition support: openclaw#171377 added a compatibility path,
  but UI/Gateway ship together and the current server advertises the field.
  Unsupported skew now rejects. Accepted-answer durability from the real human
  report openclaw#171310 and fixes openclaw#171377/openclaw#172159 remains intact.
- Blob/typed-array/arbitrary Google message representations: 2a4c20f
  added these alternate decoder branches without a linked human report. The
  browser WebSocket is configured as arraybuffer before listeners. Unsupported
  synthetic representations are ignored; actual strings/ArrayBuffers still
  decode, and removal of the artificial await needs no post-await stale check.
- Extra sidebar columns after normalization: openclaw#123874 flattened the flexible
  openclaw#113712 layout to one tabbed panel. A broken internal producer is no longer
  searched as a multi-column layout; persisted legacy flattening still runs.

The earlier commit records the original eight accepted best-effort scenarios.
Coverage and remaining justified owners are logged in .local/y01-ledger.md for
coordinator bundling. Combined candidate removes 416 net production lines
against 7f7310a (tests/support excluded).

* test(ui): align talk fixtures with transport contracts

Require detach disposition when append rejection closes the relay. The UI and
Gateway ship together; the prior fallback's omitted field is no longer valid.

Close the Google socket before start settles when testing startup rejection.
Synchronous frame decoding removed the fixture's former artificial decode
microtask; waiting one turn now settles start before the close. Preserve all
error, callback, microphone, socket and timer assertions.

No production change or new best-effort tradeoff. The preceding commit records
the accepted transport assumptions and their provenance.

* refactor(agents): consolidate runner lifecycle plumbing

Share lifecycle hook capture, native policy loops and gated diagnostic content
construction. Combine initial session metadata updates through the existing
writer and reuse the persisted-input notifier. Keep delivery evidence in a
typed WeakMap without mutating or wrapping frozen error objects.

Security checks, public contracts, transcript durability, parallel tool
correlation and ordinary shutdown settlement remain. No schema, configuration,
dependency, protocol or public SDK signature changes. The standalone session
memory backend and its lifecycle machinery are untouched.

Best-effort tradeoffs accepted:
- Reusing the same engine during active disposal no longer has a WeakRef
  tombstone rejection. openclaw#168789 cites synthetic openclaw#143426/openclaw#143592 disposal cases,
  not a human production report. Misuse may fail in the engine normally;
  closing admission and actual resource settlement remain.
- Fresh bounded primitive diagnostics are not redundantly cloned before
  publication (openclaw#108304). Listener egress still isolates its payloads.
- Internal delivery-evidence readers receive the attachment-time snapshot,
  not another defensive copy (8c995fb). No human mutation report was found;
  unsupported internal mutation could affect a later reader. Confirmed-send
  suppression and attachment-time copying remain.

Lane y08: 105 net production lines removed (165 added / 270 removed), excluding
tests; tests add 67 net lines. Below-500 branch-only handoff for coordinator
bundling after recent, older and largest-owner audits found no further sound
candidate. No PR or hosted-CI success is claimed.

Proof: production and affected test types, changed-file lint/format, runtime
and madge cycles (zero), lint-suppressions (3/3), and independent P2 review
passed. Maintenance resources (6/6), CLI spawn (40/40), and restart recovery
(33/33) completed. Support proof was stopped after ten minutes without an
assertion result; Gateway cancellation timed out during startup/imports with
no assertion result, and deletion was not reached. CLI reliability was only
partially exercised in an earlier interrupted selection. These are unresolved
proof gaps, not attributed main failures.

* refactor(agents): remove duplicate runner preparation work

Trust canonical inline model modalities and waiter-owned cleanup. Fold the
sole-caller HTTP setup wrapper and stage warning predicate into their owners,
and remove an unused diagnostic clock option.

This pass removes 32 net production lines; the branch total is 137. Core and
affected test types, lint, format, cycle checks, stage timing and suppression
tests pass. Independent P2 review is clean. Wider focused runtime selections
remain incomplete under host load; coordinator bundling needs broad CI proof.

* refactor: withdraw inconclusive stream cleanup and repair bundle ratchets

Retain current main stream-state contracts after the UI failure replay could not establish an exact-main comparison. Shrink the delivery-evidence assertion allowance and keep its frozen/primitive regression intact in a focused unit file.
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 docs Improvements or additions to documentation P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Split browser Talk cancels the agent's answer when it takes longer than two minutes

2 participants