Skip to content

feat(desktop): hook up Open in Finder for v2 sidebar projects - #6073

Merged
saddlepaddle merged 1 commit into
mainfrom
open-finder-v2-projects
Jul 31, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
open-finder-v2-projects

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the "Open in Finder is coming soon" stub in the v2 dashboard sidebar's project context menu with a working implementation, matching what workspaces already do.

How It Works

The project-section actions hook already queries useHostProjects() (for the rename flow), and those rows carry each project's repoPath, 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 — guaranteeing repoPath is a path on this machine — then calls the existing external.openInFinder electron 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 typecheck
  • bun run lint
  • Manual: not exercised in the running app — the wiring mirrors the adjacent workspace-item handler verbatim. Worth a quick click-through: right-click a local project → Open in Finder reveals the repo folder; a remote-only project shows the error toast.

https://claude.ai/code/session_013TPMhwhzMEe5RLShvs7Y5w


Open in Stage

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.

  • New Features
    • Uses useHostProjects() to resolve a local repoPath and only proceeds if the current machine serves the project, then calls electronTrpcClient.external.openInFinder.
    • Shows toast errors when the project folder isn’t on this machine or if the open action fails.

Written for commit a8b0c06. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added the ability to open locally hosted project repositories directly in Finder.
  • Bug Fixes

    • Replaced the “coming soon” notification with actionable error messages when a project path is unavailable or the operation fails.
    • Prevented Finder access for projects that aren’t hosted locally.

@ghost

ghost commented Jul 31, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 1 individual chapter for you:

Title
1 Implement Open in Finder for sidebar projects
Open in Stage

Chapters generated by Stage for commit a8b0c06 on Jul 31, 2026 8:01pm UTC.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 44d1c427-eb59-4c86-8a0b-18e11be4f3cb

📥 Commits

Reviewing files that changed from the base of the PR and between 3b3f79f and a8b0c06.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarProjectSection/hooks/useDashboardSidebarProjectSectionActions/useDashboardSidebarProjectSectionActions.ts

📝 Walkthrough

Walkthrough

The dashboard sidebar now opens locally hosted project repositories through Electron. It reports unavailable repository paths and failed open operations with error toasts.

Changes

Local project opening

Layer / File(s) Summary
Finder action flow
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarProjectSection/hooks/useDashboardSidebarProjectSectionActions/useDashboardSidebarProjectSectionActions.ts
The hook imports the Electron tRPC client, resolves the local repository path, opens available paths, and reports unavailable paths or operation failures with error toasts.

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
Loading

Possibly related PRs

Suggested reviewers: kitenite

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch open-finder-v2-projects

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.

@saddlepaddle
saddlepaddle merged commit 542f966 into main Jul 31, 2026
10 of 11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant