Skip to content

🐛 Direct conversation messages need a page refresh to appear #689

Description

@jrosseel

Symptom

On testv4, a message posted in a Direct conversation does not appear for the other participant until the page is reloaded. It should arrive over the live stream.

Observed 2026-08-19 on testv4 at chart 0.9.2, server sha-1707b462c8d91ee26fcaf2a42c0be871d687c248.

What is already correct

Traced the whole path; three of the four links work:

  • The store streams every mode. ConversationWorkspaceStore._StartStream opens a stream for the selected conversation with no mode gate — a Direct conversation gets a stream like an Agent session does (libs/frontend/state/conversation/workspace/src/lib/conversation-workspace.store.ts:285).
  • The presenter merges live messages. _LiveMessageViews appends live AG-UI messages that the canonical snapshot does not already contain, so a live message would render (libs/frontend/features/conversation-workspace/src/lib/conversation-workspace.presenter.ts:213).
  • The projector expands any stored message. __ProjectAgUiEvents turns any conversation.message source event into TEXT_MESSAGE_START / TEXT_MESSAGE_CONTENT / TEXT_MESSAGE_END, with no run or mode condition — only tool role falls through to a custom event (libs/backend/conversations/projection/main/src/ag-ui-event-projector.ts:24).

So the remaining gap is upstream of the projector: either no conversation.message outbox event is published when a participant posts into a Direct conversation, or the SSE feed does not deliver it to the other participant.

Todo

  • Confirm whether prisma-conversation-message-admission-unit-of-work.ts writes a conversation.message outbox event for a Direct conversation, or only inside run admission.
  • Check whether the SSE feed selects events by runId; a Direct message has no run, so a run-scoped query would drop it.
  • Check that the feed fans out to every participant of the conversation, not only the message author.
  • Fix whichever link is missing, then add a test at that boundary. A frontend unit test cannot catch this — the missing piece is server-side event publication or selection.
  • Consider covering it in the k3d smoke: two participants, one Direct message, assert it arrives on the second participant's stream without a refetch.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions