Commit Graph

367 Commits

Author SHA1 Message Date
gronod 78e954ece1 Step 9: Wire Vite build into Dockerfile + final cleanup
Build and Push Docker Image / build (push) Failing after 16s
Licence Check / Licence compatibility and copyright header verification (push) Failing after 35s
CI / Security audit (push) Successful in 57s
CI / Tests & coverage (push) Successful in 1m10s
- Finalise client/vite.config.js (production-ready vanilla config)
- Add client-build stage to Dockerfile before runtime stage
- Delete public/app.js (replaced by Vite build output)
- All 571 tests passing
- All 9 deliverables from refactor plan complete
2026-05-20 23:39:20 +01:00
gronod d03efbf25e Extract createClientLogo helper to eliminate 2× client-logo duplication
Build and Push Docker Image / build (push) Successful in 27s
Licence Check / Licence compatibility and copyright header verification (push) Failing after 36s
CI / Security audit (push) Successful in 1m1s
CI / Tests & coverage (push) Successful in 1m15s
- Consolidated duplicate client logo creation logic into single helper function
- Removed second duplicate logo block from createDownloadCard
- Updated updateDownloadCard to use the same helper
- Client logo now appears exactly once per download card
2026-05-20 23:36:16 +01:00
gronod 0b91152ad7 Extract renderTagBadges helper to eliminate 4x tag-badge rendering duplication
Build and Push Docker Image / build (push) Successful in 36s
Licence Check / Licence compatibility and copyright header verification (push) Failing after 37s
CI / Security audit (push) Successful in 1m2s
CI / Tests & coverage (push) Successful in 1m19s
2026-05-20 23:33:13 +01:00
gronod 8dc105ff3e Migrate frontend from monolithic app.js to vanilla ES modules
Build and Push Docker Image / build (push) Successful in 35s
Licence Check / Licence compatibility and copyright header verification (push) Failing after 49s
CI / Security audit (push) Successful in 1m9s
CI / Tests & coverage (push) Successful in 1m23s
- Delete React files (App.jsx, main.jsx, App.css)
- Create modular vanilla JS structure in client/src/:
  - state.js (global state object)
  - api.js (all fetch calls)
  - sse.js (SSE connection management)
  - ui/auth.js (authentication UI)
  - ui/downloads.js (downloads rendering)
  - ui/history.js (history section)
  - ui/statusPanel.js (status panel)
  - ui/webhooks.js (webhook management)
  - ui/filters.js (download client filter)
  - ui/theme.js (theme switching)
  - ui/tabs.js (tab navigation)
  - utils/format.js (formatting utilities)
  - utils/storage.js (localStorage helpers)
  - main.js (DOMContentLoaded bootstrap)
- Update vite.config.js for vanilla build outputting to ../public/app.js
- Build succeeds: 14 modules, 43.88 kB output
2026-05-20 23:30:24 +01:00
gronod a38fc4a8ce refactor: extract status route and WebhookStatus service, slim dashboard.js
Build and Push Docker Image / build (push) Successful in 42s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 56s
CI / Security audit (push) Successful in 1m14s
CI / Tests & coverage (push) Successful in 1m32s
- Extract /status route to server/routes/status.js
- Create server/services/WebhookStatus.js with checkWebhookConfigured and aggregateMetrics
- Slim dashboard.js to pure HTTP orchestration (559→283 lines, 49.4% reduction)
- Remove /user-summary and /webhook-metrics routes from dashboard.js
- Mount status router at /api/status in server/index.js and server/app.js
- Update tests to use new /api/status/status endpoint
- Fix test expectation for speed field (number vs string)

