fix(chat): prevent duplicate renderer requests and thinking messages#870
fix(chat): prevent duplicate renderer requests and thinking messages#870
Conversation
Co-authored-by: Haze <hazeone@users.noreply.github.com>
Co-authored-by: Haze <hazeone@users.noreply.github.com>
There was a problem hiding this comment.
💡 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".
| if (sameText && (!optimisticAttachments || !candidateAttachments) && (timestampMatches || !hasCandidateTimestamp)) return true; | ||
| if (sameAttachments && (!optimisticText || !candidateText) && (timestampMatches || !hasCandidateTimestamp)) return true; |
There was a problem hiding this comment.
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 👍 / 👎.
… 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.
Summary
The chat occur duplicate renderer requests and thinking messages
Type of Change
Checklist