Showcase cadence tuning + cooldown-aware bulk retry #38

Merged
bvandeusen merged 0 commits from dev into main 2026-05-30 23:50:37 -04:00
bvandeusen commented 2026-05-30 23:50:29 -04:00 (Migrated from git.fabledsword.com)

Summary

Three UX-focused commits since PR #37.

  • 9cd6d09 — Showcase load felt "chunky" (per-batch API pauses) and infinite-scroll fired too late on tall masonry images. Parallel-then-trickle for the initial load (one-item-at-a-time at 80ms cadence); bumped MasonryGrid's useInfiniteScroll rootMargin from 600px → 2400px so a tall single-column image can't push the sentinel below where the user's actually reading.
  • e3a7aff — Replaced the all-parallel fetch with a pipeline: one fetch in flight at a time, but the next fires as soon as the current resolves (overlapping the next RTT with the visible trickle). In-order arrival guaranteed. PAGE 5 → 3 + INITIAL_BATCHES 12 → 20 (still 60 total) so the first chunk's items appear sooner.
  • a510149 — Manual /api/sources/<id>/check now respects the platform cooldown by default; returns 202 {status: 'deferred', platform, cooldown_until} instead of dispatching. Bulk retry (RETRY ALL + MaintenanceMenu "Retry failed") leaves cooldown on; single-source RETRY click sends ?force=true to override (operator-explicit, useful for rapid auth-fix testing). Toast tallies queued / deferred (cooldown) / already running so the deferred count answers "is rate-limit my dominant failure mode" at a glance.

No alembic migrations. Rename: _platforms_in_cooldownactive_platform_cooldowns (now a cross-module API used by sources.py).

Test plan

  • Showcase smoothness: Open /showcase. Items should trickle in one-at-a-time at a steady cadence, no per-batch bursts. Network panel shows pipelined /api/showcase?limit=3 calls.
  • Infinite-scroll trigger: Scroll a showcase that contains at least one tall manga page. The next batch should load well before the tall image reaches the bottom of the viewport.
  • Bulk retry with cooldown: With a platform in cooldown (force one by visiting a rate-limited Patreon source), click RETRY ALL. Toast reads e.g. "5 queued, 12 deferred (cooldown), 3 already running"; no new download_event rows on the deferred sources.
  • Single-source override: Click the per-source RETRY button on a cooled-down failing source. It queues immediately (force=true bypasses cooldown).
  • Auto-resume: Wait for cooldown to expire. Next scan tick re-queues the deferred sources without manual intervention.

🤖 Generated with Claude Code

## Summary Three UX-focused commits since PR #37. - **`9cd6d09`** — Showcase load felt "chunky" (per-batch API pauses) and infinite-scroll fired too late on tall masonry images. Parallel-then-trickle for the initial load (one-item-at-a-time at 80ms cadence); bumped MasonryGrid's `useInfiniteScroll` rootMargin from 600px → 2400px so a tall single-column image can't push the sentinel below where the user's actually reading. - **`e3a7aff`** — Replaced the all-parallel fetch with a **pipeline**: one fetch in flight at a time, but the next fires as soon as the current resolves (overlapping the next RTT with the visible trickle). In-order arrival guaranteed. `PAGE` 5 → 3 + `INITIAL_BATCHES` 12 → 20 (still 60 total) so the first chunk's items appear sooner. - **`a510149`** — Manual `/api/sources/<id>/check` now respects the platform cooldown by default; returns `202 {status: 'deferred', platform, cooldown_until}` instead of dispatching. Bulk retry (RETRY ALL + MaintenanceMenu "Retry failed") leaves cooldown on; single-source RETRY click sends `?force=true` to override (operator-explicit, useful for rapid auth-fix testing). Toast tallies `queued` / `deferred (cooldown)` / `already running` so the deferred count answers "is rate-limit my dominant failure mode" at a glance. No alembic migrations. Rename: `_platforms_in_cooldown` → `active_platform_cooldowns` (now a cross-module API used by `sources.py`). ## Test plan - [ ] **Showcase smoothness:** Open `/showcase`. Items should trickle in one-at-a-time at a steady cadence, no per-batch bursts. Network panel shows pipelined `/api/showcase?limit=3` calls. - [ ] **Infinite-scroll trigger:** Scroll a showcase that contains at least one tall manga page. The next batch should load well before the tall image reaches the bottom of the viewport. - [ ] **Bulk retry with cooldown:** With a platform in cooldown (force one by visiting a rate-limited Patreon source), click RETRY ALL. Toast reads e.g. *"5 queued, 12 deferred (cooldown), 3 already running"*; no new `download_event` rows on the deferred sources. - [ ] **Single-source override:** Click the per-source RETRY button on a cooled-down failing source. It queues immediately (force=true bypasses cooldown). - [ ] **Auto-resume:** Wait for cooldown to expire. Next scan tick re-queues the deferred sources without manual intervention. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledCurator#38