Repository navigation
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 30 minutes. View limit details
Comment |
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The PR is a focused mobile bug fix, but it changes the default base branch used for untouched new-worktree creation when Git status loads asynchronously. That product-default change warrants human review despite the small, tested implementation. You can add or adjust custom eligibility rules. Learn more. |
Problem
On mobile, opening Branches & worktrees before Git status loads can leave the new worktree's base set to
main, even after status reportsrelease/stable. Stale thread metadata can leave an old branch in the field instead. Creating the worktree then uses the wrong base or fails if that ref does not exist.Change
Keep only the user's edit in state. Until the field is edited, derive its value from the current branch so a status response updates the default. Once edited, preserve the entered value, including an empty field.
Scope and approval
This is a very small, focused fix for an obvious bug, under the exception in CONTRIBUTING.md: the sheet's default ignores Git status that arrives after it opens. It changes no product default and no other branch-selection flow. No issue or maintainer approval is claimed. It affects the shared iOS and Android sheet. Branch selection elsewhere is unchanged.
Verification
cd apps/mobile && pnpm exec vp test run --project react src/features/threads/git/GitBranchesSheet.test.tsx: base production source fails two cases by submittingmainor stale metadata. Candidate passes all four, including edited and cleared input. No timers or polling. This re-adds the sheet test path that test: delete 11k low-signal tests so CI runs faster and flakes less #22557 pruned; it now covers only the late-status default and its edit-preserving counterpart.pnpm --filter @t3tools/mobile typecheckpasses. Targetedpnpm exec vp lintandpnpm exec vp fmt --checkpass on the sheet, test and mobile test configuration.main; candidate usesrelease/stable. Both candidates create a worktree through the UI, and Git confirms its branch starts at therelease/stablecommit. An edited base also keeps its value after status resumes. Device runs and services were cleaned up.Not checked:
The base retains
mainalongside the checked-outrelease/stablebranch.The candidate's untouched base follows the loaded branch.
Edited bases remain entered:
masteron iOS andcustom-baseon Android.The regression fails on the base and passes on the candidate.
Prior PRs: Jacob's open #20754 changes jj terminology in this sheet and keeps its one-time base initialization, so it does not fix this stale default; it also rewrites the same initializer lines, so whichever lands second needs a small rebase. Julius Marminge's #22980 and Alex's #22551 change this sheet's header and layout only. This patch reuses no code from them.
Production fix, tests, PR description and images written with GPT-6.1 Sol in T3 Code Nightly.
🤖 Generated with GPT-6.1 Sol in T3 Code Nightly