You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Render review output through shared markdown palette (CU13 of PR-B)
Agents emit markdown — claude-code, codex, and gemini-cli all return
narrative with headings, lists, code blocks, and inline formatting. Until
now DumpSink printed it as raw text, so the user saw bare ─────── name
review ─────── separators followed by unstyled markdown like `# foo` and
`- bar`. Same for the cross-agent synthesis verdict.
This commit:
- Extracts the glamour palette from dispatch_tui.go into a shared
cmd/entire/cli/mdrender/ package. Render(markdown, width, dark)
is the pure primitive; RenderForWriter(w, markdown) is TTY-aware
and returns raw markdown for non-TTY writers (so redirected output
stays grep-friendly and pipeline-safe).
- Updates DumpSink to compose each agent's section as markdown:
H1 heading for agent name; cancelled runs render as "_cancelled_";
failed runs use **Failed: `err`** plus blockquoted RunError details;
succeeded runs render the AssistantText narrative directly. The
counts line at the end stays plain (it's a status summary, not
narrative content — keeping it grep-friendly is more useful than
styling it).
- Updates SynthesisSink to render the cross-agent verdict through the
same palette.
- Updates dispatch_tui.go's defaultRenderTerminalMarkdown to delegate
to mdrender.Render — preserving its existing always-render behavior
(dispatch emits ANSI even when redirected, by long-standing intent).
The TUI's drill-in screen and dashboard rows are unchanged; lipgloss
styling there already does its job and doesn't need glamour.
Tests: TTY/non-TTY paths in mdrender_test.go, NO_COLOR honored, dark vs
light palette both produce styled output. DumpSink tests rewritten to
assert markdown body (since bytes.Buffer is non-TTY). All existing tests
continue to pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments