Skip to content

[Bug]: Assistant citations render as raw t3-citation markup in queued messages #12331

Description

@repparw

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Cite an assistant response so the composer contains [Assistant quote](t3-citation://v1/...) (introduced in feat(web): cite assistant responses with inline citations #9146).
  2. While the agent turn is still running, send it so it lands as a queued follow-up message.
  3. Look at the queued bubble (dashed border, ClockIcon + Queued footer).

Expected behavior

The queued bubble renders the citation the same way a sent user message does — via ChatMarkdown + AssistantCitationChip — or at least a readable quote label, not the raw link destination.

Actual behavior

The queued bubble shows the raw markdown literally:

[Assistant quote](t3-citation://v1/...?text=Yes+...&start=0&end=276&prefix=&suffix=...&comment=...)

with the percent-encoded quote text spilling across lines. Once the turn ends and the message sends normally, it renders correctly. Screenshot: queued bubble shows the full raw t3-citation://v1/8baf8577-.../assistant%3A...?text=Yes+...%E2%80%9E...%29%2C+and+as+spot+rallies+... link followed by the typed reply ("guessing i'd already get most of the delta/ars from atm positions").

Likely cause: QueuedMessageTimelineRow in apps/web/src/components/chat/MessagesTimeline.tsx renders queuedMessage.prompt as plain whitespace-pre-wrap text, while UserTimelineRow -> CollapsibleUserMessageBody -> UserMessageBody -> ChatMarkdown (which allowlists t3-citation and returns AssistantCitationChip per ChatMarkdown.tsx:483,2858-2859, parsed via packages/shared/src/assistantCitations.ts).

Related but distinct: #11341 (raw :codex-followup), #11810 (malformed markdown links as raw text), #5813 (raw codex-file-citation), #9605 (Codex source citations, different scheme).

Impact

Minor bug or occasional failure

Version or commit

upstream main as of 2026-09-17 (citation feature from #9146, merged 2026-09-02)

Environment

web

Workaround

Wait until the turn ends so the message sends normally instead of queueing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions