Skip to content

fix(peer): restore terminal control and file downloads#1666

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-peer-device-terminal-download
Jul 21, 2026
Merged

fix(peer): restore terminal control and file downloads#1666
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-peer-device-terminal-download

Conversation

@bobleer

@bobleer bobleer commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep peer download destinations on the controller and stream source bytes from the controlled device
  • support recursive directory export instead of passing directories to std::fs::copy
  • fan out SSH-backed terminal events, prioritize terminal RPCs, and forward SIGINT/SIGTSTP control bytes
  • document split-endpoint download and terminal transport invariants

Root causes

The native save dialog runs on controller A, but export_local_file_to_path was HostInvoked on peer B. That made B attempt to write an A-local path and could return Windows access denied (os error 5). Directory downloads also reached std::fs::copy, which cannot copy a directory.

SSH-backed PTY events were emitted only to the peer desktop webview, terminal RPCs could sit behind two background requests, and remote terminal signals returned success without affecting the PTY.

Validation

  • pnpm run type-check:web
  • pnpm --dir src/web-ui run test:run src/infrastructure/api/adapters/peer-device-adapter.test.ts src/tools/file-system/services/workspaceFileTransfer.test.ts
  • cargo check -p bitfun-desktop
  • cargo test -p bitfun-desktop --lib remote_terminal_signal
  • cargo test -p bitfun-desktop --lib copy_directory_recursive_copies_nested_binary_files
  • git diff --check

Physical Windows to macOS peer smoke testing is still recommended before release.

@bobleer
bobleer merged commit 61eedaa into GCWing:main Jul 21, 2026
5 checks passed
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.

1 participant