Streaming Download Manager with Resume Support
Version: 4.35.0 Date: 2026-02-13
Goal: Fix silent application crashes when users download large files (>100MB) and provide modern download management UI similar to web browsers.
Solution: Migrated download logic from renderer process (RAM buffer) to main process (streaming I/O) with automatic retry, resume capabilities, and persistent download history.
Features:
- Real-time download progress tracking with visual progress bars
- Modern dropdown UI showing all active and completed downloads
- Automatic file naming with incremental numbering (file.pdf → file (1).pdf)
- Download queue management (max 3 concurrent downloads)
- Persistent download history (30-day retention, user-scoped)
- Automatic retry on network failures (3 attempts with exponential backoff)
- Resume interrupted downloads from last byte (Range headers for Azure, GCP, SharePoint)
- File existence verification with visual indication (strikethrough for deleted files)
- Click-to-open files and show in folder
- Error display with full message on hover and copy-to-clipboard
- Type tag ("file" / "proof") to distinguish download types
- Archive files (zip, tar, rar) open containing folder instead of file
- Cross-platform path conversion for Local storage (Windows ↔ Mac)
Implementation Details:
- New download manager architecture in
main/downloads/(main process) - HTTP streaming handler using Electron
net.request(enterprise proxy support) - PQueue for concurrent download management (max 3)
- Persistent storage in
userData/downloads-history/{userId}.json - Automatic
.partfile management for resume capability - Redux store for download state management (
store/downloads/) - Event-driven architecture with IPC listeners
Files Modified:
index.js- Registered download manager on app readymain/downloads/manager.mjs- Download orchestration and IPC handlersmain/downloads/handlers/http.mjs- HTTP streaming with retry/resumemain/downloads/handlers/local.mjs- Local file streaming copymain/downloads/persistence.mjs- History save/load with retentionmain/downloads/utils.mjs- Safe path resolution utilitiessrc/store/downloads/- Redux store, actions, reducer, selectors, typessrc/components/DownloadManager/- UI components and stylessrc/components/Navabar/Navbar.tsx- Added Downloads button with badgesrc/components/SidebarTabs/Details.tsx- Refactored to use new download system, added file size displaysrc/hooks/useDownloadListeners.ts- IPC event listeners hooksrc/utils/downloadHelpers.ts- Config builders for all storage targets