fix(mobile): show checkout branch for phone-created threads - #9475
Open
Adamulek123 wants to merge 2 commits into
Open
fix(mobile): show checkout branch for phone-created threads#9475Adamulek123 wants to merge 2 commits into
Adamulek123 wants to merge 2 commits into
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped mobile display fix that falls back to the live checkout branch only for local threads missing a stored branch, while preserving existing branch and worktree behavior. Its added VCS access reuses the existing deduplicated read-only status stream and the resolution logic has focused test coverage. You can add or adjust custom eligibility rules. Learn more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Threads created from mobile can persist without a branch while VCS status is still loading, leaving the branch line blank even though the environment has a checked-out branch.
Changes
Before:
After:
Testing
vp test run apps/mobile/src/state/thread-display-branch.test.ts(5 passed)vp run --filter @t3tools/mobile typecheckT3_Pixel_API_36) against a disposable local server and a thread fixture withbranch = NULLandworktree_path = NULLBuilt with GPT-5.6 Codex in T3 Code.
Note
Low Risk
Display-only change with stored branch unchanged for PR/compare logic; reuses an existing VCS status subscription pattern.
Overview
Fixes thread list rows that showed a blank branch when
thread.branchwas never persisted (common for threads created on phone while VCS status was still loading).Adds
resolveThreadDisplayBranchanduseThreadDisplayBranch: stored branch still wins; for local threads with no branch, the row shows the live checkout from the existing deduplicatedvcsEnvironment.statusquery. Worktree threads do not use that fallback.Both
thread-list-itemsandthread-list-v2-itemsnow render the derived branch in subtitles instead ofthread.branchdirectly. Unit tests cover precedence, worktree exclusion, and trimmed empty strings.Reviewed by Cursor Bugbot for commit 9f8562a. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Show live checkout branch for phone-created threads in mobile thread list
resolveThreadDisplayBranchutil anduseThreadDisplayBranchhook to resolve a display branch: nonblank stored branch wins, otherwise fall back to the live checkout branch for local threads with a known cwd, and return null for worktree threads or unknown checkoutsThreadListRowandThreadListV2Rowto render the resolved branch in the subtitle instead ofthread.branchuseThreadDisplayBranchin use-thread-display-branch.ts does not trigger status queries for worktree threadsMacroscope summarized 9f8562a.