TUI Testing and Debugging with Snapshots, PTYs, Virtual Terminals, and ConPTY Use this skill when a TUI needs reliable tests or when an interactive terminal bug must be reproduced outside a human terminal session. Four-layer test strategy 1. Pure state tests. Test reducers, update functions, focus transitions, validation, sorting, filtering, and command scheduling without a terminal. 2. Component/render snapshots. Render widgets at fixed width, height, theme, color level, locale, and time. Compare stable text or cell grids. 3. Virtual terminal tests. Feed ANSI output into a terminal emulator…