Repository navigation
Improve History filtering, sorting, and live updates - #12287
Open
XxUnkn0wnxX wants to merge 14 commits into
Open
XxUnkn0wnxX wants to merge 14 commits into
XxUnkn0wnxX wants to merge 14 commits into
Conversation
Match Episode searches against release text, canonical show names, known aliases, and registry-backed series slugs while keeping each History column isolated and stackable. Normalize text boundaries, validate Size comparisons consistently in the browser and API, preserve filter-aware pagination, add focused regression coverage, and rebuild the development runtime bundles.
Reload the active Detailed query for live History events, reject stale responses, clamp out-of-range pages, and carry only compatible search, sort, page, and per-page state between Detailed and Compact layouts. Restore newest-first Date sorting after clear, remove the obsolete filter-cookie write, canonicalize malformed text on established transitions, expand component and store coverage, and rebuild the development runtime bundles.
Empty matching wrappers used to disappear as soon as the second quote was entered. For example, typing "" immediately rewrote the visible field to blank, so a user could not place the cursor between the pair and continue. Keep '', "", and `` visible while they are still being edited while retaining an empty effective filter. For example, "" can now become "caramelise" without the field rewriting itself first. Canonicalize a still-empty pair only when another History filter, sort, or layout change is committed. Completed wrappers and existing malformed or internal punctuation behavior remain unchanged. Cover Episode and Provider editing plus every filter, sort, and layout reset path for all three wrapper forms.
Before this change, the Detailed History Size field accepted only whole, unitless MB comparisons. Accept unitless MB and case-insensitive MB or GB values with optional spacing and one or two decimal places. Examples include <300, >1.3gb, <900.45 MB, and >2.4GB. Matching outer quote or backtick wrappers remain optional and are stripped before validation. Use exact Decimal byte thresholds, strict comparison rounding, and one shared safe input cap of 8589934591.99 for every unit. Keep valid flexible input visible, defer malformed cleanup until another filter, sort, or layout action, and show both MB and GB forms in the placeholder. Cover parser boundaries, filtering, numeric sorting, frontend normalization, trigger cleanup, layout transitions, and the rebuilt dark and light development bundles.
Before this change, clearing the Client Status field and selecting Snatched both reduced to zero, so the backend skipped an explicit Snatched filter. Nonzero selections used exact equality and therefore missed rows with additional status flags, while stored zero values rendered without a label. Treat an empty selection as no filter, match Snatched as exact zero, and use contains-all bitmask matching for nonzero selections while allowing extra stored flags. Keep Snatched mutually exclusive with nonzero choices, restore active selections when Detailed History is recreated, and serialize zero as Snatched. Add backend coverage for every supported flag, composed masks, invalid values, filter stacking, and serialization. Add frontend coverage for clear/zero behavior, all selections, mutual exclusion, remount restoration, sort preservation, and existing filter composition.
Validate History sort shapes and directions, restore Provider sorting, include season-zero groups, and sort Compact Time and Subtitled aggregates before pagination. Extend the title-filter API suite with focused grouping and malformed-request coverage.
Use the Compact column labels for visibility cookies, reject malformed layout-specific sort cookies, and render child history rows newest-first without mutating the source data.
Serialize the zero-valued Snatched client status as [0]/['Snatched'] while preserving None and composed client-status masks.
Aggregated Compact rows refetch the exact active query without inserting raw websocket data; stale responses/loading and out-of-range pages remain guarded/clamped.
Regenerates dark/light development runtimes from the rebased corrections source.
Human-time expectations used a UTC value captured during test collection. On slower Windows jobs, the expanded suite can take longer than the 60-second tolerance before this parametrization runs, causing otherwise correct parser results to fail. Compare human-time results with a fresh UTC reference captured at execution time. This changes test timing only and does not alter Generic Provider behavior.
3 tasks done
XxUnkn0wnxX
force-pushed
the
feature/history-title-filtering-corrections
branch
from
September 10, 2026 20:09
2204e1b to
cd79e82
Compare
XxUnkn0wnxX
force-pushed
the
feature/history-title-filtering-corrections
branch
2 times, most recently
from
October 2, 2026 20:09
45e1a83 to
93cffff
Compare
XxUnkn0wnxX
force-pushed
the
feature/history-title-filtering-corrections
branch
from
October 8, 2026 06:04
93cffff to
b416bef
Compare
Preserve the History feature changes while aligning with the 1.0.27 release. The separate import-spacing fix is replayed after this replacement merge. Validation: 451 focused backend tests, 187 frontend tests and one snapshot; environment, lint, generated-asset and isolated runtime checks. Fork staging PR #19 passed all 26 Actions jobs and both Codecov checks.
XxUnkn0wnxX
force-pushed
the
feature/history-title-filtering-corrections
branch
from
October 19, 2026 02:06
b416bef to
c485b59
Compare
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.
Closes #12266
🎯 Why
History displays Medusa's show title, but the Episode filter previously searched only the stored release/resource text. A user could copy the title shown in the table and still get no result when the downloaded release used a Romaji, scene, or alternate title.
Testing that filtering path also exposed correctness gaps in the same History API, store, and layout flow. Detailed Provider sorting could fall back to natural database order, Compact sorting operated on raw rows instead of completed groups, malformed saved sorts could prevent the page from mounting, and live Compact events could not safely be inserted into aggregated rows.
This change keeps those related History behaviors together so title matching, filters, sorting, pagination, saved preferences, and live refreshes share one consistent request contract.
🛠️ What changed
🔎 Title and column filtering
<or>comparisons with unitless MB or explicit, case-insensitive MB/GB units and up to two decimal places. Invalid input does not replace the active filter.🔄 Sorting, grouping, and live updates
providerIdmapping used by Detailed Provider sorting.[0]/['Snatched']in live History events while preservingNoneand composed masks.🧪 Expected filter behavior
Unquoted outer spaces are treated as accidental. Complete matching wrappers (
'...',"...", or backticks) retain spaces inside the pair. Internal apostrophes and punctuation remain ordinary title text.For Size,
<300and>400continue to mean MB, while values such as>1.3gb,<900.45 MB, and>2.4GBuse the requested unit. Incomplete or malformed text leaves the currently applied comparison unchanged until corrected or cleared.Clearing Client Status applies no status predicate. Snatched matches the exact stored zero state, while one or more nonzero selections require those bits and still allow additional stored states.
✅ Validation
develop: passed with zero conflicts.git diff --check: passed.Live data did not contain an exact zero-status Snatched row or a visible season-zero Compact group during the final browser pass. Both paths are covered by the in-memory API and websocket regression suites without manufacturing database rows.
📦 Scope
🔗 Related issue