Skip to main content
Version: 4.35.0

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 .part file 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 ready
  • main/downloads/manager.mjs - Download orchestration and IPC handlers
  • main/downloads/handlers/http.mjs - HTTP streaming with retry/resume
  • main/downloads/handlers/local.mjs - Local file streaming copy
  • main/downloads/persistence.mjs - History save/load with retention
  • main/downloads/utils.mjs - Safe path resolution utilities
  • src/store/downloads/ - Redux store, actions, reducer, selectors, types
  • src/components/DownloadManager/ - UI components and styles
  • src/components/Navabar/Navbar.tsx - Added Downloads button with badge
  • src/components/SidebarTabs/Details.tsx - Refactored to use new download system, added file size display
  • src/hooks/useDownloadListeners.ts - IPC event listeners hook
  • src/utils/downloadHelpers.ts - Config builders for all storage targets