Skip to content

fix: premiere/finale tags for coalesced episodes - #3069

Open
seferturan wants to merge 3 commits into
mainfrom
feat/new_season_tag
Open

fix: premiere/finale tags for coalesced episodes#3069
seferturan wants to merge 3 commits into
mainfrom
feat/new_season_tag

Conversation

@seferturan

@seferturan seferturan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ Drafted ⚠️

Drafted to deal with the 'premier' clash

🎶 Notes 🎶

  • Adds a New Season tag to calendar and releases lists, and their drilled-down pages
  • The root issue was that premiere tag was never shown for coalesced episodes, e.g. when ep 1 and 2 would released on the same day for a new season.
  • Also adds New variants to the premier/finale tags.
    • Did not go for separate new and premiere tags since on smaller devices it won't fit.

👀 Example 👀

Example with mock data:

Screenshot 2026-08-25 at 15 28 41

@trakt-bot
trakt-bot Bot enabled auto-merge (rebase) August 3, 2026 09:57
@seferturan
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

@deepsource-io

deepsource-io Bot commented Aug 3, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 1f25dbf...72403d3 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

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
seferturan force-pushed the feat/new_season_tag branch from 39550d8 to 2d046d5 Compare August 25, 2026 14:06
@seferturan
seferturan marked this pull request as ready for review August 25, 2026 14:15
@trakt-bot
trakt-bot Bot enabled auto-merge (rebase) 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
seferturan force-pushed the feat/new_season_tag branch from 2d046d5 to 72403d3 Compare August 25, 2026 14:33
@seferturan seferturan changed the title feat: adds new season tag fix: premiere/finale tags for coalesced episodes Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant