project-nomad/admin/app/controllers
chriscrosstalk fedee18bd3 feat(downloads): rich progress, friendly names, cancel, and live status (#554)
* feat(downloads): rich progress, friendly names, cancel, and live status

Redesign the Active Downloads UI with four improvements:

- Rich progress: BullMQ jobs now report downloadedBytes/totalBytes instead
  of just a percentage, showing "2.3 GB / 5.1 GB" instead of "78% / 100%"
- Friendly names: dispatch title metadata from curated categories, Content
  Explorer library, Wikipedia selector, and map collections
- Cancel button: Redis-based cross-process abort signal lets users cancel
  active downloads with file cleanup. Confirmation step prevents accidents.
- Live status indicator: green pulsing dot with transfer speed for active
  downloads, orange stall warning after 60s of no data, gray dot for queued

Backward compatible with in-flight jobs that have integer-only progress.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(downloads): fix cancel, dismiss, speed, and retry bugs

- Speed indicator: only set prevBytesRef on first observation to prevent
  intermediate re-renders from inflating the calculated speed
- Cancel: throw UnrecoverableError on abort to prevent BullMQ retries
- Dismiss: remove stale BullMQ lock before job.remove() so cancelled
  jobs can actually be dismissed
- Retry: add getActiveByUrl() helper that checks job state before
  blocking re-download, auto-cleans terminal jobs
- Wikipedia: reset selection status to failed on cancel so the
  "downloading" state doesn't persist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(downloads): improve cancellation logic and surface true BullMQ job states

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Jake Turner <jturner@cosmistack.com>
2026-04-01 23:54:16 -07:00
..
benchmark_controller.ts fix(Benchmark): improved error reporting and fix sysbench race condition 2026-02-11 22:09:31 -08:00
chats_controller.ts fix: improve type-safety for KVStore values 2026-03-03 20:51:38 -08:00
collection_updates_controller.ts fix(security): path traversal and SSRF protections from pre-launch audit 2026-03-11 14:08:09 -07:00
docs_controller.ts fix(Docs): fix doc rendering 2025-07-11 15:31:07 -07:00
downloads_controller.ts feat(downloads): rich progress, friendly names, cancel, and live status (#554) 2026-04-01 23:54:16 -07:00
easy_setup_controller.ts feat(AI): enable remote AI chat host 2026-04-01 23:54:16 -07:00
home_controller.ts fix(OSM): osm installation 2025-08-20 23:05:19 -07:00
maps_controller.ts fix(Maps): add x-forwarded-proto support to handle https termination (#600) 2026-04-01 23:54:16 -07:00
ollama_controller.ts feat(AI): enable remote AI chat host 2026-04-01 23:54:16 -07:00
rag_controller.ts feat(AI): enable remote AI chat host 2026-04-01 23:54:16 -07:00
settings_controller.ts fix(security): validate key parameter on settings read endpoint#517 2026-04-01 23:54:16 -07:00
system_controller.ts fix: surface actual error message when service installation fails 2026-03-25 16:30:35 -07:00
zim_controller.ts feat(downloads): rich progress, friendly names, cancel, and live status (#554) 2026-04-01 23:54:16 -07:00