Skip to content

Add an interactive TUI for parallel task runs #3

Description

@mbullington

Problem

Parallel runs are hard to follow in streaming output. Status lines and child-process logs interleave, and it takes work to answer basic questions such as which tasks are running, which tasks were cached, and which task failed.

Remy's deploy:all:dev has a useful dashboard, but its full-screen repaint and status-grouped layout cause visible jitter. Turborepo's terminal UI provides another useful reference, especially its per-task output view.

Proposal

Add an optional interactive TUI to scripts run.

The scheduler should emit task lifecycle and output events to a reporter. Keep the current line-oriented reporter for non-interactive use, and add a TUI reporter for terminals.

Suggested behavior:

  • Keep tasks in a stable order while their status changes in place.
  • Show pending, running, cached, succeeded, failed, and skipped states.
  • Show elapsed time for running and completed tasks.
  • Capture output per task and provide a selectable log pane or tabbed pager.
  • Render on lifecycle events, with a low-frequency timer only for elapsed time.
  • Use terminal cell diffing instead of clearing and repainting the full screen.
  • Restore terminal state after success, failure, panic, or interruption.
  • Print a durable plain-text summary after leaving the alternate screen.
  • Preserve line-oriented output for CI, redirected output, and unsupported terminals.

A CLI such as --ui=auto|tui|stream would keep behavior explicit. auto could select the TUI only when the relevant streams are terminals.

Acceptance criteria

  • Parallel tasks have a stable, non-jittering task list.
  • A user can inspect output from each task while the run is active.
  • Cached tasks are distinguishable from tasks executed during the run.
  • --ui=stream retains composable, line-oriented output.
  • Non-TTY environments never emit cursor-control sequences.
  • Ctrl-C and failures leave the terminal usable and preserve useful diagnostics.

Activity

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions