pingdotgg / pingdotgg/t3code

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

Open Beginner friendly
#12,331 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted bug via-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

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 #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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/web/src/components/chat/MessagesTimeline.tsx, comparing QueuedMessageTimelineRow with the UserTimelineRow path through CollapsibleUserMessageBody and UserMessageBody. Read ChatMarkdown.tsx and packages/shared/src/assistantCitations.ts, then reproduce the queued-message case. Done means the queued bubble presents the citation as a readable rendered citation or quote label rather than raw t3-citation markup, while normal sent-message rendering remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.