Right-click context menus on file panels

Native menus (electrobun ContextMenu) on rows and empty panel space. Rows:
Open (dirs navigate; local files open with the default app via Utils.openPath),
Edit, Copy to Other Panel, Rename, Permissions, Copy Path (works for remote
paths too), Reveal in Finder (local, Utils.showItemInFolder), Move to Trash
(local, Utils.moveToTrash — tooltip notes Finder Restore doesn't apply) and
Delete. Empty space / '..': New Folder, New File, Refresh, Reveal in Finder.

Right-click parks the cursor on the row (keeping the selection when clicking
inside it). Local shell actions run bun-side directly; everything else routes
through the existing menuAction channel back to the stored click target.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jokin
2026-07-11 23:48:23 +02:00
co-authored by Claude Fable 5
parent 9737cad6de
commit fbbde16f35
8 changed files with 226 additions and 3 deletions
+12
View File
@@ -96,6 +96,18 @@ export type AppRPC = {
response: Result<{ names: string[] }>;
};
clearEditLeftovers: { params: Record<string, never>; response: Result };
// context menu + local shell integration
showRowMenu: {
params: {
path: string;
name: string;
type: EntryType;
isLocal: boolean;
hasEntry: boolean;
};
response: Result;
};
moveToTrash: { params: { path: string }; response: Result };
};
messages: Record<never, never>;
};