Skip to content

Let interactive dev servers take input: run --input, taba send, taba attach (Flutter hot reload) #68

Done

Description

@Buchi-dev-dzn

Priority: P2 · owner request (2026-11-26)

Some dev servers take keyboard input while running: flutter run (r hot reload, R hot restart, q quit), vite (r, o, q), rails console-like REPLs. taba starts services detached with no usable stdin, so this input is impossible today.

Proposal (opt-in, default unchanged):

  • taba run --input ... gives the service a stdin that stays open (a FIFO in the service's state dir on Unix, a named pipe on Windows; the read side must not hit EOF when no writer is connected).
  • taba send S/N TEXT [--no-newline] writes TEXT (plus newline by default) to that stdin; --key r style sugar for single keys is fine. Refuse with a clear error if the service was not started with --input. Same ownership rules as stop? No: sending input is a mutation of someone else's process, so apply the owner/borrow rules (owner or &mut borrow; others need --force --reason).
  • taba attach S/N: follow the log (like logs -f) and forward the human's keystrokes to the service's stdin in raw mode until Ctrl+] (or similar) detaches; the service keeps running after detach.
  • taba ui: on a service started with --input, a key (e.g. i) opens attach mode.
  • Optionally taba signal S/N USR1|USR2|HUP (owner rules apply): flutter run also hot-reloads on SIGUSR1 and hot-restarts on SIGUSR2, which works without stdin. Unix only; on Windows report unsupported.
  • ps --json shows "input": true for such services.

Acceptance: integration tests with a small stdin-reading script (send a line, see it echoed in the log; EOF does not occur with no writer; refusal when started without --input; ownership refusal); README section "Interactive dev servers (Flutter, Vite)" with flutter run and vite examples; SKILL.md tells agents how to trigger a hot reload. Windows support may land in a follow-up if named pipes are too much for one PR; say so in the PR.

Activity

  1. added
    enhancement
    P2
    on Nov 26, 2026
  2. Buchi-dev-dzn commented on Nov 26, 2026

    @Buchi-dev-dzn
    OwnerAuthor

    Taken by a nav worker on macOS; PR to follow. The owner wants to review before merge: N.A.V.i, please skip this one and don't merge its PR.

  3. Buchi-dev-dzn commented on Nov 26, 2026

    @Buchi-dev-dzn
    OwnerAuthor

    Design summary for interactive services (owner discussion 2026-11-26). Supersedes the --input FIFO design in the issue body.

    • Flag: --interactive with short -i (named like docker run -i); --no-interactive to opt out. Not --input (reads like "input file").
    • Interactive services run under a pseudo-terminal (PTY), because Vite and Flutter only accept their keys when stdin is a terminal. Non-interactive services stay as today (clean logs).
    • A small per-service holder process keeps the PTY master open (otherwise the service gets SIGHUP), writes output to the log and forwards input. It exists only for interactive services and ends with them. Owner decision pending (exception to "no resident process").
    • Auto-detection: flutter run and vite start interactive automatically, and taba prints interactive: yes. Owner decision pending (auto vs flag only).
    • Input happens in the log view: taba logs -f / taba ui log view are read-only by default; i enters input mode (shown on screen), Ctrl+] returns to read-only. taba attach S/N opens it directly. Viewing is free; typing needs owner or exclusive borrow.
    • Logs: taba logs and --json show cleaned text (ANSI stripped, \r progress collapsed); taba logs --raw shows the original.
    • Scripts and agents: taba send S/N r; taba reload S/N picks the most reliable method (for flutter run: SIGUSR1 reload, SIGUSR2 restart with --restart).
    • Phases: (1) macOS/Linux PTY + holder + log-view input + send + reload, (2) taba ui input mode, (3) Windows via ConPTY (separate issue).
  4. Buchi-dev-dzn commented on Nov 26, 2026

    @Buchi-dev-dzn
    OwnerAuthor

    Owner decisions final (2026-11-26): --interactive/-i, holder process allowed for interactive services only, auto-interactive for flutter run and vite. Work continues on Windows/WSL by N.A.V.i in PR #76.

  5. added 2 commits that reference this issue on Nov 26, 2026
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

    P2enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions