tui-chat-smart

TUI chat: smart coloration scheme; not all-green; semantic per role + content type

Metadata

Statusdone
Assignedagent-700
Agent identityf51439356729d112a6c404803d88015d5b44832c6c584c62b96732b63c2b0c7e
Created2026-04-27T15:09:22.748740828+00:00
Started2026-04-27T15:10:20.397141886+00:00
Completed2026-04-27T15:29:23.920754771+00:00
Tagseval-scheduled

Description

Description

User reports: 'the text is all green... a bit annoying. maybe we could encourage something smart for the coloration'.

The chat / Log view currently renders with too much green (likely user text, agent responses, attachments, all bleeding together). Want a smarter color scheme that uses color SEMANTICALLY rather than uniformly.

Proposed coloration

Content kindColorNote
User inputdefault / bright cyanthe human's voice
Agent text responsedefault (no color)normal terminal text — the most prominent content
Tool call (the call itself)dim cyan / dark graywg's existing ⌁ prefix style
Tool result bodydefault (text) with dim borderoutput is data, should be readable
Tool error / failureredjumps out
Thinking blocks (when shown)italic dimde-emphasized
System notes (info, warnings)yellow / orangedistinct from regular content
Attachmentssubtle gray (NOT green)metadata, not content
Status indicators (idle/active/error)green/yellow/red on the BORDER or gutter, NOT in textper chat-tab states task

The key principle: default text reads as default — color is for structure/role, not for showing 'this is text'. Today most chat content is colored, which makes the colors meaningless.

Implementation guidance

  • Find every Color::Green use in src/tui/viz_viewer/render.rs that's applied to BULK text (not status icons / borders / accents). Replace with default or a more semantic choice.
  • Centralize chat color constants in one place (e.g. src/tui/viz_viewer/chat_palette.rs) so future changes are one-edit.
  • Test by opening wg tui and reading a real chat — should feel like a normal terminal conversation, with color as gentle structure, not a wash.

Out of scope

  • Markdown rendering / syntax highlighting in chat (separate, bigger task)
  • Per-user theming (separate)
  • Light vs dark color theme (separate; today the [tui] color_theme = 'dark' is the only setting)

Validation

  • Failing test first: test_chat_render_uses_no_color_for_default_text — synthetic chat with assistant text, render to a buffer, assert the response text spans use default Color (no fg color set), only headers/role-prefixes use color
  • grep test: grep -c 'Color::Green' src/tui/viz_viewer/render.rs count drops by majority (today many; after, only true status indicators)
  • Implementation makes tests pass
  • cargo build + cargo test pass with no regressions
  • Manual smoke: open wg tui, scroll a real chat, verify it 'reads like a normal terminal' — color as structure, not as a wash

Depends on

Required by

Log