Files
minstrel/web
bvandeusen 7b91718fc9 feat(admin): expand /admin overview into an actionable workbench
The admin overview was just two stat cards. Promotes it to a proper
workbench by surfacing the top-5 of each actionable queue with inline
handlers, while keeping the dedicated /admin/requests and
/admin/quarantine pages as the deep-action surfaces.

Changes:

- Top stats grow from 2 cards to 3 (requests / quarantine / lidarr).
- New "Pending requests" preview list — top-5 rows with inline Approve
  and Reject buttons that call the same approveRequest/rejectRequest
  endpoints used on the dedicated page (default profiles, no override
  modal — that flow stays on /admin/requests for power users).
- New "Quarantine" preview list — top-5 rows with three inline actions
  matching the dedicated page: Resolve (single click), Delete file
  (two-click confirm with inline "Confirm?" state), Delete via Lidarr
  (two-click confirm). The two-click confirm avoids modal duplication
  on the overview while still gating the irreversible operations.
- "View all <N> →" link surfaces beneath each preview only when the
  full queue exceeds the preview limit, pointing to the dedicated page.
- Shared toast surface with errorCopy mapping for the same lidarr_*
  codes the dedicated requests page handles, so failed actions surface
  meaningful text instead of "unknown".

Test fixture migrated from per-test dynamic imports to top-level
imports — the previous pattern was producing stale-mock symptoms
where mockReturnValue was set after the page bound against the
original mocks. 12 tests cover stat counts, empty states, links,
each handler binding, the two-click confirm pattern, and the
"View all" surfacing rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 12:51:57 -04:00
..