Skip to content

refactor: remove terminal workspaces - #19

Merged
kitlangton merged 1 commit into
mainfrom
refactor/remove-workspaces
Aug 24, 2026
Merged

refactor: remove terminal workspaces#19
kitlangton merged 1 commit into
mainfrom
refactor/remove-workspaces

Conversation

@kitlangton

Copy link
Copy Markdown
Collaborator

What

Remove Terminal Control's built-in terminal multiplexer: persistent workspaces, attachment, windows, panes, layouts, tab chrome, and their CLI/MCP controls.

Terminal Control remains focused on terminal automation through:

  • named background sessions with start, wait, send, show, save, logs, resize, restart, and stop
  • human-visible foreground sessions with run
  • isolated driver and TypeScript test sessions
  • recording, rendering, semantic snapshots, and direct-session MCP tools

This removes roughly 12,000 lines and prepares a breaking 1.0.0 release.

How

  • Delete src/workspace.rs, workspace benchmarks, attachment rendering, pane/window protocol variants, and workspace CLI/MCP schemas.
  • Reduce src/session.rs to one PTY process per session while preserving buffered socket transport, bounded output pumping, secure pruning, TERMCTRL_SESSION, semantic snapshots, and atomic MCP screen/status reads.
  • Keep foreground run cooperative: human input continues during agent waits, host responses come from the real terminal, terminal modes are restored on exit, and the child exit code is propagated.
  • Keep direct-session save_screen; MCP discovery defaults to running sessions.
  • Align README, agent skill, domain context, driver docs, Clap help, and repository guidance.

Scope

Testing

  • bun install --frozen-lockfile
  • cargo fmt --all -- --check
  • cargo test --all-targets (106 passed, 1 ignored)
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --release
  • bun run test:npm (12 client tests, 9 OpenTUI adapter tests)
  • bun run build:npm
  • bun run validate:npm
  • cargo package --list --allow-dirty
  • cargo package --allow-dirty
  • cargo publish --dry-run --locked --allow-dirty
  • Live background start / show / status / stop session
  • Live TERMCTRL_SESSION checks for background and foreground sessions
  • Live nested disposable-session identity isolation
  • Live foreground child exit-code propagation
  • Live concurrent agent wait plus human terminal input

Demo

The reduced CLI exposes sessions without workspace commands:

start  run  wait  send  status  list  prune  resize
mark   markers  logs  restart  stop  show  save  video
$ termctrl run exit-smoke -- sh -c 'exit 7'
$ echo $?
7

Flow

sequenceDiagram
    participant Human as Human terminal
    participant CLI as termctrl run
    participant Session as Single PTY session
    participant Agent as CLI / MCP agent

    Human->>CLI: run NAME -- COMMAND
    CLI->>Session: start one PTY process
    Session-->>Human: mirror terminal output
    Agent->>Session: wait / send / show / save
    Human->>Session: terminal input remains live
    Session-->>CLI: child exit status
    CLI-->>Human: restore terminal and propagate exit code
Loading

@kitlangton
kitlangton merged commit 9e83677 into main Aug 24, 2026
2 checks passed
@kitlangton
kitlangton deleted the refactor/remove-workspaces branch August 24, 2026 01:49
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.

1 participant