Skip to content

feat: follow terminal cwd and download directories - #71

Open
htazq wants to merge 1 commit into
GOODBOY008:mainfrom
htazq:feat/issues-69-70-file-browser
Open

feat: follow terminal cwd and download directories#71
htazq wants to merge 1 commit into
GOODBOY008:mainfrom
htazq:feat/issues-69-70-file-browser

Conversation

@htazq

@htazq htazq commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an opt-out Follow terminal directory toggle to the integrated browser
  • inject a small Bash PROMPT_COMMAND hook that emits standard OSC 7 working-directory reports without parsing visible prompts
  • scope the latest directory to each terminal/tab and preserve the last good browser listing when a reported path is inaccessible
  • add Download directory to the integrated browser by reusing the existing recursive transfer dialog
  • let normal SSH connections open one SFTP subsystem for recursive enumeration, instead of requiring a standalone SFTP tab

Why these issues are together

#69 and #70 meet at the integrated SSH file-browser boundary and share the same path/session isolation work. I did not bundle other open issues:

Behavior covered

  • cd with absolute and relative paths, cd .., cd ~, cd -, pushd, and popd
  • spaces, Unicode, percent encoding, %, #, and ?
  • active-tab/connection isolation and reconnect remounts
  • global persisted follow toggle; file-browser navigation never sends cd
  • inaccessible paths keep the previous path/listing and warn once until a successful load
  • recursive directory creation/download, progress, per-file errors, and cancellation

Validation

  • pnpm test — 39 files, 525 tests passed
  • pnpm build — passed
  • pnpm i18n:check — 950 keys in both locales
  • ESLint on every touched frontend source file — 0 errors
  • cargo test --lib --locked in Linux/Tauri container — 108 passed, 6 ignored
  • cargo check --locked in Linux/Tauri container — passed
  • cargo clippy --locked — completed; only existing repository warnings
  • real Docker OpenSSH test — Bash OSC 7 follow cases and same-session SFTP Unicode/nested listing passed
  • git diff --check — passed

Repository-wide pnpm lint remains red on the same 3 pre-existing errors in connection-dialog.tsx and settings-modal.tsx. Repository-wide cargo fmt --check also remains red on pre-existing formatting outside these hunks; both CI jobs are existing baseline conditions (Rust formatting is continue-on-error).

Known boundaries

  • If sudo -i or su - starts a fresh login shell that discards PROMPT_COMMAND, following resumes only when that shell itself emits OSC 7 or after returning to the instrumented Bash shell. This change intentionally does not edit remote rc files, preserve unsafe environment variables through sudo, or rewrite user commands.
  • Mixed file+directory multi-selection download is not included; the requested right-click directory download path is complete and reuses the existing progress/cancel UI.

Closes #69
Addresses #70

@GOODBOY008

Copy link
Copy Markdown
Owner

@sunxiaobin89 Can you help to review this PR?

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.

Integrated file browser cannot download remote directories

2 participants