3 Commits

Author SHA1 Message Date
teernisse
e1e322f4c9 feat(theme): expand color palette for richer UI semantics
Add new theme colors across all four color schemes (Flexoki Dark,
Catppuccin Mocha, Tokyo Night, Terminal) to enable more nuanced
visual states:

Surface variants:
- SurfaceHover: Highlighted surface for active tabs, selected rows
- SurfaceBright: Extra emphasis for focused elements

Border variants:
- BorderBright: Prominent borders for cards and focus states
- BorderAccent: Accent-colored borders for active/selected elements

Accent variants:
- AccentBright: Higher contrast accent for emphasis
- AccentDim: Muted accent for subtle backgrounds

New semantic colors:
- Magenta: Session-related metrics
- Cyan: Token-related metrics

These additions provide the foundation for visual polish work across
components and tabs, enabling icon coloring, gradient effects, and
proper background fill without relying solely on the base accent color.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 00:05:20 -05:00
teernisse
2be7b5e193 refactor: simplify TUI theme struct and extract chart/progress components
Theme simplification (theme/theme.go):
- Remove Purple and BorderHover fields from Theme struct — neither was
  referenced in the new tab renderers, reducing per-theme boilerplate
  from 14 to 12 color definitions

Component extraction (components/):
- Move Sparkline() and BarChart() from card.go to new chart.go, giving
  visualization components their own file as complexity grows
- card.go retains MetricCard, ContentCard, LayoutRow, and CardInnerWidth
  which are layout-focused
- New chart.go: Sparkline (unicode block chars) and BarChart (multi-row
  with anchored Y-axis, optional X-axis labels, dynamic height/width)
- New progress.go: ProgressBar component with customizable width, color,
  and percentage display — used by rate-limit and budget views

Status bar and tab bar updates:
- statusbar.go: adapt to simplified theme struct
- tabbar.go: adapt to simplified theme struct
2026-02-20 16:08:06 -05:00
teernisse
253776ffd5 feat: add TUI theme system with four color palettes
Implement the theming layer for the interactive dashboard:

- tui/theme/theme.go: Theme struct with 14 semantic color roles
  (Background, Surface, Border, BorderHover, TextDim, TextMuted,
  TextPrimary, Accent, Green, Orange, Red, Blue, Purple, Yellow).
  Four built-in themes:

  * Flexoki Dark (default): warm, low-contrast palette designed for
    extended reading. Teal accent (#3AA99F) on near-black background.

  * Catppuccin Mocha: pastel warm tones with blue accent (#89B4FA)
    on dark surface (#1E1E2E).

  * Tokyo Night: cool blue/purple palette with blue accent (#7AA2F7)
    on deep navy (#1A1B26).

  * Terminal: ANSI 16-color only for maximum compatibility — maps
    all roles to standard terminal colors (0-15), works correctly
    in any terminal emulator regardless of true-color support.

  Global Active variable holds the current theme. SetActive/ByName
  enable runtime theme switching from the settings tab and setup
  wizard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:02:45 -05:00