Repository navigation
Conversation
…th no PR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Mobile now offers Create PR for a pushed feature branch that is ahead of the default branch and has no open PR. The action remains user-initiated and reuses the existing PR-creation path and permission checks. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Default-branch delta and Create PR eligibility packages/client-runtime/src/state/gitActions.ts, packages/client-runtime/src/state/vcs.test.ts |
The resolver uses aheadOfDefaultCount, falling back to aheadCount when it is nullish. When the branch has a positive delta and is not the default branch, it offers an enabled create_pr action. Tests cover this action and the up-to-date hint. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related issues
pingdotgg/t3code#28467— The issue concerns Create PR eligibility after a squash or rebase merge. This change adds an eligibility path but does not add a merged-PR check.pingdotgg/t3code#17716— The issue concerns detecting linked PRs on another ref. This change updates the quick-action resolver but does not add linked-PR detection.
Suggested reviewers: juliusmarminge, t3dotgg
Merge Risk: 
Minimal · up to e169e
-
The change enables Create PR for eligible pushed branches without introducing an established functional or merge-blocking risk.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the reproduction, implementation, scope rationale, focused tests, checks, simulator results, screenshots, and limitations.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Problem
On iOS, take a branch that has been pushed, is up to date with its upstream and has commits the default branch doesn't have, but has no PR. Its thread's Git quick action is a disabled Commit that says "Branch is up to date. No action needed." In the same state, web's quick action offers Create PR, and the mobile Git menu already enables Create PR.
To reproduce: push a feature branch with
git push -u origin <branch>without opening a PR, then open one of its threads in the iOS app.Change
Mobile uses the shared
resolveQuickActioninpackages/client-runtime. That copy was missing the final branch that web's copy inGitActionsControl.logic.tshas. It now returns Create PR (create_pr) under web's condition: commits ahead of the default branch, not on the default branch, and no open PR. Web keeps its own copy, which doesn't change. Android doesn't show these header controls.Scope and approval
There is no issue. This is a small fix for an obvious bug: mobile's copy left out a case web already handles. The fix reuses the existing Create PR action under web's conditions and adds no new action or workflow. The two
resolveQuickActioncopies also differ elsewhere (the no-remote and View PR cases); this PR leaves those alone and doesn't merge the copies.Verification
vp test run packages/client-runtime/src/state/vcs.test.ts packages/client-runtime/src/state/gitActions.test.ts: the newresolveQuickActioncase fails on main, which returns the "Branch is up to date" hint, and passes with the fix. All 14 tests pass.vp run check:changed 8760d063e903406c8e8f695b0852c0a15fc1e00f: format, lint, knip, typecheck (7 packages) and tests pass.Before: the Git menu's quick action is a disabled Commit that says the branch is up to date.
After: the same thread's quick action is Create PR.
Not checked: tapping Create PR on a device. It runs the same
create_praction as the existing "Push & create PR". Android has no header quick action. Web and desktop use their own copy, which doesn't change.Prior PRs
#2081 by notkainoa enabled Create PR on web for pushed branches ahead of main, adding a new server count. Julius closed it because web could already do this. This PR only brings mobile in line, using the existing counts.
Generated with Claude Opus 5.5 and GPT-6.1 Sol and GPT-6.1 Terra in T3 Code Nightly