Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the 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. Comment |
ApprovabilityVerdict: 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. |
There was a problem hiding this comment.
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.
Dismissing prior approval to re-evaluate 9d80ade

What Changed
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
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 throughlistRefs, 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, andSidebar.logic.test.ts.Note
Low Risk
UI-only branch display and draft bootstrap metadata; no auth or server contract changes. Extra
listRefsqueries 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 usesresolveBranchToolbarValue(env mode, worktree path, thread branch, live Git ref) so a untouched picker still records the checked-out branch.Sidebar V2 — Card rows use
resolveSidebarBranchLabelinstead of always showingthread.branch. Local (non-worktree) threads loadlistRefs(cached per project,limit: 2) to detect the default branch; worktrees rely ongitStatus.isDefaultRef. The label stays blank while that resolution is pending.Sidebar.logic — Adds
resolveSidebarBranchLabelwith 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
resolveSidebarBranchLabelhelper in Sidebar.logic.ts. The label is also suppressed until the default branch is determined.resolveBranchToolbarValueto resolve the branch instead of readingactiveThreadBranchdirectly, aligning the created thread's branch with what the toolbar shows.listRefsmay now be called in sidebar rows to determine the default branch when a thread has a branch but no worktree path.Macroscope summarized 9d80ade.