UAT: TUI Theme and Styling system not implemented — spec requires YAML-defined themes with semantic style names; only a single hardcoded CSS file exists #3002

Open
opened 2026-04-05 03:29:27 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: feat/tui-theme-system
  • Commit Message: feat(tui): implement YAML-based theme system with semantic style names and theme switching
  • Milestone: v3.7.0
  • Parent Epic: #868

Description

The spec defines a Theme and Styling system where themes are defined in YAML files and specify the colors, styles, and layout for all UI components. The system uses semantic style names (e.g., primary, accent, warning) that are applied to components, allowing themes to be swapped out easily. The spec also states that the Persona System includes a "Theme and Styling" field — a reference to a theme that defines the color palette and styles for all UI components.

Current Behavior

  1. The only styling is a single hardcoded CSS file src/cleveragents/tui/cleveragents.tcss with fixed Textual CSS variables
  2. No YAML theme files exist anywhere in the codebase
  3. The Persona schema (src/cleveragents/tui/persona/schema.py) has no theme field — personas cannot reference a theme
  4. The /theme slash command is listed in slash_catalog.py (line 83) but has no implementation in commands.py
  5. The tui/domain/models/tui/ directory exists but is completely empty (only __pycache__)

Expected Behavior (per spec)

  • Themes should be defined in YAML files (similar to personas)
  • A theme registry should load and manage available themes
  • The Persona schema should include a theme field referencing a theme
  • The /theme command should switch the active theme
  • Semantic style names should be used throughout the CSS

Code Locations

  • src/cleveragents/tui/persona/schema.py: Persona model has no theme field (lines 20–83)
  • src/cleveragents/tui/cleveragents.tcss: Single hardcoded CSS file, no theme switching
  • src/cleveragents/tui/slash_catalog.py line 83: SlashCommandSpec("theme", "Utility", "Switch color theme") — listed but not implemented
  • src/cleveragents/domain/models/tui/: Empty directory (no ThemeConfig model)

Steps to Reproduce

  1. Launch the TUI: agents tui
  2. Type /theme in the prompt
  3. The TUI returns "Unknown command: /theme" instead of switching themes

Subtasks

  • Create src/cleveragents/domain/models/tui/theme_config.py with ThemeConfig Pydantic model
  • Create a theme registry for loading YAML theme files
  • Add theme field to Persona schema in src/cleveragents/tui/persona/schema.py
  • Implement theme switching in the TUI app
  • Wire /theme slash command to switch themes
  • Create at least one default theme YAML file
  • Write BDD scenarios in features/tui_theme_system.feature

Definition of Done

  • ThemeConfig model exists with semantic style name support
  • Theme registry loads YAML theme files
  • Persona schema includes a theme field
  • /theme command switches the active theme
  • BDD scenarios cover theme loading and switching
  • nox -e typecheck passes
  • nox -e unit_tests passes
  • All nox stages pass
  • Coverage >= 97%

This issue was filed by the UAT Testing agent (ca-uat-tester) as part of automated acceptance testing.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `feat/tui-theme-system` - **Commit Message**: `feat(tui): implement YAML-based theme system with semantic style names and theme switching` - **Milestone**: v3.7.0 - **Parent Epic**: #868 ## Description The spec defines a Theme and Styling system where themes are defined in YAML files and specify the colors, styles, and layout for all UI components. The system uses semantic style names (e.g., `primary`, `accent`, `warning`) that are applied to components, allowing themes to be swapped out easily. The spec also states that the Persona System includes a "Theme and Styling" field — a reference to a theme that defines the color palette and styles for all UI components. ### Current Behavior 1. The only styling is a single hardcoded CSS file `src/cleveragents/tui/cleveragents.tcss` with fixed Textual CSS variables 2. No YAML theme files exist anywhere in the codebase 3. The `Persona` schema (`src/cleveragents/tui/persona/schema.py`) has no `theme` field — personas cannot reference a theme 4. The `/theme` slash command is listed in `slash_catalog.py` (line 83) but has no implementation in `commands.py` 5. The `tui/domain/models/tui/` directory exists but is completely empty (only `__pycache__`) ### Expected Behavior (per spec) - Themes should be defined in YAML files (similar to personas) - A theme registry should load and manage available themes - The `Persona` schema should include a `theme` field referencing a theme - The `/theme` command should switch the active theme - Semantic style names should be used throughout the CSS ### Code Locations - `src/cleveragents/tui/persona/schema.py`: `Persona` model has no `theme` field (lines 20–83) - `src/cleveragents/tui/cleveragents.tcss`: Single hardcoded CSS file, no theme switching - `src/cleveragents/tui/slash_catalog.py` line 83: `SlashCommandSpec("theme", "Utility", "Switch color theme")` — listed but not implemented - `src/cleveragents/domain/models/tui/`: Empty directory (no `ThemeConfig` model) ### Steps to Reproduce 1. Launch the TUI: `agents tui` 2. Type `/theme` in the prompt 3. The TUI returns `"Unknown command: /theme"` instead of switching themes ## Subtasks - [ ] Create `src/cleveragents/domain/models/tui/theme_config.py` with `ThemeConfig` Pydantic model - [ ] Create a theme registry for loading YAML theme files - [ ] Add `theme` field to `Persona` schema in `src/cleveragents/tui/persona/schema.py` - [ ] Implement theme switching in the TUI app - [ ] Wire `/theme` slash command to switch themes - [ ] Create at least one default theme YAML file - [ ] Write BDD scenarios in `features/tui_theme_system.feature` ## Definition of Done - [ ] `ThemeConfig` model exists with semantic style name support - [ ] Theme registry loads YAML theme files - [ ] `Persona` schema includes a `theme` field - [ ] `/theme` command switches the active theme - [ ] BDD scenarios cover theme loading and switching - [ ] `nox -e typecheck` passes - [ ] `nox -e unit_tests` passes - [ ] All nox stages pass - [ ] Coverage >= 97% --- > This issue was filed by the UAT Testing agent (ca-uat-tester) as part of automated acceptance testing. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 03:31:42 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
cleveragents/cleveragents-core#3002
No description provided.