90944948f5
TUI for orchestrating AI coding harness sessions (Claude Code, Codex, Kiro, etc.) via tmux. Click CLI bootstraps a Textual TUI over ProjectService/SessionService backed by SQLite, spawning harness sessions as tmux windows through TmuxManager. Includes recent fixes: - Visible Tab focus highlight on dialog OK/Cancel buttons - Auto-select first project on launch - Auto-select first session + per-project session-selection memory - tmux new-window targets an explicit free index, fixing "index N in use" failures (broken spawn/attach in attached sessions) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21 lines
845 B
Python
21 lines
845 B
Python
import re
|
|
|
|
from hqt.config import Settings
|
|
|
|
|
|
def test_tui_window_name_distinct_from_session_windows():
|
|
"""The main TUI window name must not collide with the 'hqt-{id}' harness
|
|
session-window pattern, so the tmux status bar can't read it as a truncated
|
|
session name (the trailing '-' there is tmux's last-window flag, not a name)."""
|
|
s = Settings()
|
|
# Session windows are named hqt-1, hqt-2, ... The main window must differ.
|
|
assert not re.fullmatch(r"hqt(-\d+)?", s.tui_window_name)
|
|
assert s.tui_window_name != "hqt"
|
|
assert s.tui_window_name == "⌂ HQT"
|
|
|
|
|
|
def test_tui_session_name_is_short_for_status_left():
|
|
"""tmux's default status-left prints "[#{session_name}] " in the lower-left
|
|
corner; the session name should be the clean "hqt", not "hqt-main"."""
|
|
assert Settings().tui_session_name == "hqt"
|