@@ -1,56 +0,0 @@
1-# UI Audit Refactor
2-
3-We're on branch `refactor/ui-audit` doing the UI Audit from TODO.md.
4-
5-## Goals
6-
7-- Revise all console output for consistency, **performance**, and correctness.
8-- Ensure clear styled output with proper hierarchy — different output types (user, assistant, reasoning, tool calls, tool results, errors) must be clearly distinguishable via styles and whitespace.
9-- Ensure proper spinner functionality — follow-up messages don't render inline, nothing breaks.
10-- Ensure conversation log is logical — user, assistant, reasoning, tools/tool calls/results are clearly labelled and associated for readability.
11-
12-## Key rendering files
13-
14-- `src/cli/output.ts` — Glyphs (`G`), banner, error rendering, `CliReporter`
15-- `src/cli/tool-render.ts` — Tool call lines + tool result dispatch
16-- `src/cli/tool-result-renderers.ts` — Per-tool result formatting (shell, subagent, skills, web, MCP)
17-- `src/cli/stream-render.ts` — Main turn event loop — orchestrates text, reasoning, tools, spinner
18-- `src/cli/stream-render-content.ts` — Text/reasoning delta accumulation + markdown highlighting
19-- `src/cli/live-reasoning.ts` — Streamed reasoning block display
20-- `src/cli/spinner.ts` — Braille spinner on stderr
21-- `src/cli/status-bar.ts` — Model/session/token info bar
22-
23-## Testing approach
24-
25-- Use `simulateTerminal()` + captured stdout for "user perspective" tests (handles cursor rewrites).
26-- Test with `stripAnsi()` for structure, `hasAnsi()` for styling assertions.
27-- Test realistic multi-event sequences through `renderTurn()` to catch spacing/hierarchy issues.
28-- Verify indentation levels, blank line separators, glyph prefixes, spinner clears.
29-
30-## Status
31-
32-- [x] Baseline tests for current output (24 tests in ui-audit.test.ts)
33-- [x] Shared test helpers in test-helpers.ts (captureStdout, simulateTerminal, eventsFrom, etc.)
34-- [x] Parallel tool call tests (5 tests)
35-- [x] Manual one-shot script (scripts/ui-oneshot.ts, 14 scenarios) — run: bun run ui-oneshot
36-- [x] Identify inconsistencies and issues from one-shot output
37-- [x] Refactor rendering for consistency
38-- [x] Verify all tests pass (33 UI audit tests + 392 total)
39-
40-## Issues found and fixed
41-
42-1. **Parallel tool calls had blank lines between them** — consecutive tool-call-start events
43- in a batch each triggered a blank line separator, making parallel calls look disconnected.
44- Fixed by detecting consecutive tool calls and skipping the blank line within a batch.
45-
46-2. **Web tools used generic glyph/label** — `webSearch` and `webContent` fell through to the
47- generic `· toolName` renderer. Added dedicated rendering: `? search <query>` and
48- `← fetch <url>` with proper glyphs.
49-
50-3. **Missing one-shot scenarios** — added scenarios 15-17 for webSearch, webContent, and
51- listSkills to ensure visual coverage of all tool types.
52-
53-4. **Duplicate stdout for single-line failing shell commands** — when a shell command failed
54- with exactly 1 line of stdout and no stderr, the stdout was shown both inline in the
55- summary badge (`out: <line>`) AND as a separate `stdout (1 lines)` preview block.
56- Fixed by skipping the preview when stdout is already inlined in the summary.