style: unify New Session dialog focus highlight to accent

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 10:38:09 -04:00
parent bafc664251
commit d72f04dd89
2 changed files with 30 additions and 0 deletions
+18
View File
@@ -1895,3 +1895,21 @@ async def test_sandbox_options_hidden_until_switch_on():
switch.value = False
await pilot.pause()
assert options.display is False
def test_dialog_focus_highlight_uses_accent():
"""Every focusable control in the New Session dialog shares the Peach accent
focus border (consistent with the dialog buttons), not Textual's default
Lavender. Guards against the scoped :focus rule being dropped."""
from pathlib import Path
import hqt.tui
css = (Path(hqt.tui.__file__).parent / "styles.tcss").read_text()
for selector in (
"#new-session-dialog Switch:focus",
"#new-session-dialog Checkbox:focus",
"#new-session-dialog Select:focus",
"#new-session-dialog Input:focus",
):
assert selector in css, f"missing focus rule: {selector}"
assert "border: tall $accent;" in css