Skip to content

fix(ui): prevent duplicate commentary during active runs - #158459

Merged
RomneyDa merged 1 commit into
mainfrom
openclaw/duplicate-output-in-control-ui
Oct 7, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
openclaw/duplicate-output-in-control-ui

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Persisted commentary could appear twice during an active Control UI run when its durable transcript row arrived before a cumulative chat delta.

Solution

The Gateway now includes its existing assistant producer identity and the current item's displayed start offset on optional chat-delta fields. The Control UI uses those facts to retire only the matching live occurrence while preserving earlier cumulative text and causal order.

The identity is cleared on unscoped replacement, rollover, history hydration, terminal settlement, and run reset. Metadata-free legacy events keep their existing behavior; no text-equality heuristic claims producer ownership.

Scope

  • Production: +199/−16 lines.
  • Tests: +145/−1 lines across two existing suites.
  • Total: 18 files, +344/−17.
  • Previous candidate: 22 files, +1,509/−50.

No persistent data model changes. itemId and itemStartOffset are optional protocol fields, so older producers and clients remain valid.

Evidence

  • Exact head: 9c61a7eac8c5; GitHub reports it conflict-free and mergeable against current main.
  • Focused regressions: 17/17 UI commentary tests; 22/22 Gateway projection/wire tests; 104/104 reconciliation/thread siblings.
  • Changed-suite local single-worker wall time: UI 3.88s; Gateway wire 45.55s cold (compiler preparation dominated).
  • Protocol registry, generation, native determinism, and vintage guard pass.
  • Repository check-changed gate passes: all core/core-test/UI type graphs, lint, formatting, line/suppression/assertion/database ratchets, dead exports, boundaries, and import cycles.
  • Mocked-Gateway browser flow passes 1/1 and renders the persisted commentary once in both history-first and delta-first orderings. Existing inspected before/after screenshots remain linked here.
  • Local review found and fixed stale identity on unscoped updates. ClawSweeper then found two continuation sequences: a saved item needed to remain as a hidden cumulative baseline, and unscoped appends needed to drop item authority. Both are fixed with admitted durable-row regressions; the focused follow-up review is clean.
  • Exact-head ClawSweeper re-review is clean: Platinum Hermit, proof sufficient, ready for maintainer look, and no accepted findings remain.
  • Natural CI's UI E2E shard failed only ui/src/e2e/chat-pull-requests.e2e.test.ts: three unrelated PR-chip spacing assertions measured 12 px against an 8 px test limit. Current main (45b18e215b5) reproduces the same three failures and measurements in an isolated worktree; this PR changes neither that test nor its CSS. The failure canceled the remaining CI fanout, so no rerun or rebase was spent to manufacture green.

The independent iOS/macOS shared-kit scans and final intersection are green. No CI reruns were requested.

@clawsweeper

clawsweeper Bot commented Sep 25, 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.

@RomneyDa
RomneyDa marked this pull request as ready for review September 25, 2026 23:54
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 2:37 AM ET / 06:37 UTC (Revision 15).

ClawSweeper review

What this changes

The PR adds optional assistant-item identity and display offsets to Gateway chat updates so the Control UI replaces saved commentary’s live copy while preserving surrounding text.

Merge readiness

✅ Ready for maintainer review

This remains a useful fix absent from current main. No blocking correctness findings remain; the prior continuation and stale-identity concerns are addressed. Related unmerged work does not supersede it.

Likely related people: @steipete and @shakkernerd, as routing candidates for Gateway streaming and chat presentation.

Priority: P2
Reviewed head: 6ccb4363e4a044da767ceef32fee923aa6be04f4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable repair with inspected visual evidence and meaningful regressions; no actionable blocking defect remains.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots demonstrate the changed Control UI presentation through an isolated mocked-Gateway browser flow; the captured body reports both durable-row arrival orderings. The latest source retains the reviewed reconciliation fixes. No stored-data contract changes require migration proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after screenshots demonstrate the changed Control UI presentation through an isolated mocked-Gateway browser flow; the captured body reports both durable-row arrival orderings. The latest source retains the reviewed reconciliation fixes. No stored-data contract changes require migration proof.
Evidence reviewed 10 items Pinned introduced change: Reviewed the verified main-to-head delta. The original head directly records the pinned main commit as its parent; the supplied test merge separately records main followed by this head.
Current-main gap: Main’s persistence pruning only removes keyed stream segments; it does not retire the matching current cumulative stream. Its chat-delta schema also lacks the new item identity and offset fields.
Producer-owned display boundary: The Gateway derives and caches the displayed item boundary after canonical text normalization, invalidating it on scope changes, replacement, clipping, and projection correction.
Findings None None.
Security None None.

