rfc: review and split TUI-recording changes from PR #79 (shell_wait_for, submit, hold_last_ms, EADDRINUSE)
- Dominant language
- TypeScript
- Stars
- 37
- Forks
- 5
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
Tracking issue for PR #79 (`feat/claude-tui-recording`) so the work is captured without needing to review the code now.
PR #79 bundles four changes that came out of recording a real interactive Claude Code session with Shellwright (Ark OKF spike). Needs review before merge — flagging here because it should probably be split and/or grounded in an RFC rather than landing as one feature-first PR.
## What the PR does
- **`shell_wait_for` tool** — wait server-side until the terminal buffer matches `pattern`, does not match `absent_pattern`, and has been stable for `stable_ms`. Replaces client-side `shell_read` polling loops when driving TUIs. Overlaps with #82 (reads go stale / session undrivable).
- **`shell_send` `submit` option** — paste text, settle (`submit_delay_ms`, default 1s), then send Enter as a separate keystroke. Works around a trailing `\r` being swallowed by bracketed paste in chat TUIs.
- **`shell_record_stop` `hold_last_ms`** (default 2s) — hold the final GIF frame so the ending doesn't flash past on loop.
- **HTTP `listen` error handling** — `EADDRINUSE` previously crashed silently after the startup banner; HTTP mode now exits loudly, stdio mode warns.
Plus new doc `docs/recording-claude-code.md` and reference driver `docs/examples/drive-claude.mjs`.
## Open questions to resolve before merge
- Should `shell_wait_for` be its own RFC (like #51, #56, #18) rather than shipping inside a feature PR?
- Does `shell_wait_for` supersede / partially close #82?
- Split the four changes into separate PRs? (wait_for + submit are TUI-driving; hold_last_ms is recording UX; EADDRINUSE is a bug fix.)
Related: #82, #22.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing PR #79 and the related issues #82 and #22, then read the listed docs additions: docs/recording-claude-code.md and docs/examples/drive-claude.mjs. Resolve whether shell_wait_for needs its own RFC, whether the four changes should be split, and whether #82 is superseded; the work is done when those decisions are documented and the changes have a clear review path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, typescript
- Domain
- cli, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100