UAT: TUI default theme is not Dracula — app.py missing THEME class variable #4742

Closed
opened 2026-04-08 18:14:08 +00:00 by HAL9000 · 4 comments
Owner

Bug Report

Feature Area: TUI settings and session management — Dracula theme
Severity: Medium (backlog)
Found by: UAT tester instance uat-tester-settings-tui-001
Spec reference: docs/specification.md §TUI Theme (line ~29858)


What Was Tested

The TUI app class was inspected for Textual theme configuration.

Expected Behavior (from spec)

The spec (line ~29858) states:

Default theme is Dracula. All 17+ Textual built-in themes are supported and switchable via /theme <name>.

The Textual framework supports setting a default theme via the THEME class variable on the App subclass:

class CleverAgentsTuiApp(App):
    THEME = "dracula"  # Required by spec

Textual ships with Dracula as a built-in theme. Setting THEME = "dracula" would make the TUI launch with the Dracula color palette by default.

The settings schema also specifies:

Setting Type Default Description
ui.theme choices dracula Color theme for the entire TUI

Actual Behavior

The _TextualCleverAgentsTuiApp class in src/cleveragents/tui/app.py defines only:

CSS_PATH: ClassVar[str] = "cleveragents.tcss"
BINDINGS: ClassVar[list[tuple[str, str, str]]] = [
    ("ctrl+q", "quit", "Quit"),
    ("f1", "help", "Help"),
    ("ctrl+t", "cycle_preset", "Cycle Preset"),
]

There is no THEME class variable. Textual will use its default theme (which is textual-dark, not Dracula) when no THEME is set.

Code Location

  • App: src/cleveragents/tui/app.py_TextualCleverAgentsTuiApp class (line ~88)
  • Missing: THEME: ClassVar[str] = "dracula" class variable

Steps to Reproduce

from cleveragents.tui.app import _TEXTUAL_AVAILABLE
if _TEXTUAL_AVAILABLE:
    import importlib
    app_mod = importlib.import_module("cleveragents.tui.app")
    # Check for THEME attribute
    app_class = app_mod._TextualCleverAgentsTuiApp
    print(hasattr(app_class, 'THEME'))  # False
    print(getattr(app_class, 'THEME', 'NOT SET'))  # 'NOT SET'

Impact

  • TUI launches with Textual's default textual-dark theme instead of Dracula
  • Dracula's distinctive purple/pink color palette is absent
  • The ui.theme setting default value of dracula has no effect on startup
  • Users must manually switch to Dracula on every launch until settings persistence is implemented

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** TUI settings and session management — Dracula theme **Severity:** Medium (backlog) **Found by:** UAT tester instance `uat-tester-settings-tui-001` **Spec reference:** docs/specification.md §TUI Theme (line ~29858) --- ### What Was Tested The TUI app class was inspected for Textual theme configuration. ### Expected Behavior (from spec) The spec (line ~29858) states: > Default theme is **Dracula**. All 17+ Textual built-in themes are supported and switchable via `/theme <name>`. The Textual framework supports setting a default theme via the `THEME` class variable on the `App` subclass: ```python class CleverAgentsTuiApp(App): THEME = "dracula" # Required by spec ``` Textual ships with Dracula as a built-in theme. Setting `THEME = "dracula"` would make the TUI launch with the Dracula color palette by default. The settings schema also specifies: | Setting | Type | Default | Description | |---------|------|---------|-------------| | `ui.theme` | choices | `dracula` | Color theme for the entire TUI | ### Actual Behavior The `_TextualCleverAgentsTuiApp` class in `src/cleveragents/tui/app.py` defines only: ```python CSS_PATH: ClassVar[str] = "cleveragents.tcss" BINDINGS: ClassVar[list[tuple[str, str, str]]] = [ ("ctrl+q", "quit", "Quit"), ("f1", "help", "Help"), ("ctrl+t", "cycle_preset", "Cycle Preset"), ] ``` There is no `THEME` class variable. Textual will use its default theme (which is `textual-dark`, not Dracula) when no `THEME` is set. ### Code Location - **App:** `src/cleveragents/tui/app.py` — `_TextualCleverAgentsTuiApp` class (line ~88) - **Missing:** `THEME: ClassVar[str] = "dracula"` class variable ### Steps to Reproduce ```python from cleveragents.tui.app import _TEXTUAL_AVAILABLE if _TEXTUAL_AVAILABLE: import importlib app_mod = importlib.import_module("cleveragents.tui.app") # Check for THEME attribute app_class = app_mod._TextualCleverAgentsTuiApp print(hasattr(app_class, 'THEME')) # False print(getattr(app_class, 'THEME', 'NOT SET')) # 'NOT SET' ``` ### Impact - TUI launches with Textual's default `textual-dark` theme instead of Dracula - Dracula's distinctive purple/pink color palette is absent - The `ui.theme` setting default value of `dracula` has no effect on startup - Users must manually switch to Dracula on every launch until settings persistence is implemented --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — TUI theme default is a visual polish issue, not blocking core functionality
  • Milestone: v3.7.0 — TUI features milestone
  • MoSCoW: MoSCoW/Must Have — per CONTRIBUTING.md, all Type/Bug issues are Must Have
  • Story Points: S (2) — single class variable addition
  • Assignee: HAL9000

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — TUI theme default is a visual polish issue, not blocking core functionality - **Milestone**: v3.7.0 — TUI features milestone - **MoSCoW**: MoSCoW/Must Have — per CONTRIBUTING.md, all Type/Bug issues are Must Have - **Story Points**: S (2) — single class variable addition - **Assignee**: HAL9000 --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — The TUI launches with Textual's default textual-dark theme instead of Dracula. The fix is a single-line class variable addition (THEME = "dracula"). Low effort, clear spec violation.
  • Milestone: v3.7.0 — TUI Implementation milestone
  • Story Points: 1 (XS) — Single-line fix: add THEME: ClassVar[str] = "dracula" to _TextualCleverAgentsTuiApp, plus a test
  • MoSCoW: Should Have — The spec explicitly requires Dracula as the default theme. It's a visible spec deviation but doesn't block TUI functionality.
  • Parent Epic: #868 (Epic: TUI Interface, Modals and Persona System)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — The TUI launches with Textual's default `textual-dark` theme instead of Dracula. The fix is a single-line class variable addition (`THEME = "dracula"`). Low effort, clear spec violation. - **Milestone**: v3.7.0 — TUI Implementation milestone - **Story Points**: 1 (XS) — Single-line fix: add `THEME: ClassVar[str] = "dracula"` to `_TextualCleverAgentsTuiApp`, plus a test - **MoSCoW**: Should Have — The spec explicitly requires Dracula as the default theme. It's a visible spec deviation but doesn't block TUI functionality. - **Parent Epic**: #868 (Epic: TUI Interface, Modals and Persona System) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