How this fits together

The Gateway projects assistant output into live chat events and saved transcript rows. The Control UI reconciles those inputs into one ordered conversation display.

flowchart LR
  A[Assistant output] --> B[Gateway text projection]
  B --> C[Live text with item identity]
  A --> D[Saved transcript rows]
  C --> E[Control UI reconciliation]
  D --> E
  E --> F[Single ordered chat display]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +183, Tests +144. Total +327 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 16 199 16 +183
Tests 2 145 1 +144
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 344 17 +327

Review metrics

Metric Value Why it matters
Wire contract 2 optional chat-delta fields; no new configuration The repair carries producer facts through the existing event contract without adding a user-facing mode.
Production versus regression growth Production net +183 lines; tests net +144 lines Production growth is justified by producer boundary tracking, lifecycle invalidation, and ordered reconciliation rather than text-based deduplication.

Technical review

Best possible solution:

Keep producer identity authoritative and render each saved commentary occurrence once without suppressing distinct repeated text.

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

Yes, source establishes the sequence: a saved commentary row precedes its cumulative chat delta, while main only prunes keyed segments. I did not execute tests during this read-only review.

Is this the best way to solve the issue?

Yes, the patch uses existing producer identity and projection owners, preserves cumulative continuation, and avoids a competing text-equality deduplication policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Duplicate commentary is a bounded chat presentation defect, with no demonstrated loss of durable messages or core availability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after screenshots demonstrate the changed Control UI presentation through an isolated mocked-Gateway browser flow; the captured body reports both durable-row arrival orderings. The latest source retains the reviewed reconciliation fixes. No stored-data contract changes require migration proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots demonstrate the changed Control UI presentation through an isolated mocked-Gateway browser flow; the captured body reports both durable-row arrival orderings. The latest source retains the reviewed reconciliation fixes. No stored-data contract changes require migration proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots demonstrate the changed Control UI presentation through an isolated mocked-Gateway browser flow; the captured body reports both durable-row arrival orderings. The latest source retains the reviewed reconciliation fixes. No stored-data contract changes require migration proof.

Evidence

What I checked:

  • Pinned introduced change: Reviewed the verified main-to-head delta. The original head directly records the pinned main commit as its parent; the supplied test merge separately records main followed by this head. (6ccb4363e4a0)
  • Current-main gap: Main’s persistence pruning only removes keyed stream segments; it does not retire the matching current cumulative stream. Its chat-delta schema also lacks the new item identity and offset fields. (ui/src/pages/chat/stream-segment-pruning.ts:318, eb1b48c58b61)
  • Producer-owned display boundary: The Gateway derives and caches the displayed item boundary after canonical text normalization, invalidating it on scope changes, replacement, clipping, and projection correction. (src/gateway/server-chat-state.ts:307, 6ccb4363e4a0)
  • Prior findings resolved: Pruning retains consumed cumulative bytes as a hidden baseline, and metadata-free deltas clear item identity. The added regressions exercise admitted durable rows in both arrival orders, subsequent identified output, and an unscoped append. (ui/src/pages/chat/stream-segment-pruning.ts:369, 6ccb4363e4a0)
  • Re-review continuity: GitHub’s earlier-head file metadata and local blob identities match for the Gateway projection, UI event handler, pruning owner, and commentary regression suite. The preceding completed review reported no findings; its older history is bounded. (ui/src/pages/chat/stream-segment-pruning.ts:340, 9c61a7eac8c5)
  • Inspected rendered proof: Inspected both prepared screenshots from fix(ui): prevent duplicate commentary during active runs #158459 (comment): the reported before state repeats commentary, and the isolated mocked-Gateway browser after state displays one occurrence. The captured body reports both arrival orderings passing; this is browser presentation proof, not authenticated provider proof. (b3b4bf94bf18)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • shakkernerd: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (14 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T21:56:59.749Z sha 5ade074 :: blocked before merge. :: [P2] Measure the item offset after silent-token stripping
  • reviewed 2026-09-29T03:42:20.413Z sha 1f65fec5e46122113fe5e44f8df2f8ade2ef118c :: blocked before merge. :: [P2] Measure the item offset after silent-token stripping
  • reviewed 2026-09-29T04:03:12.390Z sha ffff37778b5ffbb92f128b3afc8a7e58c1454981 :: blocked before merge. :: [P2] Cache the displayed item boundary across live deltas
  • reviewed 2026-09-29T07:00:29.852Z sha 5670a67 :: blocked before merge. :: [P3] Record measured costs for the expanded test files
  • reviewed 2026-09-29T07:19:43.924Z sha 5670a67 :: blocked before merge. :: [P3] Record measured costs for the expanded test files
  • reviewed 2026-10-06T23:35:42.626Z sha 3b3b601455d6705a4cc278ac7837e20890da981a :: blocked before merge. :: [P2] Retain the consumed item as a cumulative baseline | [P2] Clear item ownership on unscoped append updates
  • reviewed 2026-10-06T23:46:00.498Z sha 9c61a7e :: needs maintainer review before merge. :: none
  • reviewed 2026-10-07T00:10:31.871Z sha 9c61a7e :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the openclaw/duplicate-output-in-control-ui branch from 33f5a8c to f40bb7f Compare September 26, 2026 00:26
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Sep 26, 2026
@RomneyDa
RomneyDa force-pushed the openclaw/duplicate-output-in-control-ui branch from f40bb7f to b3b4bf9 Compare September 28, 2026 02:32
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: L and removed size: S labels Sep 28, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

