feat(sidebar): worktree indicator on session rows#3057
Conversation
Sessions running in a git worktree now show a small FolderGit2 icon next to the row timestamp, with a tooltip giving the worktree folder name and branch. Uses the worktreePath already present on the thread summary, so no extra git calls are needed.
|
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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes 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 55144b2. Configure here.
|
|
||
| rmSync(targetAppBundlePath, { recursive: true, force: true }); | ||
| cpSync(sourceAppBundlePath, targetAppBundlePath, { recursive: true }); | ||
| // verbatimSymlinks keeps the framework's relative symlinks intact |
There was a problem hiding this comment.
Cached bundle skips symlink fix
Medium Severity
buildMacLauncher now copies with verbatimSymlinks, but when an existing .electron-runtime bundle matches metadata.json, it returns that copy without rebuilding. Upgrades from a broken staged bundle keep the old absolute symlinks, so pnpm start:desktop on macOS can still hit ICU/GPU helper crashes until .electron-runtime is deleted manually.
Reviewed by Cursor Bugbot for commit 55144b2. Configure here.
There was a problem hiding this comment.
This finding refers to the launcher change, which has been split out of this PR into #3058. It is addressed there: LAUNCHER_VERSION is bumped so previously staged bundles with rewritten symlinks are invalidated and re-copied instead of being reused by the metadata check. This PR is now sidebar-only.
ApprovabilityVerdict: Needs human review An unresolved review comment identifies that the electron launcher fix may be incomplete - cached bundles could bypass the verbatimSymlinks fix and still experience crashes. This substantive concern warrants human review. You can customize Macroscope's approvability policy. Learn more. |
55144b2 to
53e6269
Compare


Sessions running in a git worktree now show a small FolderGit2 icon in the sidebar row, next to the terminal-status icon, with a tooltip giving the worktree folder and branch. This makes worktree sessions distinguishable from main-checkout sessions at a glance.
Detection uses the existing
thread.worktreePath, no extra git calls. The indicator sits in the row's right-side cluster rather than inside the timestamp/meta span, because that span ispointer-events-noneand fades on row hover, which makes tooltips there unreachable.Tooltip on hover:
Verified in a live session with real worktree threads (screenshots above).
vp checkand typecheck pass.🤖 Generated with Claude Code
Note
Low Risk
Read-only UI driven by existing
thread.worktreePath; no backend or git behavior changes in this diff.Overview
Sidebar session rows now show a worktree indicator when
thread.worktreePathis set (after trim): a smallFolderGit2icon sits in the row’s right-side action cluster, beside the terminal-status icon, not in the timestamp/meta area that usespointer-events-noneand fades on hover.The tooltip uses
formatWorktreePathForDisplayand includes the branch when present (e.g.Worktree: … (branch)). No new git calls—only existing thread metadata.Reviewed by Cursor Bugbot for commit 53e6269. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add worktree indicator icon to session rows in the sidebar
In Sidebar.tsx,
SidebarThreadRownow shows aFolderGit2Icon(from lucide-react) for threads that have a non-emptyworktreePath. The icon is wrapped in a tooltip that displays the formatted worktree path viaformatWorktreePathForDisplay, with the branch name appended when available.Macroscope summarized 53e6269.