Skip to content

Fix streaming UI message dedupe#281

Draft
robelest wants to merge 1 commit into
get-convex:mainfrom
robelest:robel/fix-ui-message-dedupe-276
Draft

Fix streaming UI message dedupe#281
robelest wants to merge 1 commit into
get-convex:mainfrom
robelest:robel/fix-ui-message-dedupe-276

Conversation

@robelest
Copy link
Copy Markdown
Collaborator

@robelest robelest commented Jun 3, 2026

Summary

  • Deduplicate persisted and streaming UI messages before recombining split assistant messages.
  • Add regression coverage for a streamed assistant step that duplicates a persisted step.

Fixes #276.

Root Cause

combineUIMessages merges assistant steps that share an order. Running dedupe after that merge loses the original per-step stepOrder, so a streaming duplicate can fail to match the persisted step it replaces.

Validation

  • git diff --check
  • npm run build
  • npm run test
  • npm run typecheck
  • npm run lint

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 3, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@convex-dev/agent@281

commit: fa1c44f

Copy link
Copy Markdown
Member

@ianmacartney ianmacartney left a comment

Choose a reason for hiding this comment

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

looks reasonable

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-Line Fix - useUIMessages: streaming duplicates caused by dedup running after combineUIMessages

2 participants