Commit Graph

22 Commits

Author SHA1 Message Date
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 f747750f97 feat(dashboard): smarter Retry All Failed with per-source dedup and recent-success skip
The Dashboard's "Retry All Failed" button used to fetch every non-superseded
failure, then fire one retry HTTP call per row. Two missing guards:

- No per-source dedup — a source with N historical failures enqueued N jobs
  for the same URL.
- No "recent success" check — a source that succeeded two hours ago could
  still have stale un-superseded failures from last week that got re-queued.

Adds POST /api/downloads/retry-failed-bulk:

  • Selects non-superseded failures, ordered (source_id ASC, created_at DESC)
  • Per-source dedup keeps only the most recent failure per source
  • Skips sources whose last_success is within the configurable recent window
    (default 24h, via recent_window_hours body param)
  • Resets + enqueues in a single DB transaction, single Celery dispatch loop
  • Returns a per-reason skip breakdown: duplicate_source, recent_success,
    no_source (orphaned rows)

The Dashboard button now calls the bulk endpoint and surfaces the full
skip breakdown in the toast, so the user knows exactly what was (and
wasn't) queued. Logic is extracted into a pure _plan_bulk_retry helper
and unit-tested against SimpleNamespace fixtures — 7 new tests covering
the dedup, window, and orphan paths.
2026-04-19 14:41:49 -04:00
bvandeusen 24c3999f55 feat(ui): align Dashboard Active and Recent Activity card heights
Both cards now use h-100 with a flex column layout so v-row stretches
them to match, and their v-card-text grows to fill so their footers
line up. Move Active's "+N more queued" out of the list body into a
proper v-card-actions footer mirroring Recent Activity's "View all
downloads" button.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 15:52:05 -04:00
bvandeusen e9edaeb66d feat(ui): cap Dashboard Active and Recent Activity lists at 5 items
Both lists could grow long enough to dominate the viewport (21 queued
downloads was common). Limit each to 5 entries with a "+N more"
affordance: Active shows a "+N more queued" button that deep-links to
/downloads?status=queued, and Recent Activity folds the overflow count
into the existing "View all downloads" button. Seed Downloads.vue's
status filter from the URL query param so the deep-link actually filters
on arrival.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 15:47:38 -04:00
bvandeusen c5ebbe5a76 feat(ui): add legend and per-bar tooltip to Platform Health
The dual meaning of the progress bar (red = failing share, green = all
healthy) was not self-explanatory. Added a small legend beside the
section header and a hover tooltip on each bar that states "N of M
<platform> sources failing".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 15:08:11 -04:00
bvandeusen ae140dbb0a feat(ui): show relative timestamps on Dashboard and Downloads tables
Converts the Source Health last-check column and the Downloads created-at
column from locale date strings to human-relative times ("6 hours ago").
The absolute timestamp is preserved as a native browser tooltip so full
precision is still one hover away; detail modals keep the absolute form.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 15:07:19 -04:00
bvandeusen 9f8ce67084 feat(ui): group repeated failures by subscription on Dashboard recent activity
Consecutive failures on the same source no longer spam the feed as
separate rows. Failed downloads are now bucketed per subscription and
rendered as a single row with a failure count and the latest
timestamp, while successful/running entries still render individually.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 15:04:21 -04:00
bvandeusen f3412dea57 fix(dashboard): guard failureThreshold against empty/invalid settings values
v-model.number on the Settings input returns an empty string when cleared,
which persists through the PATCH and then coerces error_count >= '' to
error_count >= 0 — flagging every source as failing. Coerce to Number and
fall back to 5 unless the value is a finite number >= 1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 23:53:18 -04:00
bvandeusen 42192e82be fix(dashboard): add missing getPlatformColor helper for platform health bars
The platform-health row icon binds to getPlatformColor(row.platform) but the
helper was only present in Sources.vue/Subscriptions.vue/Credentials.vue/
Settings.vue — not copied into Dashboard.vue when the template was introduced,
so the icons next to each platform row rendered in Vuetify's default color.
Also collapse the double blank line left where sourcesWithErrors was removed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 23:50:09 -04:00
bvandeusen f809fa552d feat(dashboard): replace recent-failures list with platform health bars + strict failing-source table 2026-04-17 23:44:42 -04:00
bvandeusen 7680f03560 refactor(dashboard): drop redundant PLATFORM_ORDER and misleading optional chain
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 23:31:29 -04:00
bvandeusen 62713cfec0 feat(dashboard): add failure-threshold computeds backed by settings store 2026-04-17 23:29:02 -04:00
bvandeusen 294ccdc748 feat(ui): consistent empty states and running pulse on Dashboard
- Updated empty state messages to include descriptive icons, main text (body-1), and helper text (caption)
- Active Downloads: shows idle status with check-circle icon
- Recent Activity: shows history icon with context about failures/new downloads
- Sources Needing Attention: shows check-all icon confirming 7-day health check
- Added pulse animation to running downloads with left border animation
- Consistent styling across all empty states with py-8 padding and secondary color icons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 18:31:03 -04:00
bvandeusen b419ee8b32 feat(ui): number-forward stat cards and split action bar on Dashboard 2026-03-19 18:29:19 -04:00
bvandeusen 4eac527f0f perf: parallelize checkAllSources with Promise.allSettled 2026-03-18 23:36:33 -04:00
bvandeusen 055808ea6d polish for failed retry mechanic and consistent sub naming 2026-02-04 15:02:50 -05:00
Bryan Van Deusen cc19bbd372 added functionality for pixiv and deviantart 2026-02-02 20:17:13 -05:00
Bryan Van Deusen 097ab16c50 more UI polish and schedule safe guards and optimization 2026-01-30 00:01:45 -05:00
Bryan Van Deusen 575e20f58c ongoing polish in queue handling 2026-01-28 09:32:47 -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 997f31ae27 tuning ui and adding adaptive themeing to extension 2026-01-25 18:47:06 -05:00
Bryan Van Deusen b9b8048a2d rapid interations of server side app and firefox extension 2026-01-24 22:52:51 -05:00