Commit Graph

2 Commits

Author SHA1 Message Date
TheArchitectit 9ed9df543b fix(tui): test fix, theme migration, zero hardcoded colors in rendering
- Fix failing test_filter_by_label: use 'Z' (matches nothing) and 'Help'
  (matches specific entries) instead of 'e' which matched everything
- Replace all 36 hardcoded Color:: in tui.rs and markdown.rs with theme
  lookups (theme.conversation_user, theme.dashboard_key, etc.)
- MarkdownRenderer now stores a TuiTheme, render_diff() accepts &TuiTheme
- section() and kv() helpers take theme param for key/color lookups
- draw_left_pane/draw_right_pane use theme for all colors
- push_user_input/push_system_message/push_output read from self.theme
- Only remaining Color:: in production code: Color::Reset (unstyled bg)
  and Color::Rgb (dynamic syntect output) — both acceptable

283 tests pass, 0 failures. Clippy clean. Workspace builds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 10:25:11 -05:00
Claude e8e8c72185 feat(tui): Sprint 2 — markdown rendering, ConversationContent enum, diff viewer
- Create src/markdown.rs with MarkdownRenderer using pulldown-cmark + syntect
  (lazy-loaded via once_cell::Lazy, theme fallback chain, syntect 5.x API)
- ConversationContent enum: Plain/Markdown/CodeDiff variants
- push_output() auto-detects markdown via looks_like_markdown() heuristic
- build_wrapped_conversation() routes through MarkdownRenderer for markdown entries
- render_diff() for syntax-colored unified diffs (green+/red-/cyan @@)
- push_diff() convenience method for /diff command
- once_cell added to Cargo.toml
- 27 new tests for markdown rendering, detection, and diff colors
- All existing tests pass (240 unit tests, 108 contract tests)

Sprint 2 of 7.

Authored by TheArchitectit
2026-06-11 19:00:46 -05:00