Skip to content

P1: Upgrade Terminal from a piped command box to an interactive worktree terminal #1184

Closed

Description

@currentbits

Audit #1180, 2026-09-10. Baseline: checkout 9fc8645; fetched origin/main bf6fb02 has identical relevant implementation. This is implementation backlog, not a shipped fix.

User problem

The pane cannot handle normal terminal work: interactive prompts, shell completion, foreground interruption, pagers, colored output and cursor control. Restart is the only interruption path and destroys shell state and scrollback.

electron/terminal.js explicitly documents the pipe limitation. It uses TERM=dumb and pipe stdio and strips ANSI. src/components/TerminalPane.tsx renders plain text and a separate line input.

Scope

Add an actual PTY and terminal renderer inside the existing pane layout, keeping one session per thread initially. Support raw input, resize, bounded scrollback, reconnect and explicit close through typed IPC. Batch output; avoid polling idle/hidden panes four times a second. Integrate correct execution-root/session ownership before expanding features.

Acceptance

  • Completion, an interactive read prompt and a pager work; ANSI colors/cursor rewrites render correctly.
  • Ctrl-C interrupts a foreground command while preserving a usable shell and its environment.
  • Pane resize updates terminal rows/columns.
  • Selection, copy/paste, keyboard focus and accessible labeling work.
  • Reattachment restores bounded output; no keystrokes/output cross threads.
  • Verify packaged builds, including native dependency bundling, macOS signing and Windows/Linux targets. Current packaging hand-copies dependencies, the reason Integrated terminal drawer scoped to the thread worktree #147 deferred PTYs.
  • Test SSH/WSL or explicitly expose unsupported capability; never run a supposedly remote terminal locally.

Non-goals: extra terminal tabs, multiplexing or a docking framework. Follow-up to the deliberately limited shipped #147.

Activity

  1. added and removed on Oct 9, 2026
  2. currentbits commented on Oct 9, 2026

    @currentbits
    OwnerAuthor

    Gap pass #1532 checked this against main @24d3c36b (v0.24.0): shipped in #1499 (dbedcf1, 16dc49e).

    • A real PTY via @lydell/node-pty, xterm-256color, a 5k-line scrollback that is replayed after restart, resize, copy, and an aria label (electron/terminal.js, src/components/TerminalPane.tsx).
    • SSH projects get a "not available" message instead of a local shell.
    • node-pty is bundled in package-app.sh and package-cross.sh.

    Two small leftovers, each worth its own small issue: without the PTY addon, Ctrl-C does nothing (terminal.js:503); and on WSL the shell starts in the project root, which is tracked on #1183.

  3. added and removed on Oct 9, 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions