diff --git a/features/steps/tui_app_coverage_steps.py b/features/steps/tui_app_coverage_steps.py index fcf125b6c..9bfae6063 100644 --- a/features/steps/tui_app_coverage_steps.py +++ b/features/steps/tui_app_coverage_steps.py @@ -510,3 +510,13 @@ def step_alias_check(context): assert ( context._tui_app_mod.CleverAgentsTuiApp.__name__ == "_TextualCleverAgentsTuiApp" ) + + +# --------------------------------------------------------------------------- +# THEME class variable (issue #4742) +# --------------------------------------------------------------------------- +@then('the app class should have THEME set to "{theme}"') +def step_theme_class_var(context, theme: str) -> None: + assert theme == context._tui_app.THEME, ( + f"Expected THEME='{theme}', got '{context._tui_app.THEME}'" + ) diff --git a/features/tui_app_coverage.feature b/features/tui_app_coverage.feature index 2392dca85..a610e42ea 100644 --- a/features/tui_app_coverage.feature +++ b/features/tui_app_coverage.feature @@ -196,3 +196,11 @@ Feature: TUI App Coverage And I call on_mount on the app And I submit "!true" to the app Then the conversation widget should contain "(empty output)" + + # --- THEME class variable (issue #4742) --- + + @tdd_issue @tdd_issue_4742 + Scenario: The Textual TUI app has THEME set to dracula by default + Given a mock command router and persona state + When I instantiate the Textual TUI app + Then the app class should have THEME set to "dracula" diff --git a/src/cleveragents/tui/app.py b/src/cleveragents/tui/app.py index ca663fa8f..b1ff00785 100644 --- a/src/cleveragents/tui/app.py +++ b/src/cleveragents/tui/app.py @@ -89,6 +89,7 @@ if _TEXTUAL_AVAILABLE: """Main TUI app.""" CSS_PATH: ClassVar[str] = "cleveragents.tcss" + THEME: ClassVar[str] = "dracula" BINDINGS: ClassVar[list[tuple[str, str, str]]] = [ ("ctrl+q", "quit", "Quit"), ("f1", "help", "Help"),