diff --git a/src/components/files/file-workspace-panel.tsx b/src/components/files/file-workspace-panel.tsx
index 5e40d8a..7f3b17b 100644
--- a/src/components/files/file-workspace-panel.tsx
+++ b/src/components/files/file-workspace-panel.tsx
@@ -1120,7 +1120,7 @@ export function FileWorkspacePanel() {
path: diffListContext.path,
branch: diffListContext.branch,
})
- : diffListContext.path
+ : (activeFileTab.description ?? diffListContext.path)
const handleOpenDiff = async (path: string) => {
if (diffListContext.kind === "commit") {
diff --git a/src/components/layout/aux-panel-file-tree-tab.tsx b/src/components/layout/aux-panel-file-tree-tab.tsx
index 4df8655..0014742 100644
--- a/src/components/layout/aux-panel-file-tree-tab.tsx
+++ b/src/components/layout/aux-panel-file-tree-tab.tsx
@@ -1701,6 +1701,22 @@ export function FileTreeTab() {
return baseName(folder.path)
}, [folder?.path, t])
+ const systemExplorerLabel =
+ typeof navigator === "undefined"
+ ? t("openInFileManager")
+ : (() => {
+ const platform =
+ `${navigator.platform} ${navigator.userAgent}`.toLowerCase()
+ if (platform.includes("mac")) return t("openInFinder")
+ if (platform.includes("win")) return t("openInExplorer")
+ return t("openInFileManager")
+ })()
+
+ const rootTarget: FileActionTarget = useMemo(
+ () => ({ kind: "dir", path: "", name: rootNodeName }),
+ [rootNodeName]
+ )
+
useEffect(() => {
if (!isFileTreeTabActive) return
void fetchTree()
@@ -2009,45 +2025,128 @@ export function FileTreeTab() {
onSelect={handleTreeSelect}
>
{folder?.path && (
-
- {nodes.map((node) => (
- {
- void openFilePreview(path)
+
+
+
+ {nodes.map((node) => (
+ {
+ void openFilePreview(path)
+ }}
+ onOpenFileDiff={(path) => {
+ void openWorkingTreeDiff(path)
+ }}
+ onOpenDirDiff={(path) => {
+ void openWorkingTreeDiff(path, {
+ mode: "overview",
+ })
+ }}
+ onOpenCommitWindow={handleOpenCommitWindow}
+ onRequestCompareWithBranch={
+ handleRequestCompareWithBranch
+ }
+ onRequestRollback={handleRequestRollback}
+ onOpenDirInTerminal={handleOpenDirInTerminal}
+ onRequestAddToVcs={handleAddToVcs}
+ onRequestRename={handleRequestRename}
+ onRequestDelete={handleRequestDelete}
+ onRefresh={fetchTree}
+ />
+ ))}
+
+
+
+
+
+ {t("git")}
+
+
+ handleOpenCommitWindow()}
+ disabled={!gitEnabled}
+ >
+ {t("actions.commitCode")}
+
+ void handleAddToVcs(rootTarget)}
+ disabled={!gitEnabled}
+ >
+ {t("actions.addToVcs")}
+
+
+ void openWorkingTreeDiff(".", {
+ mode: "overview",
+ })
+ }
+ disabled={!gitEnabled}
+ >
+ {tCommon("viewDiff")}
+
+
+ handleRequestCompareWithBranch(rootTarget)
+ }
+ disabled={!gitEnabled}
+ >
+ {t("compareWithBranch")}
+
+ handleRequestRollback(rootTarget)}
+ disabled={!gitEnabled}
+ >
+ {t("actions.rollback")}
+
+
+
+ {
+ void fetchTree()
}}
- onOpenFileDiff={(path) => {
- void openWorkingTreeDiff(path)
- }}
- onOpenDirDiff={(path) => {
- void openWorkingTreeDiff(path, { mode: "overview" })
- }}
- onOpenCommitWindow={handleOpenCommitWindow}
- onRequestCompareWithBranch={
- handleRequestCompareWithBranch
- }
- onRequestRollback={handleRequestRollback}
- onOpenDirInTerminal={handleOpenDirInTerminal}
- onRequestAddToVcs={handleAddToVcs}
- onRequestRename={handleRequestRename}
- onRequestDelete={handleRequestDelete}
- onRefresh={fetchTree}
- />
- ))}
-
+ >
+ {t("reloadFromDisk")}
+
+
+
+ {t("openIn")}
+
+
+ {
+ void revealItemInDir(folder.path)
+ }}
+ >
+ {systemExplorerLabel}
+
+ {
+ void handleOpenDirInTerminal(
+ folder.path,
+ rootNodeName
+ )
+ }}
+ >
+ {t("openInTerminal")}
+
+
+
+
+
)}
diff --git a/src/components/layout/aux-panel-git-changes-tab.tsx b/src/components/layout/aux-panel-git-changes-tab.tsx
index 072129d..774e37b 100644
--- a/src/components/layout/aux-panel-git-changes-tab.tsx
+++ b/src/components/layout/aux-panel-git-changes-tab.tsx
@@ -1236,15 +1236,60 @@ export function GitChangesTab() {
expanded={expandedTrackedPaths}
onExpandedChange={setExpandedTrackedPaths}
>
-
- {trackedTreeNodes.map(renderTrackedNode)}
-
+
+
+
+ {trackedTreeNodes.map(renderTrackedNode)}
+
+
+
+ {
+ handleOpenCommitWindow()
+ }}
+ >
+ {t("actions.commitCode")}
+
+ {
+ void openWorkingTreeDiff(".", {
+ mode: "overview",
+ })
+ }}
+ >
+ {tCommon("viewDiff")}
+
+ {
+ handleRequestRollback({
+ kind: "dir",
+ path: "",
+ name: folderName,
+ })
+ }}
+ variant="destructive"
+ >
+ {t("actions.rollback")}
+
+ {
+ void handleAddToVcs({
+ kind: "dir",
+ path: "",
+ name: folderName,
+ })
+ }}
+ >
+ {t("actions.addToVcs")}
+
+
+
)}
@@ -1284,15 +1329,60 @@ export function GitChangesTab() {
expanded={expandedUntrackedPaths}
onExpandedChange={setExpandedUntrackedPaths}
>
-
- {untrackedTreeNodes.map(renderUntrackedNode)}
-
+
+
+
+ {untrackedTreeNodes.map(renderUntrackedNode)}
+
+
+
+ {
+ handleOpenCommitWindow()
+ }}
+ >
+ {t("actions.commitCode")}
+
+ {
+ void openWorkingTreeDiff(".", {
+ mode: "overview",
+ })
+ }}
+ >
+ {tCommon("viewDiff")}
+
+ {
+ handleRequestRollback({
+ kind: "dir",
+ path: "",
+ name: folderName,
+ })
+ }}
+ variant="destructive"
+ >
+ {t("actions.rollback")}
+
+ {
+ void handleAddToVcs({
+ kind: "dir",
+ path: "",
+ name: folderName,
+ })
+ }}
+ >
+ {t("actions.addToVcs")}
+
+
+
)}
diff --git a/src/contexts/workspace-context.tsx b/src/contexts/workspace-context.tsx
index 13d2daf..d52b207 100644
--- a/src/contexts/workspace-context.tsx
+++ b/src/contexts/workspace-context.tsx
@@ -440,10 +440,14 @@ export function WorkspaceProvider({ children }: WorkspaceProviderProps) {
const mode = options?.mode ?? "auto"
if (mode === "overview") {
+ const isRoot = path === "."
+ const displayPath = isRoot ? folderPath : path
const encodedPath = encodeURIComponent(path)
const tabId = `diff:working-overview:${encodedPath}`
- const title = t("diffTitleFile", { name: fileName(path) })
- const description = path
+ const title = t("diffTitleFile", {
+ name: fileName(displayPath ?? path),
+ })
+ const description = displayPath ?? path
upsertLoadingTab(
loadingTab(tabId, "diff", title, description, path, "diff")
)