Skip to content

feat(sidebar): worktree indicator on session rows#3057

Open
TheIcarusWings wants to merge 1 commit into
pingdotgg:mainfrom
TheIcarusWings:fix/sidebar-worktree-indicator
Open

feat(sidebar): worktree indicator on session rows#3057
TheIcarusWings wants to merge 1 commit into
pingdotgg:mainfrom
TheIcarusWings:fix/sidebar-worktree-indicator

Conversation

@TheIcarusWings

@TheIcarusWings TheIcarusWings commented Jun 12, 2026

Copy link
Copy Markdown

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 is pointer-events-none and fades on row hover, which makes tooltips there unreachable.

Before After
before after

Tooltip on hover:

tooltip showing worktree folder and branch

Verified in a live session with real worktree threads (screenshots above). vp check and 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.worktreePath is set (after trim): a small FolderGit2 icon sits in the row’s right-side action cluster, beside the terminal-status icon, not in the timestamp/meta area that uses pointer-events-none and fades on hover.

The tooltip uses formatWorktreePathForDisplay and 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, SidebarThreadRow now shows a FolderGit2Icon (from lucide-react) for threads that have a non-empty worktreePath. The icon is wrapped in a tooltip that displays the formatted worktree path via formatWorktreePathForDisplay, with the branch name appended when available.

Macroscope summarized 53e6269.

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.
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

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

Run ID: a6c932e4-cd2a-4922-8dec-3d6b5c38b1e0

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:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jun 12, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 and found 1 potential issue.

Fix All in Cursor

❌ 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 55144b2. Configure here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@macroscopeapp

macroscopeapp Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@TheIcarusWings TheIcarusWings force-pushed the fix/sidebar-worktree-indicator branch from 55144b2 to 53e6269 Compare June 12, 2026 13:49
@TheIcarusWings TheIcarusWings changed the title feat(sidebar): worktree indicator on session rows (+ fix mac start:desktop launcher) feat(sidebar): worktree indicator on session rows Jun 12, 2026
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant