Skip to content

fix: use Map for bubbles so imperative streaming bubbles survive prop sync#546

Closed
avoidwork wants to merge 1 commit into
mainfrom
fix/use-map-for-bubbles-prop-sync
Closed

fix: use Map for bubbles so imperative streaming bubbles survive prop sync#546
avoidwork wants to merge 1 commit into
mainfrom
fix/use-map-for-bubbles-prop-sync

Conversation

@avoidwork

Copy link
Copy Markdown
Owner

Summary

Fixes a bug where imperative streaming bubbles were being lost during prop sync due to using a plain object instead of a Map.

Details

  • Replaced plain object with for internal bubble storage
  • Ensures imperative streaming bubbles survive the prop sync cycle
  • Maintains insertion order and prevents key collision issues

Next Steps

  • Review and approve
  • Run tests to confirm no regressions
  • Merge to main

… sync

The messages prop sync was overwriting imperatively-added assistant
bubbles because both used the same array state. Now bubbles is a Map
keyed by ID — imperative adds use UUID keys, prop sync uses msg-N
keys. They coexist without collision, so streaming bubbles render
immediately and update in real time.
@avoidwork avoidwork closed this Jul 9, 2026
@avoidwork avoidwork deleted the fix/use-map-for-bubbles-prop-sync branch July 9, 2026 00:35
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