Skip to content

Preserve stream segment order after refresh#377

Merged
marccampbell merged 2 commits into
mainfrom
fix-refresh-stream-segments-again
Jun 7, 2026
Merged

Preserve stream segment order after refresh#377
marccampbell merged 2 commits into
mainfrom
fix-refresh-stream-segments-again

Conversation

@marccampbell

Copy link
Copy Markdown
Contributor

Summary

  • flush streamed assistant text into persisted message segments before activity/tool-call rows are recorded
  • prevent final full-response payloads from overwriting those split segments after activity boundaries
  • add a refresh-timeline regression test for assistant/tool-call/assistant ordering

Why

The live UI splits streamed assistant text around tool activity, but refresh used persisted DB rows. On main, the server persisted one growing assistant row and overwrote it with the final full message, so refresh coalesced or dropped the intermediate live assistant segments shown during streaming.

Tests

  • env GOCACHE=/private/tmp/elasticclaw-go-build go test ./pkg/hub -run 'TestStreamingSegments|TestMessageTimeline'
  • env GOCACHE=/private/tmp/elasticclaw-go-build go test ./...

@greptile-apps

greptile-apps Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Preserve stream segment order after refr..." | Re-trigger Greptile

Comment thread pkg/hub/server.go Outdated
Comment thread pkg/hub/server_test.go
@greptile-apps

greptile-apps Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "Suppress ghost split-turn broadcasts" | Re-trigger Greptile

@marccampbell marccampbell merged commit eb8e96f into main Jun 7, 2026
11 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