Skip to content

Fix fork PR matching and always show worktree trailing info#229

Merged
sbertix merged 1 commit intomainfrom
sbertix/main-merged
Apr 12, 2026
Merged

Fix fork PR matching and always show worktree trailing info#229
sbertix merged 1 commit intomainfrom
sbertix/main-merged

Conversation

@sbertix
Copy link
Copy Markdown
Collaborator

@sbertix sbertix commented Apr 12, 2026

Summary

  • Fix PR matching so fork PRs (e.g. vadimi:main) no longer falsely associate with the local main branch. The fallback now checks baseRefName to distinguish whether the local branch is the PR's target or source, conservatively excluding PRs with unknown base refs.
  • Remove the isBusy guard in WorktreeRow's TrailingView so diff stats and PR badges are always visible, even while a task is running.

Test plan

  • ignoresForkPRWhenBaseRefMatchesBranch — fork PR excluded when baseRefName matches local branch
  • matchesForkPRWhenBaseRefDiffersFromBranch — fork PR included when baseRefName differs
  • skipsNilHeadRepositoryInForkFallback — nil headRepository excluded in fallback
  • excludesForkPRWithNilBaseRefName — nil baseRefName conservatively excluded
  • Existing tests (mapsGraphQLAliasesToBranches, prefersOpenOverMergedEvenIfOlder, fallsBackToLatestMerged) still pass
  • Build succeeds

Fix PR matching so fork PRs (e.g. vadimi:main) no longer falsely
associate with the local main branch. The fallback now checks
baseRefName to distinguish whether the local branch is the PR's
target or source, conservatively excluding PRs with unknown base refs.

Also remove the isBusy guard in WorktreeRow's TrailingView so diff
stats and PR badges are always visible, even while a task is running.
@sbertix sbertix merged commit 4a15af5 into main Apr 12, 2026
1 check passed
@sbertix sbertix deleted the sbertix/main-merged branch April 12, 2026 15:27
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