Skip to content

fix(desktop): use native clipboard for copy path in v2 sidebar#3462

Merged
Kitenite merged 5 commits into
mainfrom
add-copy-path-feature-to-v2-sidebar
Apr 15, 2026
Merged

fix(desktop): use native clipboard for copy path in v2 sidebar#3462
Kitenite merged 5 commits into
mainfrom
add-copy-path-feature-to-v2-sidebar

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Apr 14, 2026

Summary

  • v2 sidebar's file/folder context menu "Copy Path" and "Copy Relative Path" used navigator.clipboard.writeText, which silently fails when focus is on another element (e.g., the terminal) — the toast showed but nothing was actually copied.
  • Switch both menus to the useCopyToClipboard hook, which routes through Electron's native clipboard via tRPC. Matches the v1 pathway.

Test plan

  • Right-click a file in the v2 workspace sidebar → Copy Path → verify absolute path is on the system clipboard (paste elsewhere).
  • Right-click a folder in the v2 workspace sidebar → Copy Path and Copy Relative Path → verify both land on the clipboard.
  • Focus a terminal pane, then repeat the above from the sidebar → verify the clipboard still receives the path (the bug this fixes).

Summary by cubic

Uses the native clipboard via useCopyToClipboard to make copy actions reliable in the v2 sidebar. Adds working “Copy Path” and “Open in Finder” to the dashboard for local workspaces, and hides these options for non-local workspaces.

  • New Features

    • Dashboard sidebar: show “Copy Path” and “Open in Finder” only for local workspaces; resolve worktreePath via the local host service and call native actions.
  • Bug Fixes

    • File/folder menus: use useCopyToClipboard (Electron via tRPC), await completion, and toast errors; extract shared PathActionsMenuItems; wrap “Reveal/Open in Finder” in try/catch.

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

Summary by CodeRabbit

  • New Features

    • Workspace sidebar actions now respect workspace host type, showing "Open in Finder" and "Copy Path" only for local workspaces.
    • Added a consolidated "Path actions" menu reused by file and folder context menus.
  • Bug Fixes

    • Centralized and improved copy-to-clipboard flow for "Copy Path" / "Copy Relative Path" with reliable success/error feedback.
    • More reliable "Reveal in Finder" handling with unified error reporting.

navigator.clipboard.writeText silently fails when focus is elsewhere
(e.g., terminal), so the toast showed but nothing was actually copied.
Switch to useCopyToClipboard which routes through Electron's native
clipboard via tRPC, matching the v1 pathway.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 23fd3b58-4fe6-414e-b886-1999a2abc0a1

📥 Commits

Reviewing files that changed from the base of the PR and between 4405ddc and 5380421.

📒 Files selected for processing (4)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/DashboardSidebarWorkspaceItem.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceContextMenu/DashboardSidebarWorkspaceContextMenu.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/hooks/useDashboardSidebarWorkspaceItemActions/useDashboardSidebarWorkspaceItemActions.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/PathActionsMenuItems/PathActionsMenuItems.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/DashboardSidebarWorkspaceItem.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/hooks/useDashboardSidebarWorkspaceItemActions/useDashboardSidebarWorkspaceItemActions.ts

📝 Walkthrough

Walkthrough

Context menu path actions were extracted into a new PathActionsMenuItems component; workspace sidebar context menus now receive and use an explicit isLocalWorkspace flag, and the workspace actions hook was extended to resolve worktree paths and perform Open in Finder / Copy Path via host service, electron RPC, and clipboard utilities.

Changes