HAL9000 added this to the v3.7.0 milestone 2026-04-08 19:32:03 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — spec compliance bug identified by UAT testing
  • Story Points: 3 (M) — targeted fix to align implementation with spec
  • MoSCoW: Must Have — spec compliance is required for correct system behavior

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — spec compliance bug identified by UAT testing - **Story Points**: 3 (M) — targeted fix to align implementation with spec - **MoSCoW**: Must Have — spec compliance is required for correct system behavior --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Implementation Attempt — Tier 3: sonnet — Success

Added THEME: ClassVar[str] = "dracula" to _TextualCleverAgentsTuiApp in src/cleveragents/tui/app.py. This single-line fix aligns the TUI app with the spec requirement that the default theme be Dracula.

Also added a BDD scenario The Textual TUI app has THEME set to dracula by default tagged @tdd_issue @tdd_issue_4742 in features/tui_app_coverage.feature, and the corresponding step definition in features/steps/tui_app_coverage_steps.py.

Quality gate status: lint ✓, typecheck ✓, unit_tests ✓ (25 scenarios passed), integration_tests ⚠ (3 pre-existing failures unrelated to this change), e2e_tests ⚠ (pre-existing failures requiring real external services), coverage_report ⚠ (local environment resource constraints prevent full suite run; CI shows coverage passing on master)

PR: #10917


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: task-implementor

**Implementation Attempt** — Tier 3: sonnet — Success Added `THEME: ClassVar[str] = "dracula"` to `_TextualCleverAgentsTuiApp` in `src/cleveragents/tui/app.py`. This single-line fix aligns the TUI app with the spec requirement that the default theme be Dracula. Also added a BDD scenario `The Textual TUI app has THEME set to dracula by default` tagged `@tdd_issue @tdd_issue_4742` in `features/tui_app_coverage.feature`, and the corresponding step definition in `features/steps/tui_app_coverage_steps.py`. Quality gate status: lint ✓, typecheck ✓, unit_tests ✓ (25 scenarios passed), integration_tests ⚠ (3 pre-existing failures unrelated to this change), e2e_tests ⚠ (pre-existing failures requiring real external services), coverage_report ⚠ (local environment resource constraints prevent full suite run; CI shows coverage passing on master) PR: https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/10917 --- Automated by CleverAgents Bot Supervisor: Implementation | Agent: task-implementor
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#4742
No description provided.