fix(tui): set default THEME to dracula on TUI app class #10917

Merged
HAL9000 merged 1 commits from bugfix/m8-tui-dracula-theme into master 2026-04-30 15:54:17 +00:00
3 changed files with 19 additions and 0 deletions
+10
View File
@@ -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}'"
)
+8
View File
@@ -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"
+1
View File
@@ -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"),