Milestone 3.1: Overview #7

Open
opened 2026-07-24 03:22:35 +00:00 by david · 0 comments
Owner

Overview

Update branch display automatically when switching worktrees via git_worktree_switch.

Acceptance Criteria

  • After successful switch, pi's footer data provider picks up the new HEAD file automatically
  • Branch display updates to show the correct branch name for the new worktree
  • No additional code needed beyond cwd change (pi handles it internally)

Implementation

// In git_worktree_switch execute function, after changing cwd:
ctx.ui.notify(`Switched to worktree at ${targetPath}`, "info");
// Pi's footer data provider will pick up the new HEAD file automatically
// when it detects the cwd change. No additional code needed for branch display.

Validation

  • Switch to a worktree on feature-x — verify pi's footer shows feature-x
  • Switch back to main — verify pi's footer shows main (or whatever the main branch is)
# Overview Update branch display automatically when switching worktrees via `git_worktree_switch`. ## Acceptance Criteria - [ ] After successful switch, pi's footer data provider picks up the new HEAD file automatically - [ ] Branch display updates to show the correct branch name for the new worktree - [ ] No additional code needed beyond cwd change (pi handles it internally) ## Implementation ```typescript // In git_worktree_switch execute function, after changing cwd: ctx.ui.notify(`Switched to worktree at ${targetPath}`, "info"); // Pi's footer data provider will pick up the new HEAD file automatically // when it detects the cwd change. No additional code needed for branch display. ``` ## Validation - Switch to a worktree on `feature-x` — verify pi's footer shows `feature-x` - Switch back to main — verify pi's footer shows `main` (or whatever the main branch is)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: david/pi-worktrees#7
No description provided.