Commit Graph

10 Commits

Author SHA1 Message Date
bvandeusen 6d875662fa feat(maintenance): add library-validation sweep task and API
Walks the downloads tree and reports files that fail magic-byte
validation — the "how many pre-existing files in my library are
silently truncated?" question, answered. Skips the _quarantine
subtree (already known-bad) and caps suspect_paths at 500 with a
truncated flag so the persisted report can't grow unbounded.

On-demand only: a full filesystem walk on a NAS-mounted library is
expensive and the user should choose when to pay for it. Pre-existing
files are reported, not quarantined — they may be the only copy and
the user decides what to do.

Adds GET /api/settings/library-validation (most recent report) and
POST /api/settings/library-validation/run (queue a fresh sweep).
Cached under cache.library_validation_report.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 22:56:01 -04:00
bvandeusen 851df294f2 feat(dashboard): revamp with at-a-glance strip, sparkline, modal, disk bar
Replace the four stat cards with a compact three-card strip: 7-day activity
with inline SVG sparkline (new ActivitySparkline), Running Now / Next Check
with per-source countdown list, and System with credential health + disk
usage bar.

- Add GET /downloads/activity-timeline — per-day completed/failed/files
  counts, pre-filled with zero buckets so the sparkline always has N points.
- Report filesystem-level usage via shutil.disk_usage in storage rollup,
  plus a live fallback in GET /settings so the capacity bar works before
  the first Celery rollup runs and for cached rows that predate the field.
- Extract Download Details into a reusable DownloadDetailsModal component
  and wire Recent Activity rows to open it (previously Downloads-page only).
- Compute next scheduled check per source from global schedule_interval;
  surface credential expiration/missing alerts scoped to platforms that
  actually have enabled sources.
- Two-speed polling (5s when downloads are active, 30s idle) with Page
  Visibility awareness so background tabs don't churn the API.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 19:32:59 -04:00
bvandeusen 080a1254c7 fix: wrap AsyncSession in context manager across all API blueprints
Replace all bare `session = AsyncSession(bind=conn)` assignments with
`async with AsyncSession(bind=conn) as session:` in downloads.py,
credentials.py, settings.py, sources.py, and subscriptions.py to
ensure sessions are properly closed on all code paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 23:38:58 -04:00
Bryan Van Deusen fcccfb24ee changes to task scheduling and readability change on downloads view 2026-01-29 19:33:04 -05:00
Bryan Van Deusen 204e8efcdc signing for extension deployment, tuning for download crawl depth, and dependency version visibility in settings view 2026-01-26 22:37:15 -05:00
Bryan Van Deusen 2a0e37a73d improve ux, moved functionality for better ui experience on app and extension. 2026-01-26 11:38:51 -05:00
Bryan Van Deusen 74b1ecf2cf fix typo for storage stats interface 2026-01-26 09:05:46 -05:00
Bryan Van Deusen 997f31ae27 tuning ui and adding adaptive themeing to extension 2026-01-25 18:47:06 -05:00
Bryan Van Deusen dc6755a0c2 move job scheduling to DB 2026-01-24 23:50:09 -05:00
Bryan Van Deusen b9b8048a2d rapid interations of server side app and firefox extension 2026-01-24 22:52:51 -05:00