Skip to content

feat(tui): start sessions in managed worktrees - #298

Merged
kingsword09 merged 1 commit into
mainfrom
feat/tui-worktree-new
Nov 24, 2026
Merged

kingsword09 merged 1 commit into
mainfrom
feat/tui-worktree-new

Conversation

@kingsword09

Copy link
Copy Markdown
Owner

Summary

  • Add a /new picker for the current checkout or a new managed Worktree.
  • Create detached Worktrees at .zcode/worktrees/<4-hex-bucket>/<repository-name> using the Desktop bucket format. Add the path to the repository-local .git/info/exclude when it is not already ignored.
  • Start the new runtime in the Worktree directory, preserving a monorepo session's relative subdirectory.
  • Add /worktree to list managed Worktrees and open one in a new session.
  • Bridge Worktree operations through the extracted runtime and add TUI and Git integration coverage.

Validation

  • bun run test:all
  • bun run typecheck
  • bun run check

Scope

Worktrees start detached at the current HEAD. Creation does not carry uncommitted or ignored files. /worktree currently lists and opens Worktrees, with removal and cleanup left for a follow-up. The bucket format and path suffix match Desktop. This CLI stores Worktrees under the project root, while Desktop currently resolves its managed root from the user data directory, so Desktop discovery of project-local Worktrees will require a corresponding Desktop change.

@github-actions

Copy link
Copy Markdown
Contributor

pkg-pr-new preview for commit 6e1c628ee7446f74135deb085cc95b67871a3450.

npx --yes https://pkg.pr.new/zcode-app-cli@6e1c628

Full repository URL

This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with /pkg-pr-new.

Workflow logs

@kingsword09
kingsword09 merged commit fff4b88 into main Nov 24, 2026
5 checks passed
@kingsword09
kingsword09 deleted the feat/tui-worktree-new branch November 24, 2026 10:18
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