Skip to content

Self-hosted, plugin-based server management.

feat: add Open File Manager to tab right-click menu (#1046)

Sankeerth Nara0712fdd731a9
diff --git a/src/ui/AppShell.tsx b/src/ui/AppShell.tsx
index 0d0e6379d..e978f4da5 100644
--- a/src/ui/AppShell.tsx
+++ b/src/ui/AppShell.tsx
@@ -1713,6 +1713,10 @@ export function AppShell({
onAddToSplit={addTabToSplit}
onRemoveFromSplit={removeTabFromSplit}
onRenameTab={renameTab}
+ onOpenFileManager={(tabId) => {
+ const targetTab = tabs.find((t) => t.id === tabId);
+ if (targetTab?.host) openTab(targetTab.host, "files");
+ }}
isAppFullscreen={isAppFullscreen}
onToggleAppFullscreen={toggleAppFullscreen}
/>
diff --git a/src/ui/shell/TabBar.tsx b/src/ui/shell/TabBar.tsx
index df1dee24d..f9553dc13 100644
--- a/src/ui/shell/TabBar.tsx
+++ b/src/ui/shell/TabBar.tsx
@@ -18,6 +18,7 @@ import {
Pencil,
Maximize2,
Minimize2,
+ FolderOpen,
} from "lucide-react";
import { tabIcon } from "@/shell/tabUtils";
import { isElectron } from "@/lib/electron";
@@ -40,6 +41,7 @@ export function TabBar({
onAddToSplit,
onRemoveFromSplit,
onRenameTab,
+ onOpenFileManager,
isAppFullscreen,
onToggleAppFullscreen,
}: {
@@ -56,6 +58,7 @@ export function TabBar({
onAddToSplit: (tabId: string) => void;
onRemoveFromSplit: (tabId: string) => void;
onRenameTab?: (tabId: string, newLabel: string) => void;
+ onOpenFileManager?: (tabId: string) => void;
isAppFullscreen: boolean;
onToggleAppFullscreen: () => void;
}) {
@@ -527,6 +530,20 @@ export function TabBar({
{t("nav.refreshTab")}
</button>
)}
+ {ctxTab.type === "terminal" &&
+ ctxTab.host &&
+ onOpenFileManager && (
+ <button
+ className="flex items-center gap-2 w-full px-3 py-1.5 text-xs text-left hover:bg-accent hover:text-accent-foreground"
+ onClick={() => {
+ onOpenFileManager(contextTabId);
+ setContextTabId(null);
+ }}
+ >
+ <FolderOpen className="size-3" />
+ {t("nav.openFileManager")}
+ </button>
+ )}
<button
className="flex items-center gap-2 w-full px-3 py-1.5 text-xs text-left hover:bg-accent hover:text-accent-foreground"
onClick={() => {