Skip to content

fix(ui): stabilize assistant message accumulation#16

Merged
zhubby merged 3 commits intomainfrom
fix/sse-incremental-message-accumulation
Apr 16, 2026
Merged

fix(ui): stabilize assistant message accumulation#16
zhubby merged 3 commits intomainfrom
fix/sse-incremental-message-accumulation

Conversation

@zhubby
Copy link
Copy Markdown
Owner

@zhubby zhubby commented Apr 16, 2026

Summary

  • stabilize chat SSE accumulation by preserving turn-scoped assistant message identity across started, delta, and completed events
  • merge adjacent assistant chunks from the same turn so resumed threads and streaming replies render as a single message instead of duplicated or vertically fragmented bubbles
  • add regression coverage for adjacent assistant merging, live delta updates, resumed history reconstruction, and non-merge cases with intervening items

Test plan

  • cd kagent-ui && bun test \"lib/assistant/messages.test.ts\"
  • cd kagent-ui && bun x tsc --noEmit (currently blocked by pre-existing type errors in components/project/settings/notification-settings.tsx, components/project/settings/system-settings.tsx, and components/ui/chart.tsx)
  • cd kagent-ui && bun run lint (current script resolves to next lint with an invalid project directory argument)

Made with Cursor

zhubby added 3 commits April 16, 2026 19:58
Use stable per-turn placeholder IDs for reasoning and MCP tool progress so
incremental SSE updates replace the same chat card instead of accumulating.
Also remove temporary streaming cards when a turn completes or fails.

Made-with: Cursor
Coalesce adjacent assistant chunks within the same turn so
streaming updates and resumed history render as a single reply
instead of duplicated or vertically fragmented chat bubbles.

Made-with: Cursor
Record the remaining frontend lockfile changes so the branch is fully synchronized before review and merge.

Made-with: Cursor
@zhubby zhubby merged commit b1b4f22 into main Apr 16, 2026
1 of 2 checks passed
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.

1 participant