Repository navigation
SAGE File Manager — v1.4.5
SAGE File Manager is a modern, full-featured desktop file manager for Linux, built with Flutter + Rust. It combines multi-view browsing, advanced search, previews, split-view, SMB/LAN support, theming and optimized file operations in a single native experience. Version 1.4.5 is a major quality, performance and usability release focused on speed, reliability and terminal integration.
Overview
v1.4.5 delivers what users asked for most: faster startup, a lag-free sidebar, instant close, and a reliable integrated terminal. While no single feature defines this release, every core path has been audited — from main() initialization to directory watching and window close — resulting in a noticeably smoother experience on both fast SSDs and slow network mounts.
What's New in 1.4.5
1. Performance & Startup
The entire startup pipeline was parallelized and de-bottlenecked:
- Parallel initialization:
LoggingService,GlassTheme,FolderIconService,SettingsService,LocalNotifierandDesktopSessionServicenow start withFuture.wait()afterwindowManager.ensureInitialized(), instead of 10 sequentialawaits. Estimated saving 80-250 ms on cold start. - SharedPreferences cache: Introduced
PrefsCachesingleton, eliminating 6-7 redundantSharedPreferences.getInstance()round-trips per launch. Folder colors are now cached in-memory (Map<String,int?>) instead of N× async reads per sidebar rebuild. - Faster standard folders & disks:
FileService.getStandardDirectories()now checksDesktop/Documents/Pictures/Music/Videos/Downloadsin parallel.FileService.getMountedDisks()collectsdfcandidates and resolveslsblk/blkidlabels in parallel with 800 ms per-disk timeouts (was serial, 300-800 ms → ~40 ms parallel). - Batched initState:
_FileManagerScreenStateno longer floods the main isolate with 6 independentsetStates. A new_batchLoadFastPrefs()loads favorites, preferences, window geometry and caches from a singleSharedPreferencesinstance viaFuture.wait(), and defers the heavygetMountedDisks()scan toaddPostFrameCallbackso the first frame paints immediately. - Cache init parallelized:
ThumbnailCacheServiceandAppImageIconServicenow initialize concurrently.
Result: faster first paint, no sidebar spinner hang on slow df/NFS mounts, and far fewer rebuilds in the first 500 ms.
2. Left Sidebar — No More Lag
- Parallel data load:
Sidebar._loadData()now awaitsFuture.wait([getStandardDirectories, getMountedDisks, SharedPreferences])in one shot (was waterfall). - Icon cache: Folder colors are served from memory; no more
FutureBuilderthrashing on every theme/reorder tick. - Icon decoding optimized: Thumbnail
Image.filenow usescacheWidth/cacheHeight = size * devicePixelRatioviaRepaintBoundary, avoiding full-resolution 50MP decode for 64px previews.
3. Integrated Terminal — Always Active
The embedded terminal was rebuilt for real-world use:
- Autocomplete always on:
compgennow completes the last word only (e.g.cd /ho→/home/completes/ho, not the wholecd /hostring). Works for both files and folders, and is triggered via debouncedonInputChanged. - Tab completion fixed: Same last-word extraction for Tab.
- Focus stays alive: A
Focus.onKeyEventwrapper on the terminal redirects any key press back to the input field when the output area has focus. Clicking the output still allows text selection, but typing never loses the cursor. - Copy & Select All fixed: The right-click menu
Copywas reading from the clipboard. It now reads the actualTextSelectionfromSelectableText.richviaonSelectionChangedand copiestext.substring(start,end).Select allwas missing and is now implemented. - Busy-aware close: See below.
4. Window Close Safety
Closing the manager while the internal terminal is busy now warns the user:
TerminalServicetracks busy state per instance with a 1200 ms debounce timer and aValueNotifier<bool> busyNotifier, plus async child-process detection (ps --ppid/pgrep -Pwith 400 ms timeouts for silent commands likesleep).main.darthooksbusyNotifierandonInstancesChangedtowindowManager.setPreventClose()._handleWindowClose()awaitshasBusyTerminalAsync()(800 ms timeout fallback) and shows a dedicated localized dialog:- “Terminal operation in progress — A command is still running in the internal terminal. Closing may interrupt it. Continue?” (EN/IT/FR/DE/ES/PT).
- Mixed copy+terminal state shows combined message. Idle terminal closes instantly with no warning.
5. Tools Menu — Terminal Icon Restored
- Bug:
Strumenti → Apri terminale interno (F4)usedassets/icons/terminal.pngwhich existed on disk (64×64) but was not declared influtter.assetsinpubspec.yaml. The top menu viaImage(AssetImage)withouterrorBuildershowed a blank/broken image; the empty-space menu viaCompactMenuRowfell back to a genericIcons.terminal. - Fix: Declared
assets/icons/terminal.pnginpubspec.yamland made_mapMenuItemsToWidgets()useImage.asset(..., errorBuilder: Icon(Icons.image_not_supported))for resilience.
6. File Operations & Reliability
- Copy/Move bug fixed: Removed silent fallback that copied the parent directory when the source file was missing (
main.dart_copyFile/_moveFile). - Delete deduplication:
_deleteMultipleFilesnow deduplicates parent/child selections (deleting a folder and its child no longer shows the parent twice) and shows the parent path indelete_operation_window.dart. - .desktop support:
FileService.isDesktopFile()/isDesktopFileSync()detect[Desktop Entry]headers.FileInfo.isDesktopFileadded, populated in_getFileInfoAsync(), icon rendered viafile_icon_service,Typecolumn shows “Program” infile_list.dart,file_properties.dart,file_properties_tabs.dart,quick_look.dart, and double-click launches viaxdg-openbefore ELF check. Localized in 6 languages.
7. Generic Reliability & Resource Management
- Window IPC (
/tmp/sage-fm-ipc) polling changed fromlistSync/readAsStringSyncevery 2s on the main isolate toawait dir.list()+await file.readAsString()async. - Transfer progress timers coalesced from 300 ms/500 ms to 500 ms/1000 ms to reduce I/O storm during copy.
- Leaks fixed:
AudioPlayerWidgetnow stores and cancelsonPlayerState/onPosition/onDurationsubscriptions;main.dartstores_selectionSub/_secondPaneSelectionSuband cancels ondispose. - Glass/transparency:
GlassTheme.isEnablednow guardsBackdropFilterinnavigation_bar.dart(extracted_buildBarContent()) andmain.dartscaffold, avoiding an always-on blur even when disabled.
8. Code Health
- Removed duplicate import in
file_list.dart, unusedSeekimport, 4 unused Rust dependencies inCargo.toml, 13 dead Rust symbols inlib.rs, cleanedrust_ffi.darttypedefs. Bothcargo checkandflutter analyzepass clean (0 new errors).
Technical Details
- Stack: Flutter (Impeller/OpenGL ES, GTK3 embedder), Rust FFI,
window_manager,shared_preferences,yaru,pdfrx,flutter_svg. - I/O model: All heavy work (disk enumeration, thumbnail generation, archive, duplicate finder) is isolated where possible; v1.4.5 moves more to
Future.wait/ async and reduces synchronous*Synccalls on the UI thread. - Localization: EN, IT, FR, DE, ES, PT fully updated for new strings (
fileListTypeProgram,dialogCloseWhileTerminalTitle/Body). - Platform: Linux-first, X11 + Wayland, tested on Mesa/Gallium (NVIDIA/AMD/Intel).
Upgrade is recommended for all users. v1.4.5 makes SAGE feel instant on open, stable on close, and finally makes the integrated terminal a true daily driver — not a secondary widget.