Skip to content

Queue isolation#274

Open
AmarBego wants to merge 3 commits into
CarrotRub:masterfrom
AmarBego:queue-isolation
Open

Queue isolation#274
AmarBego wants to merge 3 commits into
CarrotRub:masterfrom
AmarBego:queue-isolation

Conversation

@AmarBego

@AmarBego AmarBego commented May 23, 2026

Copy link
Copy Markdown
Contributor

Fixes download-manager state drift around restart, aria2 reconnects, stale gids, pause handling, and user-visible download engine errors and improves DDL speed by switching to reqwest and run debrid checks in background which slow down DDL fetch

Refs #230
Refs #237
Closes #248
Closes #262
Closes #263
Closes #264
Closes #270
Closes #273

Fixed

Issue Fix
#248 Persisted jobs are restored after backend startup and pushed to the UI via download::manager_ready / download::job_updated.
#262 / #263 Dispatcher now reconnects stale aria2 RPC clients, respawns owned aria2c when its PID dies, and reconciles stale gids after reconnect.
#264 / #273 FuckingFast extraction accepts the new url dl.fuckingfast.co, uses a dedicated browser-like client, and avoids the custom DNS timeout path for FF pages.
#270 Pause preserves last status, handles stale/non-pausable gids quietly, and no longer emits false complete events for 0/0 jobs.
#230 Partially addressed by deterministic job IDs, more frequent aria2 session saves, reconnect handling, and stale-gid cleanup. No full per-task retry loop yet.
#237 Partially addressed by shutting down idle controller state on app exit.

Backend

  • Register DownloadManager before load_from_disk.
  • Emit restored jobs and download::manager_ready after disk load.
  • Route polling through Aria2WsClient instead of a raw aria2 client.
  • Reconnect after repeated RPC failures and fast-path respawn when the owned aria2 PID is gone.
  • Add download::aria2_status states: idle, connected, reconnecting, disconnected.
  • Add download::manager_error for actionable pause/resume/load failures.
  • Preserve paused-job status instead of clearing progress.
  • Replace stale gids on resume instead of appending new gids.
  • Prune dead gids from jobs, gid_index, and per-file status after reconnect.
  • Require total_length > 0 before progress-based complete events.
  • Shut down owned aria2 when the queue becomes empty.
  • Flush pending manager saves on app exit.
  • Use a dedicated FuckingFast reqwest client with Chrome UA and default resolver behavior.

Frontend

  • Listen for download::aria2_status, download::manager_error, and download::manager_ready.
  • Add manager status store with capped, auto-expiring error toasts.
  • Show reconnect/disconnected banners only for real non-idle engine states.
  • Fetch DDL hoster links only after the user picks a hoster.
  • Run debrid provider checks in the background so they do not block FuckingFast selection.
  • Remove dead setHoveredItem state in Dropdown.tsx.

Tests

  • DDL job survives app restart and resumes.
  • Torrent job survives app restart and resumes.
  • Killing aria2c.exe during a download shows reconnecting, respawns aria2, clears the banner, and progress resumes.
  • Permanent reconnect failure shows disconnected state.
  • Pause RPC failures produce error toasts only for real failures.
  • Tray quit/relaunch does not leave a stale controller process.
  • Empty queue cold boot shows no reconnect/disconnected banner and leaves no owned aria2c running.
  • DDL modal can start FuckingFast loading while debrid checks continue in the background.

Kewz4 pushed a commit to Kewz4/Fit-Launcher that referenced this pull request Jun 5, 2026
… PR#274

AMOLED theme (no gradients, no color accent):
- xbox-dark theme is now pure black (#000) with white accent — clean
  minimalist with zero color tint
- Strip hardcoded gradients from Downloads-Page title, Library header,
  progress bars, and Button component glass variant
- Button component fully rewritten without gradient/conic/radial effects

Icons — K lettermark on every platform:
- Regenerate all 14 icon sizes (32→310px) as black circle with white K
- Generate icon.ico (16/32/48/256 sizes) with embedded PNGs
- favicon in index.html updated to inline SVG K badge

Splash screen:
- New splashscreen.html: pure black, centered white K badge square,
  "GameHub Launcher / by Kewz", three animated loading dots — no girl

Window controls:
- Re-add Minimize (–) and Maximize (□) buttons alongside Close (×)
- Styled cleanly: small, muted, hover highlights; no DWM chrome

PR CarrotRub#274 (CarrotRub/Fit-Launcher) frontend changes:
- Dropdown: remove broken [setHoveredItem] signal destructure (getter
  was being assigned to the setter name, causing a stale-ref bug)
- manager/api.ts: add onError(), onReady() subscriptions + listeners
  for download::error and manager_ready events; clean up in teardown()
- New managerStatus.ts store: tracks connection state, collects recent
  errors (max 5, 12s TTL), exposes dismissError()
- Downloads-Page: shows dismissible error banners for recent errors

Disk space error detection:
- isDiskSpaceError() helper matches ENOSPC / "no space left" / "disk
  full" / "not enough space" patterns in multiple languages
- On mount, Downloads-Page subscribes to DM.onError() and shows a
  native error dialog when a disk-space error is detected
- Error banner in UI highlights disk-space errors in red

CI:
- Add cache-on-failure: true + shared-key to rust-cache so partial
  builds still populate the cache (speeds up re-runs after failures)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants