Add worktree transfer options and branch PR prefetch#165
Conversation
SDSLeon
commented
Jun 13, 2026
- Feature + refactor: add worktree creation modes for carrying uncommitted changes into a new worktree or leaving them in the source checkout.
- Prefetch PRs by head branch so branch selector rows and review overlays can show PR state even when a branch is not currently checked out as a worktree.
- Thread the new worktree and PR metadata through the renderer, shared contracts, IPC, and supervisor git/GitHub services.
- Update composer, branch selector, and overlay UI plus tests to cover the new flows and state handling.
- add branch selector and composer controls for transferring or keeping uncommitted changes - plumb transfer state through git contracts, worktree creation, and refresh handling - bulk-list PRs by head branch and key review overlays off branch/worktree identity
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee0a55c641
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const result: Record<string, PrData> = {}; | ||
| for (const [branch, group] of byBranch) { | ||
| const latest = selectLatestPr(group); | ||
| if (latest) result[branch] = mapPrData(latest); |
There was a problem hiding this comment.
Preserve viewer authorship for branch PR reviews
listPrs now feeds the branch-name PR cache that BranchSelector passes to PrReviewOverlay for non-worktree rows, but this call maps PRs without a viewer login, so viewerDidAuthor is never set. For PRs authored by the current GitHub user opened from the branch selector, SubmitReviewPopover sees viewerDidAuthor === undefined and shows self-review controls that GitHub rejects; either include author + viewer login here or refresh full PR data before opening the overlay.
Useful? React with 👍 / 👎.
| } = props; | ||
| const canDelete = !isCurrent; | ||
|
|
||
| const prKey = worktreePath ?? buildBranchNamePrKey(projectId, branch.name); |
There was a problem hiding this comment.
Fall back to branch PR data for idle worktrees
When a branch has a worktree path, this row only reads PR data from the worktree-path key. The new bulk prefetch stores PRs under buildBranchNamePrKey, and no worktree-path PR entry is created for worktrees that do not currently have an active thread, so those worktree branch rows never show the prefetched PR icon/open-review action even though ghListPrs returned it; use the branch-name key as a fallback when the worktree key is empty.
Useful? React with 👍 / 👎.