You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skillpack needs test coverage for the Ink TUI and the CLI process contract without coupling UI tests to provider scanning or user directories.
Agreed approach
Split Terminal UI Tests from CLI I/O Tests.
Terminal UI Tests render an injectable app surface with Ink Testing Library, shared inventory fixtures, fixed terminal sizes, normalized output, and a mock SkillManager.
CLI I/O Tests exercise an injectable CLI runner for stdin/stdout, alternate screen buffer control, signal handlers, render lifecycle, and process exit.
Keep only a thin process-level smoke test for the built binary.
Use snapshots only for stable normalized golden frames; use semantic assertions for interaction behavior.
First phase covers navigation, detail routing, search, help, terminal envelope states, and entry/confirmation state for toggle/update/remove/install flows.
Do not run real provider mutations, external skills commands, system file manager opens, or real signals inside the Vitest process.
Implementation units
Test infrastructure:
Add ink-testing-library as a TUI devDependency.
Extract an injectable AppSurface while keeping App responsible for real manager initialization.
Extract runSkillpackCli for terminal lifecycle and process I/O.
Add TUI test harness, inventory fixtures, output normalization, and deterministic cleanup.
First tests:
Inventory initial frame snapshot.
Keyboard navigation, detail routing, search, help overlay.
Too-small terminal state.
Toggle/update/remove/install entry or confirmation state.
CLI I/O runner output ordering and lifecycle tests.
Added AppSurface so Terminal UI Tests can render with injected manager/config/terminal size without scanning user directories.
Added runSkillpackCli so CLI I/O Tests can verify terminal control sequences, signal unmount, render lifecycle, and process exit through injected streams/process/render.
Added TUI test README, inventory fixtures, mock SkillManager, render harness, ANSI/frame normalization, and keyboard helpers.
Added Terminal UI Tests for inventory snapshot, keyboard navigation, detail routing, search, help overlay, too-small terminal snapshot, toggle mutation entry, remove confirmation, update check, and install entry.
Added CLI I/O Tests for alternate screen lifecycle ordering, SIGTERM unmount, and terminal restoration on render lifecycle failure.
Verification:
pnpm --filter skillpack-tui test
pnpm test
pnpm build
Note: no real provider mutations, external skills commands, system file manager opens, or real signals in the Vitest process are used by the new tests.
Commit: 587e377 (test(tui): add terminal UI and CLI I/O coverage)
Branch status: local branch is ahead of origin/refactor/ui-polish by 1 commit.
Verification completed before commit:
pnpm --filter skillpack-tui test
pnpm test
pnpm build
The implementation keeps Terminal UI Tests and CLI I/O Tests separated as described in ADR 0038 and avoids real provider mutations, external skills commands, system file manager opens, and real signals inside the Vitest process.
Activity
WTW0313 commentedon Jul 2, 2026
Implemented locally on branch
refactor/ui-polish.Completed scope:
ink-testing-libraryto the TUI package.AppSurfaceso Terminal UI Tests can render with injected manager/config/terminal size without scanning user directories.runSkillpackCliso CLI I/O Tests can verify terminal control sequences, signal unmount, render lifecycle, and process exit through injected streams/process/render.Verification:
pnpm --filter skillpack-tui testpnpm testpnpm buildNote: no real provider mutations, external
skillscommands, system file manager opens, or real signals in the Vitest process are used by the new tests.WTW0313 commentedon Jul 2, 2026
Committed implementation on
refactor/ui-polish:587e377(test(tui): add terminal UI and CLI I/O coverage)origin/refactor/ui-polishby 1 commit.Verification completed before commit:
pnpm --filter skillpack-tui testpnpm testpnpm buildThe implementation keeps Terminal UI Tests and CLI I/O Tests separated as described in ADR 0038 and avoids real provider mutations, external
skillscommands, system file manager opens, and real signals inside the Vitest process.