Add CLI support for naming and renaming tabs#668
Merged
Conversation
Make `supacode tab rename` acknowledge the outcome instead of the dispatch. The rename now settles through a `tabRenamed` terminal event, so a tab closed between the guard and the command reports a real error rather than exiting 0 having done nothing. Answer socket commands parked behind another command's confirmation dialog. A dialog holds exactly one response fd, but the ack path skipped the response for every command while any dialog was open. Those callers got no answer, and the app leaked the client fd for the rest of its life since only the response closes it. Reject tab titles that normalize away to nothing. Stripping control characters from a title gave the reducer and the tab manager two notions of "blank", and the weaker one guarded the door: `--title $'\e'` passed the check, normalized to nil, and was acked as applied; on rename it also wiped the tab's existing title. Both paths now gate on the tab manager's normalizer, keeping an empty title as the deliberate way to clear the override. Control characters are stripped, but the format characters that join emoji sequences survive. Also: - Alert when a terminal command's worktree vanishes mid-dispatch, so the CLI sees a failure instead of a silent ok. A confirmed `tab new` on a deleted worktree used to print the UUID of a tab that was never created. - Skip the completion ack when the dispatch already failed, so the caller gets the error instead of hanging until the timeout. - Stop `renameTab` from lazily resurrecting a pruned worktree's terminal state, and from persisting a layout when the rename did not apply. - Honor the title lock on tab creation, so a locked tab cannot be given a custom title it can never clear. - Document that script tabs have locked titles, fix the stale worktree-selection comments, and realign the tab block in the generated CLI skill.
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.
Closes #659
Summary
--titletosupacode tab newso tabs can be named atomically when created.supacode tab rename --titlewith worktree/tab environment defaults and empty-title clearing.Type of change
ready)How was this tested?
make checkpasses (format + lint)make testpassesAdditional verification:
make build-apppasses.make testrun completed with 2,452 passing tests, 13 expected failures, and one unrelated failure inPullRequestMergeQueueStatusTests/surfacesPositionAndEstimatedTime:~10 min leftversus~10 mins left. That test passes when rerun alone.AI tool disclosure (optional)
Checklist
Closes #above.ready.