Rendered-state evidence

Sanitized before capture from the reported Control UI failure:

Before: commentary appears twice

Exact-head after capture from an isolated mocked-Gateway E2E on b3b4bf94bf1 (the chat delta includes the new assistant itemId contract):

After: persisted commentary appears once

The mocked-Gateway browser assertion found one rendered assistant row. No live Gateway, credentials, or personal state were used.

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
@RomneyDa
RomneyDa force-pushed the openclaw/duplicate-output-in-control-ui branch from b3b4bf9 to 56357e1 Compare September 28, 2026 06:45
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. 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: 🐚 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. labels Oct 6, 2026
@RomneyDa
RomneyDa force-pushed the openclaw/duplicate-output-in-control-ui branch from 3b3b601 to 9c61a7e Compare October 6, 2026 23:41
@RomneyDa

RomneyDa commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 6, 2026
@RomneyDa
RomneyDa force-pushed the openclaw/duplicate-output-in-control-ui branch from 9c61a7e to 6ccb436 Compare October 7, 2026 06:31
@RomneyDa
RomneyDa merged commit 4893be6 into main Oct 7, 2026
120 checks passed
@RomneyDa
RomneyDa deleted the openclaw/duplicate-output-in-control-ui branch October 7, 2026 06:55
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
steipete added a commit that referenced this pull request Oct 8, 2026
…7054)

* fix(gateway): retire live assistant text by exact occurrence identity

Control UI rendered run commentary twice mid-run: cumulative inFlightRun
snapshots replayed committed text beside paged history while bounded event
replay omitted most earlier commentary identities. Client text subtraction
could not reliably recover ownership from those partial views.

Give embedded runs, workers, CLI, ACP, Agents API and native Codex exact
assistant occurrence identities. Gateway retirement owns the unpersisted
live tail across snapshots, replacement deltas and display-final projection;
terminal delivery content remains complete. Native capture freezes occurrence
IDs before mirror persistence so later bytes cannot share an older receipt.
Decide silent-reply suppression from full available source, preserving the
existing trailing-token and directive policies.

Keep still-streaming unsaved text at the bottom of its run, below saved rows,
and give it a transcript position when saved. Steers remain below all run
output. Preserve completed commentary and saved-row causal order. Remove
client cumulative-prefix retirement, pending commentary handoffs, steer
splitting and redundant unreleased delta itemId/itemStartOffset fields.
Cap eviction may conservatively redisplay committed text; never infer
ownership to hide potentially unsaved output.

Builds on and supersedes the live-delta reconciliation from #158459; its regression suite is retained with ordering updated to the live-at-bottom invariant.

Rebased onto 278d66f, preserving main's native settlement helpers,
transcript authority checks and terminal identity reader consolidation.
Keep native provisional-stream decisions with the occurrence tracker and
move existing type/test support to their adjacent owners without ratchets.

Proof: all 144 focused files pass one at a time, including the 22-paragraph
production-shaped regression, all 17 retained acceptance cases plus reconnect,
and the seeded real-cap/reused-identity model (891 ms). Core, UI-test,
extension and Gateway test typechecks, protocol registry/generation/native
checks, scoped core/UI/extension lint, formatting and diff checks pass.
Full-range and refinement P2 autoreviews found no actionable findings.

Co-authored-by: Dallin Romney <[email protected]>

* fix(ui): apply hidden replacement frames to the live stream

A Gateway replacement frame can now carry an unpersisted tail that is a
bare silent token after its saved prefix retires. The delta handler skipped
silent and heartbeat text before applying replacements, so the previous
baseline stayed visible beside its durable row.

Treat a replacement as authoritative even when its new text is hidden: it
retracts the live stream instead of being ignored. Non-replacing silent
deltas are still ignored.

