feat: close terminal tabs through the api - #742
Open
NarwhalChen wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
NarwhalChen
force-pushed
the
feat/api-tab-close
branch
from
September 1, 2026 15:20
e49c36f to
3d7af7e
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
rove api tab-close --task-id <id> --tab tab-Nverb so a Terminal Tab can be closed from the CLI instead of only via ctrl+w in the TUI.terminalTab.close→ TUI's existing ctrl+w close path →closeReply), so close semantics — including last-tab behavior — are exactly the manual ones.closeTabpure 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.TAB_NOT_FOUND+ hint +nextCommandArgs.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=1daemon handlers (28) ✓, bun-test render suite (10) ✓.