GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(forgejo): a fork's same-named branch no longer hides the branch's own pull request by only21mil · Pull Request #33704 · pingdotgg/t3code

Conversation

@only21mil

@only21mil only21mil commented Nov 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Problem

On Forgejo and Gitea, T3 Code can lose the pull request for the branch you are on when forks have pull requests from a branch with the same name, such as feature. pulls?head=feature matches that name in every fork, and T3 Code reads it most recently updated first. Forgejo defines no headBranchProbe, so GitManager keeps 1 open row, or 20 of any state, and its owner check then drops the fork rows. So:

  • With more than 20 fork pull requests on that name updated after the branch's own, the branch status shows no pull request, and the Version Control panel offers Create PR.
  • With one fork pull request updated after the branch's own, a push on Forgejo returns Create PR instead of View PR as its follow-up action: Forgejo records the push on the pull request about a second after replying. The web client does not show this action. By the code, the mobile client shows a link only for View PR.

Change

Forgejo gets the headBranchProbe the GitHub and Azure DevOps providers already have: it drops owner:branch selectors and reads 100 rows. Forgejo sends the bare branch for both selectors, and the caller checks owners. This follows saphid's merged #29817 for Azure DevOps; #29791 (GitLab) and #29751 (Bitbucket) are open.

Cost: below 50 matches the open lookup reads one more, empty page (seen in Forgejo's access log). The any-state lookup is unchanged below 20 matches.

Scope and approval

This is a small fix with no issue: one 5-line provider hook, the same as the GitHub and Azure DevOps hooks, plus one test. No open PR adds a Forgejo probe. #33675 (deleted head branches) and #25569 (Gitea scan cache) edit listChangeRequests next to it, not the probe.

Verification

  • vp test run src/server/ForgejoSourceControlProvider.test.ts in packages/source-control-forgejo: the new test fails on main (expected [ 9 ] to deeply equal [ 9, 4 ]) and passes here; 65/65 package tests and vp run check:changed pass.
  • Loopback Forgejo 17.0.1 and Gitea 28.3.0 with synthetic users, tea 0.16.0 as maria, a T3 dev server, and the web client clicked in the Browser panel, on main d1909d6 and on this head 7ae6f73. Branch feature of maria/project has open pull request oxc stack #1.
  • One fork pull request updated after oxc stack #1, then Push in the Browser panel. Follow-up action as I read it from the server's push reply: Forgejo main Create PR 3 of 3, this branch View PR oxc stack #1 2 of 2. Gitea main is already right (View PR oxc stack #1, 2 of 2), because Gitea records the push before replying. These are counts from the run; the raw replies were not kept, and no client shows this action, so this bullet has no capture. The status kept oxc stack #1 throughout, so Create PR was never offered.
  • 21 fork pull requests updated after oxc stack #1:
main d1909d6 This branch 7ae6f73
Forgejo Forgejo main: no pull request, Create PR Forgejo this branch: pull request #1 with Merge
Gitea Gitea main: no pull request, Create PR Gitea this branch: pull request #1 with Merge
  • Codeberg (Forgejo 17.0.0), real provider with only the CLI's API call replaced by fetch: repos/forgejo/forgejo/pulls?state=open&head=forgejo returns 8 pull requests from 8 forks. main keeps 1 open and 20 of any state; this branch keeps 8 and 84.

Not checked: the mobile client, where the push follow-up shows.

Generated with Claude Opus 5.5 in T3 Code Nightly

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@only21mil @claude
fix(forgejo): a fork's same-named branch no longer hides the branch's…
7ae6f73
… own pull request

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 10, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 7ae6f73

Macroscope's review found this PR approvable — Forgejo branch lookup now considers more pull requests so a fork's same-named branch does not hide the intended match. Existing repository and owner matching remains in place; the change affects read-only discovery.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 10, 2026
View reviewed changes
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Forgejo provider adds a head-branch probe that filters selectors containing : and sets a limit of 100. A new test checks results when a fork and the base repository have pull requests with the same head branch.

Changes: Forgejo head-branch lookup

Layer / File(s) Summary
Head-branch probe and coverage
packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.ts, packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.test.ts
The provider adds a probe that filters selectors containing : and sets a limit of 100. The test checks that pull requests from a fork and the base repository are both returned for the same head branch.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • [Bug]: Gitea has no head= filter and no upgrade path, so every Forgejo-provider PR lookup reads the whole pull request list #23551: The change adds a head-branch probe in the shared Forgejo lookup path, but does not establish whether Gitea applies the head filter or whether the request cost changes.

Suggested labels: size:S

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 7ae6f

The change addresses the reported branch lookup failure, and no actionable issue is established from the available evidence. It is mergeable after normal checks.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly describes the fix: a fork’s same-named branch no longer hides the pull request for the current branch.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the template sections: Problem, Change, Scope and approval, and Verification. The Problem section explains the Forgejo fork same-name branch bug and its user-visible effects. Th…
Full details: Description check

Explanation

The description covers the template sections: Problem, Change, Scope and approval, and Verification. The Problem section explains the Forgejo fork same-name branch bug and its user-visible effects. The Change section explains the headBranchProbe addition and its request-cost tradeoff. The Scope section explains why no prior issue is linked and why the change is small. The Verification section lists focused test commands, before/after results, a local browser test on Forgejo and Gitea with screenshots, a Codeberg check, and items not checked (mobile client). The model and harness are named at the end, as the template requests.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: e89abad
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: de7942b6-c294-41ea-aebb-4cfbd80ecedd
Commits

Reviewing files that changed from the base of the PR and between e89abad and 7ae6f73.

Files selected for processing: 2

  • packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.test.ts
  • packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.ts

Limit details: You’ve used all 10 included reviews currently available.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Yuruzuu Yuruzuu mentioned this pull request Nov 10, 2026
perf(server): status refresh on a fork's default branch is 2.5x faster (median 7,826 to 3,168 ms) #33954
Merged
@only21mil

only21mil commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Note

🤖 Opus 5.5 replying on behalf of Victor.

Closing this to bring my open PRs down under the new limit. The branch stays on my fork if it is useful.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@only21mil only21mil closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@only21mil
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.