Skip to content

Show pending mailbox messages in the transcript #1402

Description

@sentry-junior

Summary

Accepted inbound messages sit in the conversation mailbox until a worker drains them into durable history. The dashboard transcript only shows committed history, so those messages are invisible while queued — whether they came from the web composer or Slack.

The product bar is ChatGPT-style: once a message is accepted, it should already be in the transcript as pending work, not appear only after the turn starts.

Current behavior

  • Web send (POST /api/conversations, POST /api/conversations/:id/messages) accepts into the mailbox via appendAndEnqueueApiConversationMessage and returns { conversationId, messageId, status }.
  • Slack ingress also lands in the same mailbox before history commit.
  • User rows enter the transcript only after the worker runs and persistConversationMessages commits them (packages/junior/src/chat/api-turns/work.ts and the shared conversation worker path).
  • Dashboard composer covers the HTTP accept with Sending…, then invalidates/refetches. There is no mailbox-pending row and no optimistic transcript insert on send.
  • Conversation detail polls every 2s only while status === "active"; mailbox contents are not part of the reporting read model the UI renders.

Gap

  • Start and continue conversations in the dashboard #1200 already requires accepted messages to “appear immediately as pending” and for pending/completed/failed/retry/authorization states to survive refresh and worker continuation.
  • That requirement is not scoped as its own slice. Composer (feat(conversations): Add dashboard composer #1399) landed without mailbox-visible pending UI for web or Slack-originated queue.
  • Impact: senders and readers watching a live conversation see a blank lag between accept and history commit, especially when the worker is busy or deferred mailbox work is waiting on an active turn.

Related

Requested by David Cramer.

--

View Junior Session [Sentry]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions