Repository navigation
feat(desktop): hook up Open in Finder for v2 sidebar projects - #6073
Conversation
|
Ready to review this PR? Stage has broken it down into 1 individual chapter for you:
Chapters generated by Stage for commit a8b0c06 on Jul 31, 2026 8:01pm UTC. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe dashboard sidebar now opens locally hosted project repositories through Electron. It reports unavailable repository paths and failed open operations with error toasts. ChangesLocal project opening
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant DashboardSidebarProjectSection
participant LocalRepositoryPath
participant ElectronTRPCClient
participant ErrorToast
DashboardSidebarProjectSection->>LocalRepositoryPath: resolve project repository path
alt repository path unavailable
DashboardSidebarProjectSection->>ErrorToast: show unavailable path error
else repository path available
DashboardSidebarProjectSection->>ElectronTRPCClient: open repository path
ElectronTRPCClient-->>DashboardSidebarProjectSection: return operation result
DashboardSidebarProjectSection->>ErrorToast: show failure error when operation fails
end
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
How It Works
The project-section actions hook already queries
useHostProjects()(for the rename flow), and those rows carry each project'srepoPath, with the local host's replica winning that field in the merge. The handler looks up the project's row and only proceeds when the local machine is among the hosts serving it — guaranteeingrepoPathis a path on this machine — then calls the existingexternal.openInFinderelectron tRPC procedure (shell.showItemInFolder), same as the v2 workspace context menu. Remote-only projects get a "Project folder is not on this machine" error toast.Like workspaces and the v1 project header, this reveals the project folder highlighted inside its parent directory rather than opening the folder itself.
Testing
bun run typecheckbun run linthttps://claude.ai/code/session_013TPMhwhzMEe5RLShvs7Y5w
Summary by cubic
Enables Open in Finder in the v2 dashboard sidebar project menu, matching workspace behavior. Opens the local project folder and shows a clear error for remote-only projects.
useHostProjects()to resolve a localrepoPathand only proceeds if the current machine serves the project, then callselectronTrpcClient.external.openInFinder.Written for commit a8b0c06. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes