Skip to content

feat: synchronize PTY terminal interactions - #182

Merged
konard merged 4 commits into
mainfrom
issue-174-24a45072a866
Jul 25, 2026
Merged

feat: synchronize PTY terminal interactions#182
konard merged 4 commits into
mainfrom
issue-174-24a45072a866

Conversation

@konard

@konard konard commented Jul 25, 2026

Copy link
Copy Markdown
Member

Closes #174.

Reproduction

The PTY capture layer added in #176 could send raw input and resize a terminal,
but interaction readiness accepted literal substrings only and applied the next
key immediately. Agentic TUIs repaint asynchronously, so tests could race a
partial render and had no built-in regex or quiescence synchronization.

The new JavaScript regression starts a raw-mode TTY, emits a delayed readiness
marker, and verifies that a raw Down-arrow sequence is not sent until the regex
matches and output has remained idle. The Rust terminal test exercises the
equivalent regex and idle controls.

Changes

  • accept JavaScript RegExp readiness markers and Rust after_regex patterns
  • add per-interaction idleMilliseconds / idle_duration quiescence waits that
    restart whenever PTY output arrives
  • preserve raw key, text, resize, TERM, live trace, and programmatic capture
    behavior in both implementations
  • document the complete PTY testing API and add a runnable raw-mode menu example
    that navigates to web_search and asserts on captured output
  • add JavaScript and Rust release fragments

Verification

  • PATH=<jq-bin> bun run test — 783 passed, 5 skipped, 0 failed
  • bun run check
  • bun js/examples/tui-e2e.mjs
  • cargo test --manifest-path rust/Cargo.toml --all-features
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets --all-features
  • cargo fmt --manifest-path rust/Cargo.toml --all -- --check
  • cargo package --manifest-path rust/Cargo.toml --allow-dirty
  • BASE_REF=main bash .github/scripts/check-language-parity.sh

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #174
@konard konard self-assigned this Jul 25, 2026
@konard konard changed the title [WIP] Driving interactive TUIs for e2e tests: PTY + programmatic output capture + raw keystroke/escape-sequence injection + size/quiescence helpers feat: synchronize PTY terminal interactions Jul 25, 2026
@konard
konard marked this pull request as ready for review July 25, 2026 16:31
@konard

konard commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Implemented and finalized PR #182.

Key changes:

  • Regex-based TUI readiness matching.
  • Output-quiescence waits before interactions.
  • Raw keystroke and escape-sequence regression coverage.
  • Matching JavaScript and Rust APIs.
  • Runnable web_search menu-navigation example.
  • Expanded PTY capture documentation and release fragments.

Verification:

  • JavaScript: 783 passed, 5 skipped.
  • Rust tests, doctests, clippy, formatting, and package checks passed.
  • CI passed across Bun, Node, Linux, macOS, and Windows.
  • PR is ready, mergeable, current with main, and the worktree is clean.

This summary was automatically extracted from the AI working session output.

@konard

konard commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.6 Sol
  • Provider: OpenAI
  • Public pricing estimate: $10.424061

📊 Context and tokens usage:

  • 180.5K / 200K (90%) input tokens, 19.2K / 128K (15%) output tokens

Total: (180.5K + 7.8M cached) input tokens, 19.2K output tokens, $10.424061 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.6-sol
  • Thinking level: low (~7999 tokens)
  • Model: GPT 5.6 Sol (gpt-5.6-sol)

📎 Log file uploaded as Gist (2213KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
konard merged commit 2208d55 into main Jul 25, 2026
22 checks passed
@konard

konard commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Auto-merged by hive-mind with --auto-merge flag

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.

Driving interactive TUIs for e2e tests: PTY + programmatic output capture + raw keystroke/escape-sequence injection + size/quiescence helpers

1 participant