docs: sync overlay processing API and add UI test-utils reference#2866
Merged
Conversation
maintainerr-automation Bot
added a commit
that referenced
this pull request
May 11, 2026
* docs: sync overlay processing API and add UI test-utils reference (#2866) Documents the force flag on overlay processing endpoints and the 409 gating on DELETE /overlays/reset (#2827), and points contributors at the new TanStack Query test helpers (#2863). * fix(rules): scope exclusion cascade by type, not entry point (#2858) (#2867) Excluding a single episode used to skip every other episode of the same show. The cascade filter keyed off `Exclusion.parent`, but `parent` is the entry point of the exclusion request (set to `data.mediaId`, which from the show overview is always the show id) — not the structural parent. A typed cascade set driven by `mediaServerId` of `type='show'`/`'season'` rows fixes the regression without breaking the legacy null-type fallback. * fix(collections): sort by addDate and group episodes by show (#2868) * fix(collections): sort by addDate and group episodes by show Maintainerr is now the source of truth for collection ordering: both the Plex push and the UI fetch use the same comparator, so what users see in the collection page matches what the media server displays. - deleteSoonest now reads collection_media.addDate (drives the visible "Leaving in X days" overlay) instead of MediaItem.addedAt (the unrelated media-server library date) - Same-day items tie via UTC day bucketing so the title tiebreaker actually fires within a "Leaving Today" group - Title sort groups episodes/seasons under their show via grandparentTitle/parentTitle; movies are unaffected * refactor(sort): pin missing values to end + DRY numeric branches - Items missing the sort value (no air date, no rating, no view count, no add date) now sort to the end regardless of asc/desc. Previously they coerced to 0 and silently sorted to the front in ascending order — an item with no air date appeared before one from 1995. - airDate, rating, watchCount, and deleteSoonest collapse onto one helper (compareNumericWithTitleFallback), removing three near-identical case bodies in compareMediaItemsBySort. - airDate now day-buckets like deleteSoonest, so same-day items always reach the title tiebreaker instead of comparing by clock time. - Pin tsBuildInfoFile in apps/server/tsconfig.build.json so nest-cli's type-check pass stops emitting a stray tsconfig.build.tsbuildinfo at the package root. * refactor(sort): align deleteSoonest buckets with visible daysLeft - Bucket deleteSoonest by `ceil((addDate - referenceTime) / dayMs)` so items showing the same "Leaving in X days" countdown tie even when their addDates straddle UTC midnight. Falls back to UTC-day bucketing when no reference time is supplied. - Wire `referenceTime = now - deleteAfterDays * dayMs` through the two collection sort paths (applyCollectionSort + paginated fetch). - Replace the show-aware title test data — old data alphabetized identically under either comparator and didn't actually prove the grouping behavior. New data interleaves episode titles across shows and asserts on [show, episode] pairs. - Drop dead `baseUrl` + `paths` from apps/ui/tsconfig.json (unused alias) to clear the TS 6 deprecation surfaced in the IDE. * perf(collections): restore SQL fast path for deleteSoonest paging Page-loading a collection with `deleteSoonest` was hydrating every row in the collection before slicing — minutes-long blocking page loads on collections of a few hundred items, especially on Jellyfin where `getMetadata` isn't cached at the adapter layer. `deleteSoonest` orders by `addDate + deleteAfterDays`, but `deleteAfterDays` is constant per collection, so the only sort key that matters lives on `collection_media.addDate`. SQL can paginate it directly without touching MediaItem metadata. `applyCollectionSort` (the media-server push) still applies the day-bucketed title tiebreaker via the comparator, so the polished alphabetical-within-day order is what users see when browsing the actual Plex/Jellyfin collection. The Maintainerr UI page may show same-day items in a slightly different order — acceptable because the primary sort key is correct and Maintainerr's DB remains the source of truth driving the next push. Other explicit sorts (airDate / rating / watchCount / title) still go through hydrate-then-paginate because their sort keys live on MediaItem, not on collection_media. --------- Co-authored-by: enoch85 <mailto@danielhansson.nu>
Contributor
|
🎉 This PR is included in version 3.11.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
forceflag onPOST /overlays/processandPOST /overlays/process/:collectionId(from feat(overlays): add force processing and reset concurrency gating #2827)DELETE /overlays/resetwhile a processor run is in progressSkippedcount in the run result and the move ofOverlayProcessRequest/OverlayProcessorRunResultinto@maintainerr/contractsapps/ui/src/test-utils/to the AGENTS.md UI structure map and points contributors at the TanStack Query result builders (from Add typed TanStack Query test helpers and migrate spec mocks #2863)