Skip to content

feat(sftp): add drive switcher dropdown for local Windows panes#953

Merged
binaricat merged 2 commits into
binaricat:mainfrom
penguinway:feat/sftp-drive-switcher
May 12, 2026
Merged

feat(sftp): add drive switcher dropdown for local Windows panes#953
binaricat merged 2 commits into
binaricat:mainfrom
penguinway:feat/sftp-drive-switcher

Conversation

@penguinway
Copy link
Copy Markdown
Contributor

Summary

  • Added a drive letter dropdown in the SFTP breadcrumb for local Windows panes, allowing quick switching between drives (C:, D:, E:, etc.)
  • Implemented listDrives IPC bridge using wmic logicaldisk to enumerate available drives
  • The dropdown only appears on local panes with Windows-style paths

Test plan

  • Open a local SFTP pane on Windows
  • Verify the first breadcrumb segment (drive letter) shows a chevron indicator
  • Click it and confirm available drives are listed
  • Select a different drive and verify navigation works
  • Verify remote panes do NOT show the drive dropdown

🤖 Generated with Claude Code

On Windows, the SFTP breadcrumb's first segment (drive letter) now shows
a dropdown to switch between available drives. This makes it easy to
navigate across drives without manually editing the path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@binaricat
Copy link
Copy Markdown
Owner

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e38963c37f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread electron/bridges/localFsBridge.cjs Outdated
Comment on lines +354 to +357
for (let i = 65; i <= 90; i++) {
const letter = String.fromCharCode(i);
try {
fs.accessSync(letter + ":\\");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace synchronous drive probing in IPC handler

Avoid using fs.accessSync in listDrives() because this handler runs in Electron’s main process and is invoked from the renderer when opening the breadcrumb dropdown. The current loop performs up to 26 synchronous filesystem checks, which can stall the main process and make the UI feel frozen (especially when probing slow/unavailable removable or mapped drives). Switching this path to non-blocking I/O (or another async drive-enumeration approach) prevents UI hitching during drive menu open.

Useful? React with 👍 / 👎.

fs.accessSync in the listDrives IPC handler could stall the Electron
main process for seconds per disconnected mapped drive or empty optical
drive. Use fs.promises.access with Promise.allSettled so the 26 probes
run in parallel without blocking the event loop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@binaricat
Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@binaricat binaricat merged commit b0949f1 into binaricat:main May 12, 2026
16 checks passed
@only9464
Copy link
Copy Markdown

Good job!

@penguinway penguinway deleted the feat/sftp-drive-switcher branch May 13, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants