Skip to content

fix: support Windows TUI control - #16

Open
matdev83 wants to merge 1 commit into
anomalyco:mainfrom
matdev83:fix/windows-tui-control
Open

fix: support Windows TUI control#16
matdev83 wants to merge 1 commit into
anomalyco:mainfrom
matdev83:fix/windows-tui-control

Conversation

@matdev83

@matdev83 matdev83 commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • make OpenTUI host handling respond to standalone cursor-position reports used during OpenCode startup
  • close the ConPTY master during Windows one-shot teardown and guard Unix-only EIO handling
  • add Windows named-pipe transport for persistent single sessions while preserving Unix sockets on macOS/Linux
  • update CLI help and README platform support notes

Root cause

OpenCode's TUI waits for a standalone CSI 6 n cursor-position response during startup. The host only replied as part of a larger OpenTUI capability probe. Persistent sessions were also compiled out on Windows because their control transport was implemented only with Unix sockets.

Impact

Windows can now launch and capture OpenCode through the PTY and orchestrate a persistent OpenCode TUI with start, show, send, wait, and stop. Unix and macOS continue using the existing Unix-socket implementation. Windows workspace attachment remains out of scope.

Validation

  • cargo fmt --all -- --check
  • cargo check --locked
  • cargo test --locked --lib shot::tests (10 passed)
  • live Windows persistent PowerShell input smoke test (GOT:HELLO)
  • live persistent OpenCode TUI test: render UI, inject prompt using termctrl send, wait for ORCHESTRATED_TUI_OK, capture response, and stop cleanly

@matdev83
matdev83 marked this pull request as ready for review August 2, 2026 13:03
@kitlangton

kitlangton commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Landed the standalone cursor-response fix in #25. The OpenTUI host now forwards actual query-time positions from Ghostty, including split and repeated queries, instead of dropping them or injecting home-position reports. The real-PTY regressions and Linux CI pass.

This only addresses the shared response path. Leaving the Windows transport and ConPTY teardown work in this PR for Windows-native verification.

@kitlangton

Copy link
Copy Markdown
Collaborator

The shared cursor-response fix is now released in Terminal Control 1.1.1 on crates.io and npm. Fresh registry-installed CLIs pass split/repeated cursor queries and the OpenTUI host checks, with actual query-time positions and no unsolicited home-position reports.

Windows session transport and ConPTY teardown remain outside this release and still need Windows-native verification.

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.

2 participants