Cohort / File(s) Summary
Workspace Files Context Menus
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FileContextMenu/FileContextMenu.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FolderContextMenu/FolderContextMenu.tsx
Removed inline “Reveal in Finder” / “Copy Path” / conditional “Copy Relative Path” menu items and replaced them with the delegated PathActionsMenuItems component; removed direct clipboard/toast/electron-trpc usage from these menu components.
Path Actions Component
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/PathActionsMenuItems/PathActionsMenuItems.tsx, .../PathActionsMenuItems/index.ts
Added PathActionsMenuItems and barrel export. Implements async handlers: “Reveal in Finder” via electronTrpcClient.external.openInFinder.mutate(...), “Copy Path” / optional “Copy Relative Path” via useCopyToClipboard, with toast success/error reporting.
Dashboard Sidebar — Workspace Item
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/DashboardSidebarWorkspaceItem.tsx
Now computes isLocalWorkspace (hostType === "local-device") and passes isLocalWorkspace into DashboardSidebarWorkspaceContextMenu in both collapsed and expanded render paths.
Dashboard Sidebar — Context Menu Prop
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceContextMenu/DashboardSidebarWorkspaceContextMenu.tsx
Component signature updated to require isLocalWorkspace: boolean; menu conditionally includes “Open in Finder” and “Copy Path” only when isLocalWorkspace is true.
Dashboard Sidebar — Actions Hook
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/hooks/useDashboardSidebarWorkspaceItemActions/useDashboardSidebarWorkspaceItemActions.ts
Hook extended to use host services and clipboard utilities: adds resolveWorktreePath() and async handleOpenInFinder / handleCopyPath that resolve worktree path (guarded by active host), call host service / electronTrpcClient, copy to clipboard, and surface toast errors on failure.

Sequence Diagram(s)

sequenceDiagram
  participant UI as UI (Context Menu)
  participant Path as PathActionsMenuItems
  participant Hook as Actions Hook
  participant Local as LocalHostService
  participant Host as HostServiceClient
  participant Electron as electronTrpcClient
  participant Clipboard as CopyToClipboard
  participant Toast as Toast

  UI->>Path: user selects action
  Path->>Hook: request resolved path (if needed)
  Hook->>Local: get activeHostUrl
  Local-->>Hook: activeHostUrl
  Hook->>Host: query workspace (worktreePath)
  Host-->>Hook: worktreePath
  alt reveal in finder
    Path->>Electron: openInFinder.mutate(absolutePath)
    Electron-->>Path: result / error
    Path->>Toast: show error (if any)
  else copy path
    Path->>Clipboard: copyToClipboard(path)
    Clipboard-->>Path: success / error
    Path->>Toast: show success / error
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped the menu items into a neat new nest,

Paths now leap where helpers do their best.
Finder, clipboard, toasts in tow,
Quiet hops that make workflows glow.
A tiny rabbit clap — code refreshed!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: switching v2 sidebar's copy path actions to use native clipboard via the useCopyToClipboard hook instead of navigator.clipboard.writeText.
Description check ✅ Passed The description is complete with a clear summary, test plan, and context. It explains the bug (silent failure of navigator.clipboard), the solution (use useCopyToClipboard), and provides actionable verification steps.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 add-copy-path-feature-to-v2-sidebar

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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 14, 2026

Greptile Summary

This PR fixes a silent clipboard failure in the v2 workspace sidebar's file/folder context menus. Previously, "Copy Path" and "Copy Relative Path" used navigator.clipboard.writeText, which requires document focus and silently fails when a terminal pane has focus — the success toast appeared but nothing reached the clipboard. The fix replaces both calls with the existing useCopyToClipboard hook, which routes through electronTrpc.external.copyPath via Electron IPC and is focus-independent, matching the pattern already used in v1 and many other parts of the codebase.

  • Affected files: FileContextMenu.tsx and FolderContextMenu.tsx in the v2 workspace sidebar.
  • The useCopyToClipboard hook is well-established and widely used across the renderer.
  • The electronTrpcClient import is retained in both files as it is still needed for the "Reveal in Finder" action.
  • One minor gap: the onSelect handlers do not wrap the await copyToClipboard(...) call in a try/catch, so if the IPC call fails the user receives no feedback. This is consistent with other usages of the hook, but given the interactive nature of these context menu actions, adding an error toast would improve the UX.

Confidence Score: 5/5

Safe to merge — targeted, well-understood fix that aligns v2 with the established v1 pattern.

The change is minimal (two symmetrical files), uses a proven hook that is already widely adopted across the desktop renderer, and directly addresses a clear, reproducible bug. The only open item is the lack of error handling on IPC failure, which is a P2 style suggestion consistent with the rest of the codebase — not a blocker.

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FileContextMenu/FileContextMenu.tsx Replaces navigator.clipboard.writeText with useCopyToClipboard hook for both "Copy Path" and "Copy Relative Path" menu items, routing clipboard writes through Electron IPC to fix the focus-loss bug.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FolderContextMenu/FolderContextMenu.tsx Mirrors the same FileContextMenu change — swaps navigator.clipboard.writeText to useCopyToClipboard for folder "Copy Path" and "Copy Relative Path" actions.

Sequence Diagram

sequenceDiagram
    participant User
    participant ContextMenu as FileContextMenu / FolderContextMenu
    participant Hook as useCopyToClipboard
    participant tRPC as electronTrpc (IPC)
    participant Main as Electron Main Process
    participant Clipboard as Native Clipboard

    User->>ContextMenu: Right-click → Copy Path
    Note over ContextMenu: Before fix: navigator.clipboard.writeText()<br/>(fails silently when focus is on terminal)

    ContextMenu->>Hook: await copyToClipboard(path)
    Hook->>tRPC: mutateAsync(path) → external.copyPath
    tRPC->>Main: IPC call (focus-independent)
    Main->>Clipboard: clipboard.writeText(path)
    Clipboard-->>Main: success
    Main-->>tRPC: result
    tRPC-->>Hook: resolved
    Hook-->>ContextMenu: resolved
    ContextMenu->>User: toast.success("Path copied")
Loading

Reviews (1): Last reviewed commit: "fix(desktop): use native clipboard for c..." | Re-trigger Greptile

Comment on lines 37 to 41
<ContextMenuItem
onSelect={() => {
navigator.clipboard.writeText(absolutePath);
onSelect={async () => {
await copyToClipboard(absolutePath);
toast.success("Path copied");
}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 No error feedback if clipboard write fails

If copyToClipboard rejects (e.g., due to an IPC failure), the toast.success call is skipped and the user sees no feedback at all — no success, no error. The old navigator.clipboard path had the same gap (the toast fired regardless of success), but now that the copy is async and awaited, a failure will be completely silent.

This is consistent with other usages of useCopyToClipboard across the codebase, but worth addressing here and in FolderContextMenu since these are user-initiated, one-shot actions where silent failure is confusing. Consider wrapping in try/catch:

Suggested change
<ContextMenuItem
onSelect={() => {
navigator.clipboard.writeText(absolutePath);
onSelect={async () => {
await copyToClipboard(absolutePath);
toast.success("Path copied");
}}
onSelect={async () => {
try {
await copyToClipboard(absolutePath);
toast.success("Path copied");
} catch {
toast.error("Failed to copy path");
}
}}

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FileContextMenu/FileContextMenu.tsx">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FileContextMenu/FileContextMenu.tsx:38">
P2: Unhandled promise rejection: if `copyToClipboard` throws (e.g., IPC failure), the `await` will reject with no `try/catch`, giving the user zero feedback and risking an unhandled rejection in Electron. Wrap in `try/catch` and show an error toast on failure.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

The workspace item context menu's Copy Path just toasted "coming soon".
Fetch the worktreePath from the local host service for local workspaces,
copy via electronTrpc.external.copyPath (native clipboard), and show a
proper success toast. Non-local workspaces fall back to an explanatory
error since the path only exists on the owning machine.
Share the local worktreePath resolver between Copy Path and Open in
Finder, and route Open in Finder through electronTrpc.external.openInFinder
instead of toasting "coming soon".
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/hooks/useDashboardSidebarWorkspaceItemActions/useDashboardSidebarWorkspaceItemActions.ts">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/hooks/useDashboardSidebarWorkspaceItemActions/useDashboardSidebarWorkspaceItemActions.ts:32">
P2: Path lookup is bound to the active host instead of the workspace’s own host, which can break Copy Path/Open in Finder for workspaces on a different local host.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

…try/catch

Addresses review feedback on PR #3462:
- Pulled the Reveal in Finder / Copy Path / Copy Relative Path items
  shared between FileContextMenu and FolderContextMenu into a single
  PathActionsMenuItems component.
- Wrap useCopyToClipboard calls in try/catch so IPC failures surface a
  proper error toast instead of failing silently.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/PathActionsMenuItems/PathActionsMenuItems.tsx:
- Around line 33-36: The ContextMenuItem click handler calls
electronTrpcClient.external.openInFinder.mutate(absolutePath) without error
handling; change the onSelect into an async handler that awaits
electronTrpcClient.external.openInFinder.mutate(absolutePath), wrap it in
try/catch, and on failure show the same user-facing feedback used by the copy
actions (e.g., the existing toast/notification utility) and log the error for
diagnostics; update the handler on the ContextMenuItem and reference the
ContextMenuItem component, the electronTrpcClient.external.openInFinder.mutate
call, and the absolutePath variable when making these changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 066ab3b6-bebf-4301-a58e-dc7a6cd7de87

📥 Commits

Reviewing files that changed from the base of the PR and between d017c84 and 4405ddc.

📒 Files selected for processing (4)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FileContextMenu/FileContextMenu.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FolderContextMenu/FolderContextMenu.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/PathActionsMenuItems/PathActionsMenuItems.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/PathActionsMenuItems/index.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/PathActionsMenuItems/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/FolderContextMenu/FolderContextMenu.tsx

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/PathActionsMenuItems/PathActionsMenuItems.tsx">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/components/WorkspaceFilesTreeItem/components/PathActionsMenuItems/PathActionsMenuItems.tsx:35">
P2: Wrap the `openInFinder.mutate()` call in a `try/catch` with `toast.error` feedback, matching how `handleCopy` handles failures. The returned promise is not awaited or caught, so a rejection (e.g., invalid path, permission denied) becomes an unhandled promise rejection — which can crash the Electron renderer process.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

…spaces

- Gate the Open in Finder / Copy Path items in the dashboard sidebar
  workspace context menu behind isLocalWorkspace so they only appear
  for workspaces on the active machine.
- Drop the now-redundant hostType guard from the actions hook.
- Wrap openInFinder in try/catch in PathActionsMenuItems so native
  action failures surface a toast (addresses coderabbit/cubic P2 on #3462).
@Kitenite Kitenite merged commit 4ee2e61 into main Apr 15, 2026
7 checks passed
@Kitenite Kitenite deleted the add-copy-path-feature-to-v2-sidebar branch April 15, 2026 01:40
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

MocA-Love pushed a commit to MocA-Love/superset that referenced this pull request Apr 15, 2026
…set-sh#3462)

* fix(desktop): use native clipboard for copy path in v2 sidebar

navigator.clipboard.writeText silently fails when focus is elsewhere
(e.g., terminal), so the toast showed but nothing was actually copied.
Switch to useCopyToClipboard which routes through Electron's native
clipboard via tRPC, matching the v1 pathway.

* feat(desktop): wire up Copy Path in v2 dashboard sidebar

The workspace item context menu's Copy Path just toasted "coming soon".
Fetch the worktreePath from the local host service for local workspaces,
copy via electronTrpc.external.copyPath (native clipboard), and show a
proper success toast. Non-local workspaces fall back to an explanatory
error since the path only exists on the owning machine.

* feat(desktop): wire up Open in Finder in v2 dashboard sidebar

Share the local worktreePath resolver between Copy Path and Open in
Finder, and route Open in Finder through electronTrpc.external.openInFinder
instead of toasting "coming soon".

* refactor(desktop): extract shared PathActionsMenuItems, wrap copy in try/catch

Addresses review feedback on PR superset-sh#3462:
- Pulled the Reveal in Finder / Copy Path / Copy Relative Path items
  shared between FileContextMenu and FolderContextMenu into a single
  PathActionsMenuItems component.
- Wrap useCopyToClipboard calls in try/catch so IPC failures surface a
  proper error toast instead of failing silently.

* refactor(desktop): hide Open in Finder & Copy Path for non-local workspaces

- Gate the Open in Finder / Copy Path items in the dashboard sidebar
  workspace context menu behind isLocalWorkspace so they only appear
  for workspaces on the active machine.
- Drop the now-redundant hostType guard from the actions hook.
- Wrap openInFinder in try/catch in PathActionsMenuItems so native
  action failures surface a toast (addresses coderabbit/cubic P2 on superset-sh#3462).
MocA-Love added a commit to MocA-Love/superset that referenced this pull request Apr 15, 2026
MocA-Love added a commit to MocA-Love/superset that referenced this pull request Apr 15, 2026
-s ours merge to record that upstream commits a3e34bf through
de70163 (13 commits) are semantically already present on origin/main
via the PR1-6 cherry-pick series (PRs #176, #177, #178, #179, #180,
#182), plus fork-adaptation fixes layered on top.

This merge target is de70163 specifically (not upstream/main) so
newer upstream commits (9fff075 and later) remain visible in future
behind counts.

Upstream commits covered by this audit merge:
- a3e34bf  fix(desktop): restore cmd+click requirement for v1 terminal file links (superset-sh#3457)  [PR1/#176]
- 57557f8  fix(desktop): gate v2 workspace children on collection readiness (superset-sh#3464)       [PR1/#176]
- 4ee2e61  fix(desktop): use native clipboard for copy path in v2 sidebar (superset-sh#3462)         [PR1/#176]
- 87d6e93  feat(desktop): close settings with Escape key (superset-sh#3466)                          [PR1/#176]
- 9c7f5f4  chore(desktop): auto-restart host-service on bundle change in dev (superset-sh#3461)      [PR1/#176]
- 93140d9  fix(mcp): accept MCP resource URL as valid OAuth audience (superset-sh#3459)              [PR2/#177]
- be9e000  fix(desktop): drive tray menu off events, fetch real org name (superset-sh#3458)          [PR2/#177]
- c5f791e  feat(v2): unify workspace delete through host-service (superset-sh#3443)                  [PR3/#178]
- 2c24d93  feat(desktop): paginated branch picker with checkout + open actions (superset-sh#3397)    [PR4/#179]
- 2bf1049  feat(desktop/hotkeys): v1 directional pane focus + best-effort v1 override migrator (superset-sh#3460)  [PR5/#180]
- 1294a7d  feat(desktop/hotkeys): restore Cmd+Alt+Arrow for tab/workspace nav (superset-sh#3472)    [PR5/#180]
- de70163  feat(desktop): v2 review tab first pass — PR info, checks, comments (superset-sh#3463)    [PR6/#182]

Intentionally skipped (version bump, fork has independent versioning):
- 1e23353  chore(desktop): bump version to 1.5.5 (superset-sh#3473)

Fork-adaptation fixes layered on top of the cherry-picks:
- PR1: host-service-coordinator alias import fix, settings Escape
       selector narrowing (role-based + popper wrapper), Escape
       close uses replace navigation
- PR2: dual quit mode preservation (requestQuit "release"/"stop"),
       trayUpdateToken guard for stale async fetchHostInfo results
- PR4: ChangesHeader.normalizeBranchName regex rewrite (lint false
       positive), worktree add uses fullRef for remote-tracking
       refs, syncTimedOut reset on pendingId change, GIT_REFS.md
       barrel example fix
- PR5: migrate.ts re-sanitize of existing localStorage overrides
       (v2 marker bump intent), FOCUS_PANE_* enabled:isActive for
       KeepAliveWorkspaces, CATEGORY_ORDER merges Navigation (upstream)
       and Browser (fork)
- PR6: normalizeThreadsToComments flattens all thread.comments (not
       just first), CommentPane overrides <a> (openUrl) and <img>
       (SafeImage), zero-badge suppression, pr-null comments gate

Fork features verified intact (Explore agent audit of combined
36d4de4..35d95f3 range):
- BROWSER_RELOAD / BROWSER_HARD_RELOAD hotkeys
- dual quit mode menu in tray
- v1 terminal cold-restore + retry reconnect (out of range but
  unaffected)
- KeepAliveWorkspaces (FOCUS_PANE_* gated on isActive)
- useCommandPalette + addMemoTab in v2 workspace
- host-service-coordinator rename alias pattern
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