Christian Visintin a252caa66b refactor: FileTransferActivity pane-agnostic dispatch (#386)
Comprehensive design for incremental refactoring of the 13k-line
FileTransferActivity god-struct using a unified Pane abstraction.
Detailed step-by-step plan covering 6 phases: split monoliths,
error handling, Pane struct, action dedup, session split, view reorg.
Extract 26 popup components from the monolithic 1,868-line popups.rs
into 20 individual files under popups/. Each file contains one or two
related components with their own imports. The popups.rs module file
now contains only module declarations and re-exports.
Replace 8 panic!() calls with error!() logging and early returns/fallthrough.
These panics documented invariants (e.g. "this tab can't do X") but would crash
the app if somehow triggered. Error logging is safer and more resilient.
Replace raw FileExplorer fields in Browser with Pane structs that bundle
the explorer and connected state. Move host_bridge_connected and
remote_connected from FileTransferActivity into the panes. Add navigation
API (fs_pane, opposite_pane, is_find_tab) for future unification tasks.
Rename private get_selected_file to get_selected_file_by_id and add three
new unified methods (get_selected_entries, get_selected_file, is_selected_one)
that dispatch based on self.browser.tab(). Old per-tab methods are kept for
now until their callers are migrated in subsequent tasks.
Collapse _local_/_remote_ action method pairs (mkdir, delete, symlink,
chmod, rename, copy) into unified methods that branch internally on
is_local_tab(). This halves the number of action methods and simplifies
the update.rs dispatch logic. Also unifies ShowFileInfoPopup and
ShowChmodPopup dispatching to use get_selected_entries().
Move `host_bridge` and `client` filesystem fields from FileTransferActivity
into the Pane struct, enabling tab-agnostic dispatch via `fs_pane()`/
`fs_pane_mut()`. This eliminates most `is_local_tab()` branching across
15+ action files.
Key changes:
- Add `fs: Box<dyn HostBridge>` to Pane, remove from FileTransferActivity
- Replace per-side method pairs with unified pane-dispatched methods
- Unify navigation (changedir, reload, scan, file_exists, has_file_changed)
- Replace 147-line popup if/else chain with data-driven priority table
- Replace assert!/panic!/unreachable! with proper error handling
- Fix typo "filetransfer_activiy" across ~29 files
- Add unit tests for Pane

Net result: -473 lines, single code path for most file operations.
2026-02-27 21:58:31 +01:00
2026-02-24 12:33:58 +01:00
2025-06-08 18:34:59 +02:00
2025-12-20 17:12:50 +01:00
2025-04-15 12:24:08 +02:00
2022-10-15 14:01:00 +02:00
2025-12-20 17:12:50 +01:00
2023-05-09 15:40:28 +02:00
2021-07-23 14:32:50 +02:00
2023-07-05 12:33:17 +02:00

termscp

termscp logo

~ A feature rich terminal file transfer ~

Website · Installation · User manual

English   Brazilian Portuguese   Deutsch   Español   Français   Italiano   简体中文

Developed by @veeso

Current version: 0.19.1 2025-12-20

License-MIT Repo stars Downloads counter Latest version Ko-fi

Linux CI MacOS CI Windows CI


About termscp 🖥

Termscp is a feature rich terminal file transfer and explorer, with support for SCP/SFTP/FTP/Kube/S3/WebDAV. So basically is a terminal utility with an TUI to connect to a remote server to retrieve and upload files and to interact with the local file system. It is Linux, MacOS, FreeBSD, NetBSD and Windows compatible.

Explorer


Features 🎁

  • 📁 Different communication protocols
    • SFTP
    • SCP
    • FTP and FTPS
    • Kube
    • S3
    • SMB
    • WebDAV
  • 🖥 Explore and operate on the remote and on the local machine file system with a handy UI
    • Create, remove, rename, search, view and edit files
  • Connect to your favourite hosts through built-in bookmarks and recent connections
  • 📝 View and edit files with your favourite applications
  • 💁 SFTP/SCP authentication with SSH keys and username/password
  • 🐧 Compatible with Windows, Linux, FreeBSD, NetBSD and MacOS
  • 🐚 Embedded terminal for executing commands on the system.
  • 🎨 Make it yours!
    • Themes
    • Custom file explorer format
    • Customizable text editor
    • Customizable file sorting
    • and many other parameters...
  • 📫 Get notified via Desktop Notifications when a large file has been transferred
  • 🔭 Keep file changes synchronized with the remote host
  • 🔐 Save your password in your operating system key vault
  • 🦀 Rust-powered
  • 👀 Developed keeping an eye on performance
  • 🦄 Frequent awesome updates

Get started 🚀

If you're considering to install termscp I want to thank you 💜 ! I hope you will enjoy termscp!
If you want to contribute to this project, don't forget to check out our contribute guide.

If you are a Linux, a FreeBSD or a MacOS user this simple shell script will install termscp on your system with a single command:

curl --proto '=https' --tlsv1.2 -sSLf "https://git.io/JBhDb" | sh

MacOs installation requires Homebrew, otherwise the Rust compiler will be installed

while if you're a Windows user, you can install termscp with Chocolatey:

choco install termscp

NetBSD users can install termscp from the official repositories.

pkgin install termscp

Arch Linux users can install termscp from the official repositories.

pacman -S termscp

For more information or other platforms, please visit termscp.veeso.dev to view all installation methods.

⚠️ If you're looking on how to update termscp just run termscp from CLI with: (sudo) termscp --update ⚠️

Requirements

  • Linux users:
    • libdbus-1
    • pkg-config
    • libsmbclient
  • FreeBSD or, NetBSD users:
    • dbus
    • pkgconf
    • libsmbclient

Optional Requirements ✔️

These requirements are not forced required to run termscp, but to enjoy all of its features

  • Linux/FreeBSD users:
    • To open files via V (at least one of these)
      • xdg-open
      • gio
      • gnome-open
      • kde-open
  • Linux users:
  • WSL users
    • To open files via V (at least one of these)

Support the developer

If you like termscp and you're grateful for the work I've done, please consider a little donation 🥳

You can make a donation with one of these platforms:

ko-fi PayPal


User manual 📚

The user manual can be found on the termscp's website or on Github.


Upcoming Features 🧪

See Milestones


Contributing and issues 🤝🏻

Contributions, bug reports, new features and questions are welcome! 😉 If you have any question or concern, or you want to suggest a new feature, or you want just want to improve termscp, feel free to open an issue or a PR.

An appreciated contribution would be a translation of the user manual and readme in other languages

Please follow our contributing guidelines


Changelog

View termscp's changelog HERE


Powered by 💪

termscp is powered by these awesome projects:


Termscp Home

Auth

Bookmarks

Bookmarks

Setup

Setup

Text editor

TextEditor


License 📃

termscp is licensed under the MIT license.

You can read the entire license HERE

Languages
Rust 95.4%
HTML 2.9%
Shell 1%
JavaScript 0.4%
CSS 0.3%