Conversation
added 11 commits
May 30, 2026 07:17
The fresh-chat send path echoes the same user turn twice within one run. The first echo carries the optimistic clientMessageId/idempotencyKey and is confirmed + consumed; the second arrives decorated with a real messageId, no idempotency key, and a HIGHER live sequence than the confirmed turn. The existing seq-only guard (incoming <= confirmed) missed it live, so the duplicate user bubble rendered (only the later history backfill caught it). Match recent confirmed user echoes by run id as well, which targets the duplicate while keeping genuine repeated sends (different run) visible. Extract the match predicate into a pure matchRecentConfirmedUserEcho() and add unit + integration coverage.
…inator Temporary diagnostic: the runId-based dedupe did not fire for the new-chat duplicate because the second user echo arrives without a runId in the payload. Log the raw top-level + __openclaw keys of every non-optimistic user echo so we can choose the correct field to match on, then remove this.
…rder in both turn directions
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Co-authored-by: Developer <dev@example.com>
* Render tool calls as flight recorder rows * Extract nested tool row subjects * Avoid redundant chat send recovery polling * Keep tool rows in call order * Fold delayed stripped user echoes * Replace live assistant rows on backfill * Match live assistant replacement to latest final * Collapse tool steps by default * Keep tool rows collapsed by default * Show errored tool results in realtime * Detect wrapped errored tool results * Show chat tool error output blocks * Render nested tool error payloads in chat * Do not toast stopped chats as errors * Show aborted run marker in chat * Place aborted marker inside assistant turn --------- Co-authored-by: Developer <dev@example.com>
* Rename activity panel to subagents * Redesign subagents panel dashboard * Make subagents tab list-first * Open subagents in main chat area * Preserve chat rows when switching subagents * Delay initial chat scroll until fresh bootstrap * Respect default open tool steps * Revert "Respect default open tool steps" This reverts commit a070b24. * Make steps section collapsible * Smooth live assistant text streaming * Limit streaming animation to active assistant * Abort stale chat bootstrap before new chat send * Merge live tool calls into final assistant row * Persist only touched compat collections on chat create * Prevent assistant answers from coalescing across turns --------- Co-authored-by: Developer <dev@example.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the chat ordering / duplication / tool-card class of bugs by establishing a single canonical ordering key (
openclaw_seq) end-to-end, instead of multiple seq sources that disagreed.Changes
1a23a230):confirmOptimisticUserno longer moves the optimistic user seq tobaseSeq + gatewaySeq(which overshot and collided with same-run assistant/tool rows).openclaw_seqis treated as order, not identity; late rows landing on an occupied seq with a different messageId append instead of overwriting. Frontend: removed the divergenttimelineStoresorter, delegating to the single sharedsortChatMessagesByTimeline.fdc603fb): send-path history persist now drops stripped prior-turn gateway user echoes via the same confirmed-user guard the live/backfill paths use (isConfirmedUserDuplicate). Narrowed the collision-append so same-role/same-text replays overwrite in place.c5dfd698):chatHistoryParser.messageOrderSeqnow trusts canonical__openclaw.seqfirst;gatewaySeqis fallback only. Fixessessions_spawn/subagent-spawn cards sorting below their own replies.2e25c42e):applyPatches.inferAssistantSeqFromRunanchors a live assistant/tool message to at leastrunUser.gatewayIndex + 1, so it never momentarily renders above the user message during streaming.d43961ce): updateddocs/constraints/chat-engine.mdwith the canonical-seq invariants.Tests
Verification
Verified live against a running instance: persisted sessions are monotonic with zero collisions and zero stripped-echo duplicates; subagent + tool-call ordering correct. Live flicker fix confirmed in-app.