Skip to content

feat(watchlist): stop a title being marked watched before it is out - #79

Merged
Isma-L154 merged 1 commit into
mainfrom
feat/lock-watched-until-release
Sep 6, 2026
Merged

Isma-L154 merged 1 commit into
mainfrom
feat/lock-watched-until-release

Conversation

@Isma-L154

@Isma-L154 Isma-L154 commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

What

A saved title that has not been released no longer offers Watched. Where the button was, the card says when it lands.

Released ✓ Watched
Out Sep 9 🕐 Out Sep 9 (amber, not a control)
Premieres Nov 5 🕐 Premieres Nov 5
No date at all ✓ Watched — still offered, see below
Already watched ↻ Unwatch — never taken away

Why not a disabled button

A greyed control still reads as an action you are failing to perform, and it invites the tap that does nothing. A date answers the question the button was standing in front of. The remove button stays beside it: changing your mind about waiting for something is not the same as claiming to have seen it.

This is not a new kind of restriction — the app already refuses to tick a show past its aired seasons. It is the same rule for the other half of the library.

Only a confirmed future date refuses

A title TMDB holds no date for is still tickable. That state means two opposite things: a production announced years out, and an obscure catalogue title nobody has dated. Refusing on it would lock a film somebody watched decades ago on the strength of a missing field. Not knowing when something came out is not knowing that it has not.

Un-watching is never blocked, so a row saved before this rule — or one whose date has since moved outwards — is never stranded claiming something its owner cannot take back.

Enforced in the action as well as the card, since the card is a form and a form body can be written by hand.

The part that makes the block safe

A film's release date was snapshotted on save and never revised anywhere. Blocking on it would mean a studio moving a release forward left the card refusing forever, with removing and re-saving the title the only way out.

So the read path now re-asks about titles that have not come out, the way it already re-asks about seasons — only those rows, so it converges to nothing for the rest of a list. That also fixes two places the stale date was already wrong before this PR: the Upcoming grouping, and the calendar feed, which was publishing slipped premieres into people's calendars as appointments for a night with nothing on.

Found while driving it in a browser

  • In theaters In 3 days read like a typo. The line takes the date and leaves the countdown to the poster badge directly above it — one glance says how soon, the line underneath says what and when.
  • A far-off date carries its year, and Premieres Sep 30, 2028 needs 126px in a 109px tile. It wraps rather than truncating, because a cut year is the part worth reading; the slot was already 44px tall for the button it replaced, so the row of cards stays level. Pinned by a measuring test rather than left to the next person to rediscover.
  • Coming Soon called a film's release a premiere. Pre-existing, but it only became visible once the card above it started saying "Out" — the caption was contradicting its own card.

Verified

  • npm run check — 0 errors, 0 warnings; npm run lint clean
  • 480 unit tests pass, 8 files touched, 3 new suites: the rule and its wording, the action's refusal, and the date refresh against a real database (moved forward, slipped, withdrawn, unreachable, unchanged, and the batch cap)
  • New WatchlistCard.svelte.spec.ts measures real boxes in a browser: which control each state gets, and that the longest possible label renders in full inside the slot
  • 17 e2e pass
  • Driven by hand against a seeded database covering released / imminent / far-future / undated / unpremiered / already-watched. A seeded title whose date was 400 days out self-corrected to 2024 on load and unlocked its own card, which is the refresh working end to end against the live API. A forged POST on an unreleased title came back 400 “Dune Part Three” isn't out yet. with the row untouched; un-watching a future-dated row still succeeded.

"Watched" sat on a film that opens next spring, which is either a mistake
waiting to happen or a note the list has no way to interpret. The app
already refuses to tick a show past its aired seasons; this is the same
rule for the other half of the library.
Where the button was, the card now says when the title lands — "Out
Sep 9", "Premieres Nov 5". Not a disabled button: a greyed control still
reads as an action you are failing to perform and invites the tap that
does nothing, while a date answers the question the button was standing
in front of. The remove button stays, because changing your mind about
waiting for something is not the same as claiming to have seen it.
Only a confirmed future date refuses. A title TMDB holds no date for is
still tickable, because that state means two opposite things — a
production announced years out, and an obscure catalogue title nobody has
dated — and refusing on it would lock a film somebody watched decades ago
on the strength of a missing field. Un-watching is never blocked either,
so no row is left claiming something its owner cannot take back.
The block is only as good as the date behind it, and a film's date was
snapshotted on save and never revised: a studio moving a release forward
would have left the card refusing forever, with removing and re-saving
the only way out. So the read path now re-asks about titles that have not
come out, the way it already re-asks about seasons. That also fixes two
places the stale date was already wrong — the Upcoming grouping, and the
calendar feed, which was publishing slipped premieres into people's
calendars as appointments for a night with nothing on.
Two things found while driving it in a browser: "In theaters In 3 days"
read like a typo, so the line takes the date and leaves the countdown to
the poster badge above it; and a far-off date carries its year, which
does not fit a tile on a five-column grid, so the line wraps rather than
truncating the year off the end of it. Both are pinned by a measuring
test. Coming Soon also called a film's release a premiere, which only
became visible once the card above it started saying "Out".
@Isma-L154
Isma-L154 force-pushed the feat/lock-watched-until-release branch from 1c5728e to df7503e Compare September 6, 2026 09:10
@Isma-L154
Isma-L154 merged commit 3fa5fbf into main Sep 6, 2026
3 checks passed
@Isma-L154
Isma-L154 deleted the feat/lock-watched-until-release branch September 6, 2026 09:12
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