Repository navigation
Show user-message metadata before assistant streaming completes #1244
Description
Issue
A newly submitted user message keeps its temporary browser ID until the assistant stream finishes, so its metadata drawer cannot load even though the message and metadata are already persisted. Users see Message metadata unavailable (temporary ID not updated). during long-running responses.
Steps to Reproduce
- Open a chat and submit a message that produces a long-running or tool-driven response.
- While the assistant response is still streaming, expand the submitted user message's metadata drawer.
- Observe that the user message metadata fails to load; refresh the page and observe that the persisted metadata is available.
Expected Behavior
The user message should be reconciled to its persisted message ID as soon as the backend saves it, allowing its metadata drawer to load while the assistant response continues. Assistant-message metadata may remain unavailable until the assistant response is finalized and persisted.
Actual Behavior
The client receives and applies user_message_id only from the terminal SSE event. Until then, the metadata drawer retains the temp_user_* ID and displays an error. If the drawer is opened before reconciliation, its retry path continues using the stale temporary ID.
Impact
This creates a misleading metadata failure during long-running chat, tabular analysis, document actions, image generation, and shared-chat workflows. Refreshing works around the issue, but interrupts the live response experience.
Notes
The fix should emit or relay a nonterminal user-message persistence SSE event immediately after the user message is saved, reconcile the temporary DOM ID on receipt, and recover an already-open metadata drawer with the real ID. This must cover the main chat stream, document-action/analyze streams, image-generation compatibility bridge, and collaboration stream proxy. Terminal responses should retain user_message_id for backward compatibility and cancellation/recovery safety.
Acceptance Criteria
- A submitted user message can load metadata after persistence while its paired assistant response is still running.
- An already-open metadata drawer recovers automatically when the real message ID arrives.
- Standard, document-action/analyze, image-generation, and shared-chat streaming paths expose or relay the persistence signal.
- Assistant metadata remains deferred until the assistant message is finalized.
- Terminal events retain
user_message_idfor backward compatibility and cancellation/recovery behavior. - Regression coverage validates SSE ordering, stream relaying, and browser-side temporary-ID reconciliation.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReleased
Activity
paullizer commentedon Aug 14, 2026
Implementation is complete on the working branch.
What changed:
user_message_persistedSSE event after durable storage across standard chat, document-action/analyze, image-generation compatibility, and collaboration streams.0.250.197.Validation completed:
Docs:
docs/explanation/fixes/USER_MESSAGE_METADATA_STREAMING_FIX.mdanddocs/explanation/release_notes.md.paullizer commentedon Aug 19, 2026
Shipped in v0.250.202 via #1247.
Release note entries:
Full notes: https://microsoft.github.io/simplechat/explanation/release_notes/
Closing as completed. This issue stayed open after the fix merged because pull requests target
Developmentwhile the repository default branch ismain, so GitHub never applied theFixes #keyword automatically.