Skip to content

Interactive services on Windows (ConPTY): run -i, send, attach, reload #79

Backlog

Description

@Buchi-dev-dzn

Follow-up to #68 / PR #76, which adds interactive services on macOS and Linux only. On Windows, taba run --interactive, taba send, taba attach and taba reload currently fail with E_UNSUPPORTED, and flutter run / vite are not made interactive automatically (they start as today, with no usable stdin).

Goal: the same behaviour on Windows using a pseudo console (ConPTY, CreatePseudoConsole, Windows 10 1809+).

What the Unix design does, to mirror on Windows:

  • Only stdin is a terminal; stdout and stderr still go to the log file.
  • A small per-service holder process (taba __hold) keeps the terminal open, forwards input from a per-service channel (inputs/<scope>/<name>.fifo on Unix; a named pipe on Windows), drains the terminal output, and exits with the service.
  • send / attach / log-view input mode (i, Ctrl+] leaves) write to that channel; ownership rules as in stop.

Open questions for Windows:

  • ConPTY attaches the pseudo console to all three standard handles of the child. Getting "stdin only" may need PSEUDOCONSOLE_INHERIT_CURSOR tricks or redirecting stdout/stderr explicitly after STARTUPINFOEX setup; check what Node (process.stdin.isTTY) and Dart (stdin.hasTerminal) see.
  • The service already has its own hidden console and Job Object (Ctrl+Break stop). Check that the pseudo console does not break Ctrl+Break delivery or job membership.
  • Flutter's SIGUSR1/SIGUSR2 reload does not exist on Windows; taba reload would have to send r / R on stdin there.

Acceptance: the tests/input.rs scenarios (send, attach from a pipe, ownership, reload, log-view input mode) pass on windows-latest; README "Interactive dev servers" drops the "macOS and Linux only" note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions