From 05f84da4e1407b9ed0c320d5ae1f7f309e0a3f0d Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:25:32 -0700 Subject: [PATCH] feat: add "Reveal in Finder" context menu item to file explorer (#411) Adds a platform-aware context menu option to reveal files/folders in the system file manager (Finder on macOS, File Explorer on Windows, Files on Linux). --- .../components/right-sidebar/FileExplorerRow.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/renderer/src/components/right-sidebar/FileExplorerRow.tsx b/src/renderer/src/components/right-sidebar/FileExplorerRow.tsx index 6bca33f06..60bdf0abb 100644 --- a/src/renderer/src/components/right-sidebar/FileExplorerRow.tsx +++ b/src/renderer/src/components/right-sidebar/FileExplorerRow.tsx @@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useRef } from 'react' import { ChevronRight, Copy, + ExternalLink, File, FilePlus, Files, @@ -28,6 +29,14 @@ import type { TreeNode } from './file-explorer-types' const ORCA_PATH_MIME = 'text/x-orca-file-path' const isMac = navigator.userAgent.includes('Mac') +const isLinux = navigator.userAgent.includes('Linux') + +/** Platform-appropriate label: macOS → Finder, Windows → File Explorer, Linux → Files */ +const revealLabel = isMac + ? 'Reveal in Finder' + : isLinux + ? 'Open Containing Folder' + : 'Reveal in File Explorer' export type InlineInput = { parentPath: string @@ -393,6 +402,10 @@ export function FileExplorerRow({ Duplicate )} + window.api.shell.openPath(node.path)}> + + {revealLabel} + onStartRename(node)}>