Skip to content

fix(chat): prevent duplicate renderer requests and thinking messages#870

Merged
hazeone merged 5 commits intomainfrom
cursor/clawx-streaming-fix-20260417
Apr 18, 2026
Merged

fix(chat): prevent duplicate renderer requests and thinking messages#870
hazeone merged 5 commits intomainfrom
cursor/clawx-streaming-fix-20260417

Conversation

@hazeone
Copy link
Copy Markdown
Contributor

@hazeone hazeone commented Apr 18, 2026

Summary

The chat occur duplicate renderer requests and thinking messages

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other

Checklist

  • I ran relevant checks/tests locally.
  • I updated docs if behavior or interfaces changed.
  • I verified there are no unrelated changes in this PR.

@hazeone hazeone marked this pull request as ready for review April 18, 2026 07:23
@hazeone hazeone merged commit 24b4333 into main Apr 18, 2026
6 checks passed
@hazeone hazeone deleted the cursor/clawx-streaming-fix-20260417 branch April 18, 2026 07:23
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0b7759fcc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/stores/chat.ts
Comment on lines +300 to +301
if (sameText && (!optimisticAttachments || !candidateAttachments) && (timestampMatches || !hasCandidateTimestamp)) return true;
if (sameAttachments && (!optimisticText || !candidateText) && (timestampMatches || !hasCandidateTimestamp)) return true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add recency guard for timestamp-less optimistic matches

matchesOptimisticUserMessage now treats a history user message with no timestamp as a match based on text or attachments alone (timestampMatches || !hasCandidateTimestamp). During an active send, if older history entries are missing timestamps and the user repeats a prior prompt (or same attachment set), loadHistory can conclude the current optimistic prompt is already present and skip appending it, causing the latest user turn to disappear from the UI until later events arrive. Please require a recency signal when candidate timestamps are absent (for example, compare against lastUserMessageAt via message order or another run-scoped marker).

Useful? React with 👍 / 👎.

DigitalNomad-Chat added a commit to DigitalNomad-Chat/ClawX that referenced this pull request Apr 26, 2026
… dedupe (ValueCell-ai#821 ValueCell-ai#845 ValueCell-ai#870 ValueCell-ai#873 ValueCell-ai#875 ValueCell-ai#878 ValueCell-ai#880 ValueCell-ai#885 ValueCell-ai#886 ValueCell-ai#887 ValueCell-ai#891 ValueCell-ai#903)

Overhaul execution graph card (collapse/expand, narration steps, web_fetch links),
separate thinking messages, render LaTeX math, dedupe optimistic messages,
hide recoverable gateway timeouts, add startup history recovery.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants