Skip to content

feat: close terminal tabs through the api - #742

Open
NarwhalChen wants to merge 2 commits into
mainfrom
feat/api-tab-close
Open

feat: close terminal tabs through the api#742
NarwhalChen wants to merge 2 commits into
mainfrom
feat/api-tab-close

Conversation

@NarwhalChen

Copy link
Copy Markdown
Collaborator

Summary

Adds a rove api tab-close --task-id <id> --tab tab-N verb so a Terminal Tab can be closed from the CLI instead of only via ctrl+w in the TUI.

  • Attached TUI: the daemon brokers the request to the attached client (terminalTab.close → TUI's existing ctrl+w close path → closeReply), so close semantics — including last-tab behavior — are exactly the manual ones.
  • Headless: reuses the same closeTab pure transition on the persisted tab snapshot (fresh-state transaction so a stale CLI snapshot can't clobber a newer TUI tab list), then kills every hosted PTY session the tab owns via the PTY host.
  • Unknown/already-gone tabs fail loud with TAB_NOT_FOUND + hint + nextCommandArgs.
  • Registered in rove api schema; docs (docs/API.md), skill reference (references/api-flags.md) and skill version bumped in the same change; patch changeset included.

Verification

Local, in the task worktree: bun run lint ✓, tsc --noEmit ✓, vitest cli suites (100 tests) ✓, KOBE_INCLUDE_SOCKET=1 daemon handlers (28) ✓, bun-test render suite (10) ✓.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
kobe-landing Ignored Ignored Preview Sep 1, 2026 3:24pm UTC

Request Review

Add a tab-close verb that reuses the attached TUI close lifecycle and falls back to snapshot plus hosted PTY cleanup when headless. Register the schema, document the contract, and cover attached, headless, last-tab, and structured-error behavior.
The rebased branch left remote-orchestrator.ts at 501 lines, one over the
file-size cap. Inlining the terminalTab.closeReply RPC in the class also broke
the file's own write-methods-are-one-line-delegates pattern; the body now
lives in remote-orchestrator-writes.ts as replyTabCloseOp.
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