Commit Graph

46 Commits

Author SHA1 Message Date
Christian Visintin 49a74d02ea fix: replace panics reachable from user input with proper error handling 2026-04-19 01:54:46 +05:30
Christian Visintin f6d35f1eea 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-04-19 01:54:46 +05:30
veeso 368570592f feat(cli): added --wno-keyring flag to disable keyring
Linux / build (push) Waiting to run
MacOS / build (push) Waiting to run
Windows / build (push) Waiting to run
closes #308
2025-03-22 13:44:02 +01:00
veeso b0f314837e build(deps): updated dependencies and edition to 2024 2025-03-15 14:15:45 +01:00
Christian Visintin b7369162d2 SMB support (#184)
* feat: smb client

* fix: smb connection

* fix: smbclient deps

* feat: SMB mentions to user manual

* feat: changelog

* dlib macos

* fix: removed smb support from macos :(

* fix: restored libsmbclient build

* fix: strange lint message

* fix: macos build smb

* fix: macos build smb

* fix: macos tests

* fix: macos lint

* feat: SMB windows support

* fix: windows tests
2023-05-13 15:00:16 +02:00
veeso c5eeae74b7 fmt 2023-05-09 15:40:21 +02:00
Christian Visintin 9009002b6e debug log belongs in cache directory not config directory (#179)
* log files are now written to cache dir instead of config dir

* lint

* fmt
2023-05-09 15:32:42 +02:00
veeso 4d5f3a6b63 lint 2023-02-11 12:23:56 +01:00
veeso 0057a657d2 removed license headers 2022-06-09 14:28:02 +02:00
veeso f28dba7660 added new s3 params 2022-03-05 11:06:14 +01:00
Christian Visintin 7d55563556 Aws s3 connection parameters extension (#89)
* Aws s3 connection parameters extension

* Changed 'save password?' popup to 'change secrets?'

* missing docs
2022-01-06 10:44:34 +01:00
veeso 027545f14c Removed docs headers 2022-01-06 10:44:34 +01:00
veeso 1d09095ab9 Aws s3 support 2021-09-01 15:20:05 +02:00
veeso 764cca73d1 linter 2021-08-10 22:27:20 +02:00
veeso 0a7e29d92f Theme provider and '-t' and '-c' CLI options 2021-07-07 12:54:30 +02:00
veeso d16f9e7ad8 Merge branch '0.6.0' into keyring-rs-linux 2021-06-26 15:13:31 +02:00
veeso 97a62def11 Brought all extern crate to top level 2021-06-26 12:32:11 +02:00
veeso 8b01c71819 Coverage 2021-06-26 12:06:49 +02:00
veeso 2d8ce475f8 Merge branch '0.6.0' into keyring-rs-linux 2021-06-21 20:51:24 +02:00
veeso c78fc583b0 Fix: target_family unix means also macos and linux; use BSD target_os 2021-06-21 09:11:28 +02:00
veeso 19610479bd keyring support for linux 2021-06-20 15:04:16 +02:00
veeso e3d2151bad Unix Build 2021-06-20 14:38:03 +02:00
veeso 1c58f1d623 Use containers to test file transfers
Use containers to test file transfers

Container setup

Container setup

tests with docker-compose

these tests won't work with containers

ftp tests with containers; removed crap servers; tests only lib

hostname for github

booooooh

fixed recursive remove FTP

Use containers to test file transfers

Container setup

Container setup

tests with docker-compose

these tests won't work with containers

ftp tests with containers; removed crap servers; tests only lib

hostname for github

booooooh

fixed recursive remove FTP

fixed rename

changelog

Desperate attempt

Fixed ftp tests; migrated sftp tests to containers; use env for services

github actions are just broken imo

github actions are just broken imo

Don't use services, since they just don't fuckin work...

docker compose not supported yet?

deprecated typo

Now explain this: github actions have services (which don't work) and then you find out docker-compose is already installed *BLOWMIND*

Fixed hostname for tests

scp tests

maybe

tests

wtf

Restored host tests

Changelog

Improving coverage

Improving coverage

Restored coverage task

More tests for file transfers; test ssh keys too

typo

tests; code improvements

Use tests helpers

fixed tempdir

fixed tempdir
2021-06-15 17:51:06 +02:00
veeso c1b3511c06 Working on logging 2021-05-16 22:26:16 +02:00
veeso 892be42988 pretty assert 2021-05-06 21:57:04 +02:00
veeso 55e884889c Clippy 2021-03-27 12:17:35 +01:00
veeso 96b7aff3b6 format 2021-03-26 22:30:47 +01:00
veeso 1ad75adf87 License changed to MIT 2021-03-26 22:25:10 +01:00
ChristianVisintin 23ca2baa8c Cargo clippy 2021-01-16 18:02:12 +01:00
ChristianVisintin ac02928e69 Don't run bookmarks tests on macos 2021-01-16 17:37:03 +01:00
ChristianVisintin 08d8a3621c Keyring storage in bookmarks client (if possible) 2021-01-16 16:57:00 +01:00
ChristianVisintin 76fdd9864c Fixed copyright header 2021-01-16 15:13:58 +01:00
ChristianVisintin bf56a269e0 Replaced Box<dyn Iterator... with impl Iterator 2021-01-16 10:37:53 +01:00
veeso 2bd3d33ff6 Updated copyright 2021-01-09 20:45:06 +01:00
ChristianVisintin ce924bb294 random utils 2020-12-24 11:23:31 +01:00
ChristianVisintin 9b9dc43a7f FileTransferProtocol ToString and FromStr traits 2020-12-24 10:03:48 +01:00
ChristianVisintin c35a5590b5 Updated dependencies 2020-12-22 18:33:38 +01:00
ChristianVisintin e761a90826 Crypto as utility module 2020-12-22 17:34:52 +01:00
ChristianVisintin eb12da0308 Utils into multiple files 2020-12-20 15:36:48 +01:00
ChristianVisintin 898b57943b Improved test coverage 2020-12-18 14:40:37 +01:00
ChristianVisintin dd6e2be75d Panic if bookmark name is empty 2020-12-16 20:39:35 +01:00
ChristianVisintin 562a1b3ae8 Clippy optimizations 2020-12-16 16:35:11 +01:00
ChristianVisintin 65c541ff2a bookmarks client OK 2020-12-16 16:32:50 +01:00
ChristianVisintin ee55d1fd31 Bookmarks client 2020-12-16 12:09:34 +01:00
ChristianVisintin dcc289153f Working on bookmarksClient 2020-12-15 22:17:19 +01:00
ChristianVisintin 940d8d94e5 Moving bookmarks from ui to system 2020-12-15 20:48:43 +01:00