Skip to content

Add ty TUI QA harness (scripts/qa)#554

Merged
bborn merged 1 commit into
mainfrom
qa/tui-test-harness
Jun 4, 2026
Merged

Add ty TUI QA harness (scripts/qa)#554
bborn merged 1 commit into
mainfrom
qa/tui-test-harness

Conversation

@bborn
Copy link
Copy Markdown
Owner

@bborn bborn commented Jun 4, 2026

What

A small harness to drive the real ty TUI against a throwaway, isolated instance — separate DB, tmux sessions, and projects_dir — so we can QA features with real keystrokes and assert on real UI state instead of manual one-offs.

Loop: up → key → assert state → down.

script purpose
ty-qa-up.sh build binary, fresh isolated DB, register a git project
ty-qa-tui.sh launch the real TUI in task-ui-qa with --debug-state-file
ty-qa-key.sh send keystrokes (P Enter, n, !, …)
ty-qa-state.sh read UI state as JSON (no screen-scraping)
ty-qa-capture.sh dump the rendered screen
ty-qa-agent.sh attach a live agent window to a task for pane/detail-view QA
ty-qa-down.sh tear down

Why now

Several recently-merged PRs (worktree auto-clean/restore, new-project creation, the pane-routing fix in #553) really needed real-TUI verification. This makes that repeatable.

ty-qa-agent.sh exists because ty's daemon lock is global (~/.local/share/task/daemon.pid) — you can't run a second daemon beside the live one — so it stands up an agent window and points the task's DB row at it, letting the TUI exercise the real joinTmuxPane / nudge / shell-pane paths without a daemon. See scripts/qa/README.md for the three test tiers.

Test plan

Dogfooded end-to-end: up → create task → ty-qa-agent.sh 1ty-qa-tui.shty-qa-key.sh P Enterty-qa-state.sh reports detail.has_panes: true and the agent pane physically joins into task-ui-qa. All scripts pass bash -n.

🤖 Generated with Claude Code

A small harness to drive the actual TUI against a throwaway, isolated instance
(separate DB + tmux sessions + projects_dir), so features can be QA'd via real
keystrokes and asserted via --debug-state-file instead of manual one-offs.

Loop: up -> key -> assert state -> down.
  ty-qa-up / -tui / -key / -state / -capture / -down, plus ty-qa-agent.sh which
  attaches a live agent window for pane/detail-view tests without a daemon
  (ty's daemon lock is global, so a second daemon can't run beside the live one).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bborn bborn merged commit 8abb51e into main Jun 4, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant