fix: premiere/finale tags for coalesced episodes - #3069
Open
seferturan wants to merge 3 commits into
Open
Conversation
seferturan
marked this pull request as draft
August 3, 2026 09:57
auto-merge was automatically disabled
August 3, 2026 09:57
Pull request was converted to draft
|
|
Overall Grade |
Security Reliability Complexity Hygiene Coverage |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Aug 25, 2026 2:35p.m. | Review ↗ | |
| Code coverage | Aug 25, 2026 2:35p.m. | Review ↗ |
Code Coverage Summary
| Language | Line Coverage (Overall) |
|---|---|
| Aggregate | 69.9% |
| Javascript | 69.9% |
➟ Additional coverage metrics may have been reported. See full coverage report ↗
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
seferturan
force-pushed
the
feat/new_season_tag
branch
from
August 25, 2026 14:06
39550d8 to
2d046d5
Compare
seferturan
marked this pull request as ready for review
August 25, 2026 14:15
Days holding more than one episode are coalesced into a single entry typed full_season or multiple_episodes. That synthetic type never matched the premiere or finale enums, so a season premiere airing alongside episode 2 fell through to the "new" tag, or showed nothing at all when future dated. Resolve the coalesced type to its children and reuse the existing premiere tag, preferring premiere over finale when a day carries both. Also shows the status tag on upcoming rows, and drops a duplicate EpisodeStatusTag that rendered twice on the same row.
Newness and milestone are orthogonal, so an episode can be both. Rendering them as two tags does not fit: on a 320px viewport the second tag clipped against the poster edge, and the calendar overlay also carries a timestamp. So the status stays a single value and gains two combined variants, labelled "New Premiere" and "New Finale" via their own message keys. Dedicated keys rather than concatenating two translated words, since word order and casing are not ours to assume across locales. Also stops the mid-season staleness gate from swallowing the new tag. That gate only ever meant to hide a stale mid-season milestone, but it returned early before newness was considered.
The "exactly 7 days ago" case raced the clock. It built the release date from one Date.now() and isEpisodeNew compared it against a second one, so elapsed came out as 7 days plus however long the call took. The window check is inclusive of exactly 7 days, so any millisecond crossing between the two reads pushed it over and the tag came back undefined. Passes locally either way, which is why it only surfaced on a loaded runner. Freezing the clock for the block makes both reads agree.
seferturan
force-pushed
the
feat/new_season_tag
branch
from
August 25, 2026 14:33
2d046d5 to
72403d3
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.
Drafted to deal with the 'premier' clash🎶 Notes 🎶
Adds aNew Seasontag to calendar and releases lists, and their drilled-down pagespremieretag was never shown for coalesced episodes, e.g. when ep 1 and 2 would released on the same day for a new season.Newvariants to the premier/finale tags.newandpremieretags since on smaller devices it won't fit.👀 Example 👀
Example with mock data: