Skip to content

fix(server): a fork uses the repository gh repo set-default chose - #524

Merged
adampeterhiggins merged 3 commits into
mainfrom
ah/fix-fork-pr-suggestions
Nov 1, 2026
Merged

adampeterhiggins merged 3 commits into
mainfrom
ah/fix-fork-pr-suggestions

Conversation

@adampeterhiggins

@adampeterhiggins adampeterhiggins commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

In a fork with an upstream remote, T3 Code always treated upstream as the project's repository, even after gh repo set-default origin. Typing #522 offered pingdotgg/t3code#522, the pull request list showed upstream, and the fork's own pull requests were never matched to their threads.

The repository resolver now uses the remote gh repo set-default chose, and falls back to the existing order when none is set. Every feature that reads the project's repository follows it: the # menu, the pull request list, #123 links, branch pull request discovery, and thread settlement.

This replaces the earlier workarounds that stored the fork separately in webUrl (#433 and this branch's first two commits). The last commit is the whole change against main.

Delegating a task to another machine now matches projects by repository group, so the same fork still matches when only one machine has the gh default set.

Test plan

  • Resolver test: a fork with gh-resolved base on origin resolves to the fork (fails on main)
  • Delegation test: the fork matches its copy on another machine that resolves to upstream (fails before the change)
  • vp run check:changed
  • Restart the server, type #522 in this checkout, and confirm it offers adampeterhiggins/t3code#522

Claude Opus 5.5 via Claude Code

🤖 Generated with Claude Code

adampeterhiggins and others added 3 commits November 1, 2026 10:50
A checkout with both remotes is identified as upstream, and the repository gh opens pull requests in is only recorded as webUrl. The menu listed upstream, so a number offered the upstream pull request. It now requests that webUrl repository, which the list accepts and nothing else.

Grok 4.7 via Cursor

Co-authored-by: Cursor <[email protected]>
Typecheck rejected reading the identity after the web URL guard.

Grok 4.7 via Cursor

Co-authored-by: Cursor <[email protected]>
A project's repository identity always named the `upstream` remote, so in a
fork whose `gh repo set-default` is `origin` the pull request list, the `#`
menu and branch pull request discovery used upstream. #433 patched `#123`
links with a separate `webUrl`, and the previous commits on this branch
patched the `#` menu the same way.

The identity resolver now picks the remote gh marked
(`remote.<name>.gh-resolved base`) before upstream's order, so every
consumer sees the fork. The `webUrl` workarounds are reverted. Delegating to
another machine matches projects by repository group, which names a fork the
same way whichever remote each machine's gh prefers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@adampeterhiggins adampeterhiggins changed the title fix: the # menu lists a fork's pull requests fix: a fork's repository follows gh repo set-default Nov 1, 2026
@adampeterhiggins adampeterhiggins changed the title fix: a fork's repository follows gh repo set-default fix(server): a fork uses the repository gh repo set-default chose Nov 1, 2026
@adampeterhiggins
adampeterhiggins merged commit 8f23721 into main Nov 1, 2026
@adampeterhiggins
adampeterhiggins deleted the ah/fix-fork-pr-suggestions branch November 1, 2026 11:06
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