GeezerVison is showing github.com — fix(web): keep thread branch metadata consistent by maxktz · Pull Request #4926 · pingdotgg/t3code
Conversation
maxktz
commented
Jul 30, 2026
•
edited by macroscopeapp
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What Changed
- save the checked-out branch when creating a thread without touching the branch picker
- consistently omit the default branch from sidebar rows while keeping custom branches visible
Why
The branch picker displayed the current branch without persisting it. This made equivalent threads look different depending on whether the default branch had been explicitly reselected.
Checklist
- This PR is small and focused
- I explained what changed and why
Show AI summary
New draft-thread bootstraps now derive their persisted branch with resolveBranchToolbarValue, using the live checkout from Git status while preserving explicit new-worktree base selections. Sidebar V2 resolves the persisted branch through listRefs, so default-branch rows keep their existing branch-free presentation whether or not the dropdown was touched. The tooltip continues to render the persisted branch directly.
Focused verification passed: web typecheck, formatting, lint, BranchToolbar.logic.test.ts, and Sidebar.logic.test.ts.
Note Low Risk
UI-only branch display and draft bootstrap metadata; no auth or server contract changes. Extra listRefs queries per local branch-backed row are bounded and project-scoped via query caching.
Overview
Aligns persisted thread branch with what the branch toolbar shows, and sidebar branch labels with the rule that default branches stay hidden.
Chat bootstrap — Draft thread creation no longer always saves activeThreadBranch. It now uses resolveBranchToolbarValue (env mode, worktree path, thread branch, live Git ref) so a untouched picker still records the checked-out branch.
Sidebar V2 — Card rows use resolveSidebarBranchLabel instead of always showing thread.branch. Local (non-worktree) threads load listRefs (cached per project, limit: 2) to detect the default branch; worktrees rely on gitStatus.isDefaultRef. The label stays blank while that resolution is pending.
Sidebar.logic — Adds resolveSidebarBranchLabel with unit tests.
Reviewed by Cursor Bugbot for commit 9d80ade. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix thread branch metadata consistency in sidebar and new thread creation
- Sidebar rows now hide the branch label when the thread's branch matches the default branch, using a new
resolveSidebarBranchLabel helper in Sidebar.logic.ts. The label is also suppressed until the default branch is determined.
- New thread creation in ChatView.tsx now uses
resolveBranchToolbarValue to resolve the branch instead of reading activeThreadBranch directly, aligning the created thread's branch with what the toolbar shows.
- Behavioral Change:
listRefs may now be called in sidebar rows to determine the default branch when a thread has a branch but no worktree path.
Macroscope summarized 9d80ade.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Jul 30, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 33611b40-e003-46e3-802c-601838ab8c7e
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved 9d80ade
This PR fixes thread branch metadata consistency by reusing an existing tested function and adding simple UI logic to hide redundant default branch labels. Changes are self-contained, use established patterns, and include unit tests.
You can customize Macroscope's approvability policy. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 388c89e. Configure here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Closing as part of the open-PR backlog sweep (wave 1).
Reason: Thread branch metadata; later #4986 records checkout branch so PR badges show.
Related: #4986
Reopen if this is still wanted and you’re willing to rebase onto current main.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
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.
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.
|