History / Recently Completed: Show tagged downloads completed in the last X days #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
As a user, I want to see a dedicated "Recently Completed" section (or view) that displays downloads which finished in the last X days where the Sonarr/Radarr item has my user tag attached.
This complements the existing active downloads dashboard and gives users quick visibility into what has recently been added to their library.
Motivation
Requirements
Core Functionality
RECENT_COMPLETED_DAYSenv var).?showAll=true)./history)/history)Displayed Information per Item
UI/UX
Acceptance Criteria
/api/history/recent(or similar) that returns tagged recent history.showAllfor admins).Technical Notes
downloadFolderImported,downloadCompleted).Open Questions / Future Enhancements
developto v2-developThis feature is fully implemented and merged to
v2-develop. All acceptance criteria are met:Implemented
GET /api/history/recent— new endpoint returning Sonarr/Radarr history filtered to the last N days, scoped to the authenticated user's tag. Multi-instance compatible.server/utils/historyFetcher.js— dedicated fetcher with a 5-minute cache (TTL), event classification (imported/failed/other), and per-instance metadata (instanceName,arrLink).RECENT_COMPLETED_DAYSenv var (default 7, max 90 enforced), overridable per-request via?days=N.?showAll=truereturns all tagged items across users, with per-tag Emby user classification (matched / unmatched badges)."failed"styling;failureMessage(from Sonarr/Radarrdata.message) is included for admin users only.tests/unit/historyFetcher.test.js) and integration tests (tests/integration/history.test.js) added — 141 tests passing.README.mdand docs/ARCHITECTURE.md updated (route table, cache keys, env vars, API reference, component diagram).history:sonarr,history:radarr).Open questions / deferred
failedoutcomes.Closing as complete.