testing-tui-runtime
БесплатноБез исполняемых скриптовНе проверенHow to drive the ralph-tui TUI (`run`, watch mode, pause/quit paths) end-to-end in a real terminal with a fake agent and a scratch beads tracker, without AI…
от subsy★ 2 475 звёзд на GitHubОб этом скилле
Runtime/E2E testing of the ralph-tui TUI
Use this when a change must be proven in the real TUI (watch mode, engine status labels, pause/resume, shutdown/quit paths) rather than with unit tests.
Build & run
cd /path/to/ralph-tui && bun run build # produces dist/cli.js
Run the built CLI (not bun run dev) so behaviour matches shipped code:
bun /path/to/ralph-tui/dist/cli.js run [flags]
Scratch tracker (never touch the repo's own .beads)
Create a throwaway project dir with its own beads store and drive scenarios with bd:
export RALPH_TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/ralph-tui-run.XXXXXX")" && cd "$RALPH_TEST_DIR"
bd init # or `bd create ...` which bootstraps the store
bd create "Watch mode epic" --type epic -p 1 # note the epic id bd prints
bd create "Alpha task" --type task -p 2 --parent <epic-id>
A fresh dir per run, not a fixed one: a reused dir carries over .beads tasks, the
.ralph-tui session file, locks and guards — exactly the things most scenarios here assert on, so
a Recovered stale session banner or a stale-lock prompt from the previous run reads as a
finding of the build under test. The unique dir also gives the run a unique epic id, which is how
you address its process (see the signal trap below).
Gotchas:
bdcommands must be run with the scratch dir as the working directory, otherwise you get "no beads database found".- With
--tracker beads, the TUI requires--epic <id>; without it the TUI shows "No epics found" and interactive epic selection blocks automation. br(beads-rust) may not be installed even though AGENTS.md references it;bdworks.
Fake agents (no AI credentials needed)
Put plugins in ~/.config/ralph-tui/plugins/agents/:
echo.ts— returnsecho-agent: local fake response\n<promise>COMPLETE</promise>instantly.slowecho.ts— same but sleeps ~25s in interruptible 500 ms chunks. Essential for testing quit/pause mid-iteration; an instant agent gives you no window to interrupt.
Select with --agent echo / --agent slowecho.
Making timing visible on screen
Wrap the CLI so quit latency is provable in the recording:
#!/bin/bash
cd "${RALPH_TEST_DIR:?export RALPH_TEST_DIR to the scratch dir first}"
export PATH="$PATH:$HOME/.local/bin"
echo "START $(date +%H:%M:%S.%3N) args: $*"
bun /path/to/ralph-tui/dist/cli.js run "$@"
echo "=== PROCESS EXITED code=$? at $(date +%H:%M:%S.%3N) ==="
exec bash
Typical invocation:
./runwatch.sh --watch --poll 60 --agent echo --tracker beads --epic <epic-id> --no-setup --force
Use a long --poll (60s) to make a stalled pause/quit obvious, and a short one (10s) when you
want auto-pickup to happen quickly.
TUI keys
s start · p pause/resume · q → quit dialog → y · d dashboard · r refresh.
Header status labels: Waiting (watch idle), Selecting, Executing, Paused, Complete.
Dashboard shows Waiting for new tasks when watch-idle.
Known traps
- Interrupt (Ctrl+C) path: on builds that include the #431 fix (
src/tui/utils/keyboard-shortcuts.tsonInterruptRequestinRunApp.tsx+exitSignals: ['SIGQUIT','SIGABRT']inrun.tsx), keyboard Ctrl+C and externalkill -INT <pid>both render the⚠ Interrupt Ralph?dialog with the display intact;n/Esccancel,yexits code 0 in ~2s and resets the active task toopen, and a second Ctrl+C within ~1s force-quits viaprocess.exit(1)(wrappercode=1, terminal left un-repainted; on builds whoseexithandler callsreleaseLockSyncthe force quit no longer leaves a lock file behind, on older ones it does). On older builds Ctrl+C is a complete no-op andkill -INTblanks the display and hangs, so always confirm which build you are on before blaming a change.
- Ctrl+Shift+C is indistinguishable from Ctrl+C in most terminals: konsole sends byte
0x03for both (verify withstty -isig; cat -v— Ctrl+Shift+C prints^C, Alt+C prints^[c), so the "copy" shortcut opens the interrupt dialog whenever the terminal does not consume it itself (konsole only consumes it when a konsole-level text selection exists). Alt+C is safely distinct. Clipboard contents cannot be verified on a box withoutxclip/xsel/wl-paste(that is whatsrc/utils/clipboard.tsshells out to on Linux) — record the clipboard write as untested. - Early-startup signals need timing, and are quirky: the app's SIGINT/SIGTERM handlers are not
installed for roughly the first ~0.7s. Drive it with
( sleep 0.5; kill -INT "$(pgrep -f "cli\.js run.*--epic $EPIC_ID")" ) & ./runwatch.sh ..., where$EPIC_IDis this run's epic — check the pattern matches exactly one pid (pgrep -cf ...) before signalling, and note the wrapper script is a different process from the CLI it launches, so signal the pid you matched rather than the wrapper. Do not usepkill -f 'dist/cli.js run': it hits every ralph r
Установить testing-tui-runtime в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл testing-tui-runtime?
How to drive the ralph-tui TUI (`run`, watch mode, pause/quit paths) end-to-end in a real terminal with a fake agent and a scratch beads tracker, without AI credentials.
Как установить скилл testing-tui-runtime?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл testing-tui-runtime запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic