feat(fs): add file and directory management functions (rename, mkdir, rmdir) to IPC and local/remote file systems#1348
Conversation
|
@yashdev9274 is attempting to deploy a commit to the General Action Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR adds right-click context menu functionality to the file explorer, backed by three new IPC channels ( Verified Issues:
The renderer-side changes are well-structured and the IPC type definitions are correct, but the server-side implementation has functional and design gaps that should be addressed before merge. Confidence Score: 1/5
Last reviewed commit: b2b25f1 |
| {node.type === 'file' && ( | ||
| <span className="mr-1.5"> | ||
| <FileIcon filename={node.name} isDirectory={false} isExpanded={false} /> | ||
| </span> | ||
| <> | ||
| <ContextMenuSeparator /> | ||
| <ContextMenuItem onSelect={() => onContextMenuOpenTerminal?.(node)}> | ||
| Open in Terminal | ||
| </ContextMenuItem> | ||
| <ContextMenuItem onSelect={() => onContextMenuReveal?.(node)}> | ||
| Reveal in Finder | ||
| </ContextMenuItem> | ||
| </> | ||
| )} |
There was a problem hiding this comment.
"Open in Terminal" and "Reveal in Finder" are shown only for files (gated on node.type === 'file'), but both operations are arguably more useful on directories. The PR aims to match VS Code's behavior, which shows "Open in Integrated Terminal" on directories, not individual files. The handlers already support directories correctly:
const dirPath =
node.type === 'directory'
? pathUtils.join(rootPath, node.path)
: pathUtils.join(rootPath, pathUtils.dirname(node.path));Consider moving "Open in Terminal" to show for both files and directories (or just directories). Similarly, review "Reveal in Finder" to ensure it works as expected for directories.
|
hey @arnestrickmann do review this ! |
|
anything wrong with my PRs @arnestrickmann ?? |
|
Thanks! @yashdev9274 Could you make sure that the Delete button has appropriate and consistent padding? |
… rmdir) to IPC and local/remote file systems
- Fixed Windows path separator bug in remote fs:rename, fs:mkdir, fs:rmdir handlers - On Windows, path.join produces backslashes which break POSIX remote servers - Minor cleanup: unused variable removal in LocalFileSystem - UI: added padding to delete confirmation button in FileTree
|
fixed it |
|
Thanks for addressing the points! I will test and lyk. @yashdev9274 |

Summary
Add a right-click context menu to files and folders in the file explorer, matching the behavior users expect from VS Code and other traditional IDEs.
Fixes
Fixes #1228
Snapshot
changes video-
Emdash2.mp4
Type of change
Mandatory Tasks
Checklist
pnpm run format)pnpm run lint)