All 571 tests passing.
2026-05-20 22:50:40 +01:00
gronod 2bf4cb2a0f Refactor: Deduplicate download assembly logic into DownloadBuilder service
Build and Push Docker Image / build (push) Successful in 42s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 54s
CI / Security audit (push) Successful in 1m6s
CI / Tests & coverage (push) Failing after 1m15s
- Created server/services/DownloadBuilder.js with buildUserDownloads function
- Added private helpers: buildSeriesMapFromRecords, buildMoviesMapFromRecords, matchSabSlots, matchSabHistory, matchTorrents, getSlotStatusAndSpeed
- Updated server/routes/dashboard.js to use buildUserDownloads in /user-downloads and SSE /stream
- Removed ~500 lines of duplicated download-assembly logic
- All unit tests passing (DownloadBuilder: 14, DownloadAssembler: 73, TagMatcher: 26)
2026-05-20 22:43:03 +01:00
gronod d74b46d5b0 Add guard test for DownloadBuilder service
Build and Push Docker Image / build (push) Successful in 40s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 53s
CI / Tests & coverage (push) Failing after 1m18s
CI / Security audit (push) Successful in 1m27s
2026-05-20 22:34:24 +01:00
gronod 9cffb96f29 Extract DownloadAssembler service from dashboard routes
Build and Push Docker Image / build (push) Successful in 45s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m9s
CI / Security audit (push) Successful in 1m24s
CI / Tests & coverage (push) Failing after 1m37s
- Create server/services/DownloadAssembler.js with 7 pure functions:
  - getCoverArt, getImportIssues, getSonarrLink, getRadarrLink
  - canBlocklist, extractEpisode, gatherEpisodes
- Update server/routes/dashboard.js to use DownloadAssembler
- Add comprehensive unit tests (73 tests covering edge cases)
- Fix null check in extractEpisode function
- All tests passing: DownloadAssembler (73/73), TagMatcher (26/26)
2026-05-20 22:32:09 +01:00
gronod 4d61dd566f Refactor: Extract tag functions to TagMatcher service
Build and Push Docker Image / build (push) Successful in 21s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 49s
CI / Security audit (push) Successful in 1m5s
CI / Tests & coverage (push) Failing after 1m15s
- Extract six pure tag-related functions from dashboard.js into new server/services/TagMatcher.js
- Functions: sanitizeTagLabel, tagMatchesUser, extractAllTags, extractUserTag, getEmbyUsers, buildTagBadges
- Update dashboard.js to import TagMatcher and replace all inline function calls
- Add comprehensive unit tests in tests/unit/services/TagMatcher.test.js (26 tests passing for 5 pure functions)
- Note: getEmbyUsers tests excluded due to CommonJS mocking complexity
2026-05-20 22:21:01 +01:00
gronod d568800942 fix: limit history pagination to prevent 40s response times
Licence Check / Licence compatibility and copyright header verification (push) Successful in 51s
Build and Push Docker Image / build (push) Successful in 1m27s
CI / Security audit (push) Successful in 1m27s
CI / Tests & coverage (push) Successful in 1m43s
The full pagination fix (ddad80a, e772001) caused history retrieval to
fetch up to 50 pages sequentially, taking 10-40 seconds instead of ~200ms.

Changes:
- Add maxPages parameter to getHistory() with default of 1 page
- Update poller to fetch 50 records (up from 10) in a single API call
- historyFetcher retains 100 records per page for UI display

This provides 5x more history for matching than before while keeping
the fast single-request performance.

Refs: develop-merge pagination performance issue
2026-05-20 21:44:53 +01:00
gronod 7d3e6e6a47 test: add integration and unit tests for dashboard, emby, sonarr, radarr, sabnzbd routes
Build and Push Docker Image / build (push) Successful in 39s
Docs Check / Markdown lint (push) Successful in 45s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m12s
CI / Security audit (push) Successful in 1m30s
CI / Tests & coverage (push) Failing after 1m39s
Docs Check / Mermaid diagram parse check (push) Successful in 1m59s
- tests/unit/dashboard.test.js: 58 unit tests covering all 12 pure helper
  functions in dashboard.js (sanitizeTagLabel, tagMatchesUser, getCoverArt,
  extractAllTags, extractUserTag, getImportIssues, getSonarrLink, getRadarrLink,
  canBlocklist, extractEpisode, gatherEpisodes, buildTagBadges)

- tests/integration/dashboard.test.js: 35 integration tests for
  /user-downloads (SAB+Sonarr, SAB+Radarr, qBit, showAll, paused queue,
  history matching, importIssues, wrong-user filtering), /status (admin guard,
  webhook check, failure handling), /webhook-metrics, /cover-art (all
  validation/proxy paths), /blocklist-search (guards, Sonarr, Radarr, failure)

- tests/integration/emby.test.js: 13 integration tests covering all 4 Emby
  routes (sessions, users, users/:id, session/:id/user) with auth guard,
  happy path, and upstream failure cases

- tests/integration/arrRoutes.test.js: 64 integration tests for Sonarr +
  Radarr (queue, history, series/movies, notifications CRUD, /test, /schema,
  /sofarr-webhook create+update+missing-config+failure) and SABnzbd (queue,
  history with custom params)

- vitest.config.js: raise global coverage thresholds (statements/functions/
  lines 20->55, branches 8->40) to reflect improved coverage
  (62.5% stmts, 42.6% branches, 64.1% funcs, 65.6% lines)

- tests/README.md: document new test files and update coverage table
2026-05-20 21:37:57 +01:00
Gandalf ee2f275501 Merge pull request 'fix: use stable *arr IDs for matching before fragile title fallback' (#21) from fix-arr-matching into develop-merge
Build and Push Docker Image / build (push) Successful in 40s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m2s
CI / Security audit (push) Successful in 1m19s
CI / Tests & coverage (push) Successful in 1m31s
Reviewed-on: #21
2026-05-20 21:02:10 +01:00
Gandalf ca6ff66115 Merge pull request 'fix: webhook replay cache atomicity and instanceName precision' (#22) from fix-webhook-receiver into develop-merge
Build and Push Docker Image / build (push) Has been cancelled
CI / Tests & coverage (push) Has been cancelled
CI / Security audit (push) Has been cancelled
Licence Check / Licence compatibility and copyright header verification (push) Has been cancelled
Reviewed-on: #22
2026-05-20 21:01:52 +01:00
Gandalf 080431c4b7 Merge pull request 'fix: QBittorrent fallback state corruption after full sync' (#23) from fix-qbittorrent-client into develop-merge
Build and Push Docker Image / build (push) Has been cancelled
CI / Security audit (push) Has been cancelled
CI / Tests & coverage (push) Has been cancelled
Licence Check / Licence compatibility and copyright header verification (push) Has been cancelled
Reviewed-on: #23
2026-05-20 21:01:36 +01:00
Gandalf f457a708d2 Merge pull request 'fix: SABnzbd speed assignment and size/progress parsing' (#24) from fix-sabnzbd-client into develop-merge
Build and Push Docker Image / build (push) Has been cancelled
CI / Security audit (push) Has been cancelled
CI / Tests & coverage (push) Has been cancelled
Licence Check / Licence compatibility and copyright header verification (push) Has been cancelled
Reviewed-on: #24
2026-05-20 21:01:21 +01:00
Gandalf 914ab73d4e Merge pull request 'fix: full pagination + non-silent errors in PollingRadarrRetriever' (#25) from fix-radarr-retriever into develop-merge
Build and Push Docker Image / build (push) Has been cancelled
CI / Security audit (push) Has been cancelled
CI / Tests & coverage (push) Has been cancelled
Licence Check / Licence compatibility and copyright header verification (push) Has been cancelled
Reviewed-on: #25
2026-05-20 21:01:07 +01:00
Gandalf 25d8e007a4 Merge pull request 'fix: full pagination + non-silent errors in PollingSonarrRetriever' (#26) from fix-sonarr-retriever into develop-merge
Build and Push Docker Image / build (push) Has been cancelled
CI / Security audit (push) Has been cancelled
Licence Check / Licence compatibility and copyright header verification (push) Has been cancelled
CI / Tests & coverage (push) Has been cancelled
Reviewed-on: #26
2026-05-20 21:00:53 +01:00
gronod bb7b66e06d fix: use stable *arr IDs for matching before fragile title fallback
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m11s
CI / Tests & coverage (push) Failing after 1m8s
CI / Security audit (push) Successful in 1m11s
Licence Check / Licence compatibility and copyright header verification (pull_request) Successful in 52s
CI / Security audit (pull_request) Successful in 1m18s
CI / Tests & coverage (pull_request) Failing after 1m26s
2026-05-20 20:51:50 +01:00
gronod 5ad525a760 fix: webhook replay cache atomicity and instanceName precision
Licence Check / Licence compatibility and copyright header verification (push) Successful in 58s
CI / Security audit (push) Successful in 1m25s
CI / Tests & coverage (push) Failing after 1m30s
Licence Check / Licence compatibility and copyright header verification (pull_request) Successful in 57s
CI / Security audit (pull_request) Successful in 1m21s
CI / Tests & coverage (pull_request) Failing after 1m36s
2026-05-20 20:46:35 +01:00
gronod 1e162381f4 fix: QBittorrent fallback state corruption after full sync
Licence Check / Licence compatibility and copyright header verification (push) Successful in 54s
CI / Security audit (push) Successful in 1m37s
CI / Tests & coverage (push) Failing after 1m46s
Licence Check / Licence compatibility and copyright header verification (pull_request) Successful in 1m1s
CI / Security audit (pull_request) Successful in 1m29s
CI / Tests & coverage (pull_request) Failing after 1m32s
2026-05-20 20:45:26 +01:00
gronod 42f0481a9a fix: SABnzbd speed assignment and size/progress parsing
Licence Check / Licence compatibility and copyright header verification (push) Successful in 59s
CI / Security audit (push) Successful in 1m15s
CI / Tests & coverage (push) Successful in 1m45s
CI / Security audit (pull_request) Successful in 1m20s
Licence Check / Licence compatibility and copyright header verification (pull_request) Successful in 1m7s
CI / Tests & coverage (pull_request) Successful in 1m42s
2026-05-20 20:44:08 +01:00
gronod ddad80a666 fix: full pagination + non-silent errors in PollingRadarrRetriever
Licence Check / Licence compatibility and copyright header verification (push) Successful in 51s
CI / Tests & coverage (push) Failing after 1m8s
CI / Security audit (push) Successful in 1m15s
CI / Tests & coverage (pull_request) Failing after 4s
Licence Check / Licence compatibility and copyright header verification (pull_request) Successful in 1m6s
CI / Security audit (pull_request) Successful in 1m35s
2026-05-20 20:42:18 +01:00
gronod e772001c3f fix: full pagination + non-silent errors in PollingSonarrRetriever
Licence Check / Licence compatibility and copyright header verification (push) Successful in 43s
CI / Security audit (push) Successful in 59s
CI / Tests & coverage (push) Failing after 1m11s
Licence Check / Licence compatibility and copyright header verification (pull_request) Failing after 4s
CI / Tests & coverage (pull_request) Failing after 1m33s
CI / Security audit (pull_request) Successful in 1m39s
2026-05-20 20:40:48 +01:00
gronod 1f10414498 Update CHANGELOG for v1.5.5
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m8s
Create Release / release (push) Successful in 41s
Build and Push Docker Image / build (push) Successful in 21s
Docs Check / Markdown lint (push) Successful in 32s
CI / Security audit (push) Successful in 1m13s
CI / Tests & coverage (push) Failing after 1m24s
Docs Check / Mermaid diagram parse check (push) Successful in 1m49s
v1.5.5
2026-05-20 01:13:01 +01:00
gronod 1e3926b206 Bump version to 1.5.5
Build and Push Docker Image / build (push) Successful in 40s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 47s
CI / Security audit (push) Successful in 1m17s
CI / Tests & coverage (push) Failing after 1m10s
2026-05-20 01:11:22 +01:00
gronod 5fde69fcf5 Add speed formatting to display appropriate units (KB/s, MB/s)
Build and Push Docker Image / build (push) Successful in 37s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 31s
CI / Security audit (push) Successful in 54s
CI / Tests & coverage (push) Failing after 1m5s
2026-05-20 01:07:52 +01:00
gronod a562cfe9aa Add logging to debug active download identification and speed
Build and Push Docker Image / build (push) Successful in 29s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 58s
CI / Security audit (push) Successful in 1m11s
CI / Tests & coverage (push) Failing after 1m18s
2026-05-20 01:00:25 +01:00
gronod 8549746721 Apply overall SABnzbd speed to active download only
Build and Push Docker Image / build (push) Successful in 34s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 39s
CI / Security audit (push) Successful in 1m12s
CI / Tests & coverage (push) Failing after 1m13s
2026-05-20 00:58:38 +01:00
gronod 63fc370262 Remove speed from SABnzbd downloads - API doesn't provide per-download speed
Build and Push Docker Image / build (push) Successful in 41s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 45s
CI / Security audit (push) Successful in 58s
CI / Tests & coverage (push) Failing after 1m8s
2026-05-20 00:56:54 +01:00
gronod 6362441dd5 Add logging to debug SABnzbd speed field in slot data
Build and Push Docker Image / build (push) Successful in 42s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 52s
CI / Security audit (push) Successful in 1m9s
CI / Tests & coverage (push) Successful in 1m22s
2026-05-20 00:54:26 +01:00
gronod 76f9e87b44 Add logging to investigate SABnzbd slot structure for speed field
Build and Push Docker Image / build (push) Successful in 35s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 45s
CI / Security audit (push) Successful in 1m15s
CI / Tests & coverage (push) Successful in 1m27s
2026-05-20 00:51:12 +01:00
gronod 8c461de72a Hide speed when it is 0 to avoid displaying misleading 0 speed
Build and Push Docker Image / build (push) Successful in 38s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 44s
CI / Security audit (push) Successful in 1m7s
CI / Tests & coverage (push) Has been cancelled
2026-05-20 00:49:26 +01:00
gronod d11f11be69 Fix missing speed on SAB cards and remove incorrect missing pieces display
Build and Push Docker Image / build (push) Successful in 16s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 29s
CI / Security audit (push) Successful in 59s
CI / Tests & coverage (push) Successful in 59s
2026-05-20 00:47:07 +01:00
gronod 05d11975e6 Reduce card logo size to 32x32
Build and Push Docker Image / build (push) Successful in 41s
CI / Security audit (push) Successful in 57s
CI / Tests & coverage (push) Successful in 1m8s
2026-05-20 00:41:04 +01:00
gronod cd3480c0ce Fix logo positioning by adding position: relative to download-card
Build and Push Docker Image / build (push) Successful in 41s
CI / Security audit (push) Successful in 1m3s
CI / Tests & coverage (push) Successful in 1m11s
2026-05-20 00:39:11 +01:00
gronod 712c98d817 Move card logo to bottom right with absolute positioning, fix duplication
Build and Push Docker Image / build (push) Successful in 23s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 41s
CI / Security audit (push) Successful in 1m14s
CI / Tests & coverage (push) Successful in 1m18s
2026-05-20 00:37:01 +01:00
gronod ff7ace9f4f Fix duplicate icon and user tag on page reload by adding class and duplicate check
Build and Push Docker Image / build (push) Successful in 41s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 50s
CI / Security audit (push) Successful in 1m28s
CI / Tests & coverage (push) Successful in 1m44s
2026-05-20 00:29:44 +01:00
gronod 73500751a0 Increase download client logo size in cards to 64x64px (4x), keep filter picker at 20x20px
Build and Push Docker Image / build (push) Successful in 48s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 48s
CI / Security audit (push) Successful in 1m10s
CI / Tests & coverage (push) Successful in 1m15s
2026-05-20 00:26:54 +01:00
gronod 82a9df134b Fix duplicate user tag and logo in download cards by removing old elements before updating
Build and Push Docker Image / build (push) Successful in 32s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 30s
CI / Security audit (push) Successful in 50s
CI / Tests & coverage (push) Successful in 1m9s
2026-05-20 00:23:17 +01:00
gronod 67fa79796b Add download client logo to download card with right-side positioning
Build and Push Docker Image / build (push) Successful in 20s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 36s
CI / Security audit (push) Successful in 1m4s
CI / Tests & coverage (push) Successful in 1m10s
2026-05-20 00:20:03 +01:00
gronod f06d945358 Update rtorrent.svg logo
Build and Push Docker Image / build (push) Successful in 48s
CI / Security audit (push) Successful in 1m18s
CI / Tests & coverage (push) Successful in 1m37s
2026-05-20 00:15:46 +01:00
gronod f5883d4929 Add download client logos to filter UI with fallback handling
Build and Push Docker Image / build (push) Successful in 30s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m4s
CI / Security audit (push) Has been cancelled
CI / Tests & coverage (push) Has been cancelled
2026-05-20 00:14:20 +01:00
gronod 80cf3eaa39 Fix filtering to use both client type and instanceId for unique identification
Build and Push Docker Image / build (push) Successful in 59s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m2s
CI / Security audit (push) Successful in 1m29s
CI / Tests & coverage (push) Successful in 1m32s
2026-05-20 00:00:17 +01:00
gronod 1ab7e52167 Use index-based unique identifiers for download client selection to prevent cross-selection
Build and Push Docker Image / build (push) Successful in 28s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 58s
CI / Security audit (push) Successful in 1m19s
CI / Tests & coverage (push) Successful in 1m32s
2026-05-19 23:56:05 +01:00
gronod 544c168b82 Fix duplicate checkbox ID issue causing cross-selection between clients
Build and Push Docker Image / build (push) Successful in 26s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 48s
CI / Security audit (push) Successful in 1m21s
CI / Tests & coverage (push) Successful in 1m26s
2026-05-19 23:51:57 +01:00
gronod 747a14ebd3 Fix double-toggling issue in download client filter
Build and Push Docker Image / build (push) Successful in 1m15s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m0s
CI / Security audit (push) Successful in 1m26s
CI / Tests & coverage (push) Successful in 1m38s
2026-05-19 23:48:29 +01:00
gronod 49d66c07ee Update ARCHITECTURE.md, bump version to 1.5.4, add CHANGELOG entry
CI / Security audit (push) Failing after 23s
Build and Push Docker Image / build (push) Successful in 52s
Docs Check / Markdown lint (push) Successful in 58s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m17s
CI / Tests & coverage (push) Successful in 1m36s
Docs Check / Mermaid diagram parse check (push) Successful in 1m45s
2026-05-19 23:45:37 +01:00
gronod be791ed044 Add multi-select download client filter with client type display
Build and Push Docker Image / build (push) Successful in 24s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 45s
CI / Security audit (push) Successful in 1m23s
CI / Tests & coverage (push) Successful in 1m35s
2026-05-19 23:41:43 +01:00
gronod 7195a09562 Fix SABnzbd size and speed fields in SSE response
Build and Push Docker Image / build (push) Successful in 37s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 52s
CI / Security audit (push) Successful in 1m30s
CI / Tests & coverage (push) Successful in 1m49s
2026-05-19 23:34:24 +01:00
gronod 720de6688b Add download client ordering and filtering to active downloads list
Build and Push Docker Image / build (push) Successful in 22s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m5s
CI / Security audit (push) Successful in 1m26s
CI / Tests & coverage (push) Successful in 1m44s
2026-05-19 23:29:38 +01:00