Proof: the new chat-gateway case fails before the change (expected
'The token is ' to be '') and passes after; chat-gateway (87),
commentary-dedupe acceptance (18) and inflight history (44) suites pass;
UI typecheck, oxfmt and diff checks pass.

* fix(agents): reconcile run identity additions with main

Align identical runId fields with the positions already added on main so Git does not produce duplicate properties in the PR merge tree. Preserves exact assistant occurrence retirement and complete ACP transcript persistence.

* fix(gateway): preserve canonical streaming order across clients

Publish canonical assistant events before their derived chat projection so SDK live consumers receive text once. Keep inflight snapshot projection and buffer contracts in leaf owners, migrate retained UI fixtures to the unsaved-text contract, preserve real compaction event exports, and shrink obsolete mock baseline entries.

* fix(gateway): retain commentary correction ordering

Apply the shared chat projection before commentary item delivery and after canonical assistant delivery. Preserve correction-before-preamble rendering and duplicate-free SDK delivery together; both existing regressions pass.

---------

Co-authored-by: Dallin Romney <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…nclaw#167054)

* fix(gateway): retire live assistant text by exact occurrence identity

Control UI rendered run commentary twice mid-run: cumulative inFlightRun
snapshots replayed committed text beside paged history while bounded event
replay omitted most earlier commentary identities. Client text subtraction
could not reliably recover ownership from those partial views.

Give embedded runs, workers, CLI, ACP, Agents API and native Codex exact
assistant occurrence identities. Gateway retirement owns the unpersisted
live tail across snapshots, replacement deltas and display-final projection;
terminal delivery content remains complete. Native capture freezes occurrence
IDs before mirror persistence so later bytes cannot share an older receipt.
Decide silent-reply suppression from full available source, preserving the
existing trailing-token and directive policies.

Keep still-streaming unsaved text at the bottom of its run, below saved rows,
and give it a transcript position when saved. Steers remain below all run
output. Preserve completed commentary and saved-row causal order. Remove
client cumulative-prefix retirement, pending commentary handoffs, steer
splitting and redundant unreleased delta itemId/itemStartOffset fields.
Cap eviction may conservatively redisplay committed text; never infer
ownership to hide potentially unsaved output.

Builds on and supersedes the live-delta reconciliation from openclaw#158459; its regression suite is retained with ordering updated to the live-at-bottom invariant.

Rebased onto 3b164e5, preserving main's native settlement helpers,
transcript authority checks and terminal identity reader consolidation.
Keep native provisional-stream decisions with the occurrence tracker and
move existing type/test support to their adjacent owners without ratchets.

Proof: all 144 focused files pass one at a time, including the 22-paragraph
production-shaped regression, all 17 retained acceptance cases plus reconnect,
and the seeded real-cap/reused-identity model (891 ms). Core, UI-test,
extension and Gateway test typechecks, protocol registry/generation/native
checks, scoped core/UI/extension lint, formatting and diff checks pass.
Full-range and refinement P2 autoreviews found no actionable findings.

Co-authored-by: Dallin Romney <[email protected]>

* fix(ui): apply hidden replacement frames to the live stream

A Gateway replacement frame can now carry an unpersisted tail that is a
bare silent token after its saved prefix retires. The delta handler skipped
silent and heartbeat text before applying replacements, so the previous
baseline stayed visible beside its durable row.

Treat a replacement as authoritative even when its new text is hidden: it
retracts the live stream instead of being ignored. Non-replacing silent
deltas are still ignored.

Proof: the new chat-gateway case fails before the change (expected
'The token is ' to be '') and passes after; chat-gateway (87),
commentary-dedupe acceptance (18) and inflight history (44) suites pass;
UI typecheck, oxfmt and diff checks pass.

* fix(agents): reconcile run identity additions with main

Align identical runId fields with the positions already added on main so Git does not produce duplicate properties in the PR merge tree. Preserves exact assistant occurrence retirement and complete ACP transcript persistence.

* fix(gateway): preserve canonical streaming order across clients

Publish canonical assistant events before their derived chat projection so SDK live consumers receive text once. Keep inflight snapshot projection and buffer contracts in leaf owners, migrate retained UI fixtures to the unsaved-text contract, preserve real compaction event exports, and shrink obsolete mock baseline entries.

* fix(gateway): retain commentary correction ordering

Apply the shared chat projection before commentary item delivery and after canonical assistant delivery. Preserve correction-before-preamble rendering and duplicate-free SDK delivery together; both existing regressions pass.

---------

Co-authored-by: Dallin Romney <[email protected]>
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 gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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