feat(web): add <AgentMessage> so event summaries render as markdown #1164
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Blocks
Reference
charles/agent-hooks#1164
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As a dashboard operator, I want agent-produced text to render with consistent markdown formatting whether I'm reading the event timeline or the planner transcript, so that I don't lose structure (code blocks, lists, links) when viewing the event log.
Acceptance criteria
Component
<AgentMessage content={string} compact={boolean} />incomponents/agent-message.tsx<Markdown>(GFM + Shiki) — same renderer used in transcriptcompactmode: strips block-level formatting (lists → inline, code blocks →<code>) for narrow-width contexts (task-list summary preview)Adoption
event-log.tsxEventRowreplaceswhitespace-pre-wrapspan with<AgentMessage>forassistantevent summariesplanner/transcript.tsxassistant message bubbles use<AgentMessage>(removes parallel render path)Security
dangerouslySetInnerHTMLwithout sanitizer wrapperVisual
just qapassesOut of scope
tool_callsummaries orerrorevent text as markdown (plain text correct for those)References
🧹 janitor: this ticket has been idle-assigned since 2026-05-14T23:51:11.000Z. Re-dispatching.
🧹 janitor: this ticket has been idle-assigned since 2026-05-15T04:22:21.000Z. Re-dispatching.
All acceptance criteria for this issue were delivered by PR #1186 (merged as
17cae85onmain2026-05-14T23:51:09Z). The PR body usedRefs #1164rather thanCloses #1164, so the issue stayed open and the janitor kept redispatching it.Verified on
origin/main:apps/web/src/components/agent-message.tsxexports<AgentMessage content compact streaming />— default mode delegates to<Markdown>(GFM + Shiki, the same renderer the transcript already used); compact mode flattens lists → inline bullet runs and fenced code → inline<code>.apps/web/src/components/agent-message.test.tsxcovers default-mode markdown structure, compact-mode flattening, and inline-emphasis preservation on both paths.apps/web/src/components/event-log.tsxEventRowswaps the renderer to<AgentMessage>forassistantevents only; other event types stay onwhitespace-pre-wrap(tool summaries / errors / progress are plain status output, per the "Out of scope" note).apps/web/src/components/planner/transcript.tsxrenders both persisted bubbles and the in-flight streaming bubble through<AgentMessage>(forwardingstreamingso partial code fences progressively render) — the parallel<Markdown>render path is removed.<AgentMessage>does not introduce any newdangerouslySetInnerHTML; the only such usage in this path is the pre-existing one inside<CodeBlock>fed by Shiki's escape-safe HTML.Closing — nothing left to implement.