Skip to content

feat(requestmodal): warning for not yet released media - #1739

Open
rienafairefr wants to merge 1 commit into
seerr-team:developfrom
rienafairefr:warn-request-releases
Open

feat(requestmodal): warning for not yet released media#1739
rienafairefr wants to merge 1 commit into
seerr-team:developfrom
rienafairefr:warn-request-releases

Conversation

@rienafairefr

@rienafairefr rienafairefr commented Jun 24, 2025

Copy link
Copy Markdown

Description

In order to help users decide if or when to request a movie that is not yet released outside of theaters

This shows a warning in the Movie Request Modal that is shown when a movie has no Digital or Physical release, or when the planned Digital or Physical release is in the future.

apologies js code is probably not great (not my main language)

  • copilot AI reviewed that code and made suggestions that I incorporated (in reviews below)

Screenshot (if UI-related)

id: 1136867
image
id: 1071585
image

How Has This Been Tested?

pnpm run dev targeting my seerr server instance
Using TV shows and movies that fit the warning (not yet released)

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Issues Fixed or Closed

Summary by CodeRabbit

  • New Features

    • Added a "Warn about Non-released" setting (disabled by default) to notify when requesting movies or TV seasons that lack release dates or have future releases.
  • UI

    • Warning alerts shown in movie and TV request modals when the setting is enabled.
  • Localization

    • Added new user-facing messages and helper tip copy for the setting and request warnings.
  • Documentation

    • New doc section describing the setting and its behavior.

Review Change Stack

Comment thread package.json
Comment thread CHANGELOG.md Outdated
@rienafairefr
rienafairefr force-pushed the warn-request-releases branch 3 times, most recently from 0ede7c8 to 883f8a2 Compare August 19, 2025 19:28
@rienafairefr
rienafairefr force-pushed the warn-request-releases branch from 883f8a2 to 2823e78 Compare October 27, 2025 17:15
@rienafairefr
rienafairefr requested a review from a team as a code owner October 27, 2025 17:15

@gauthier-th gauthier-th left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I think this should be available under a setting, disabled by default. Not everyone wants to have this warning displayed.
  • The same behavior should be implemented for series as well.

Comment thread src/i18n/locale/fr.json
Comment thread src/components/RequestModal/MovieRequestModal.tsx Outdated
@rienafairefr
rienafairefr force-pushed the warn-request-releases branch from 2f364c3 to 8323f75 Compare October 28, 2025 17:42
@github-actions github-actions Bot added the merge conflict Cannot merge due to merge conflicts label Oct 30, 2025
@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@M0NsTeRRR

Copy link
Copy Markdown
Member

Hello @rienafairefr could you rebase and update your PR with the review given by gauthier ?

@rienafairefr
rienafairefr force-pushed the warn-request-releases branch from 8323f75 to ec8d9fa Compare March 6, 2026 16:52
@github-actions github-actions Bot removed the merge conflict Cannot merge due to merge conflicts label Mar 6, 2026
@coderabbitai

coderabbitai Bot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new boolean setting warnNonReleased (default false) across config, OpenAPI schema, backend settings/types, frontend settings UI, request modals, context defaults, app initialization, and localization to surface warnings for unreleased media.

Changes

WarnNonReleased end-to-end

Layer / File(s) Summary
API schema & backend settings
seerr-api.yml, server/interfaces/api/settingsInterfaces.ts, server/lib/settings/index.ts
Add warnNonReleased: boolean to OpenAPI MainSettings; add property to server interfaces and settings storage; initialize default false and include in full public settings.
Frontend settings, context, docs, config
src/components/Settings/SettingsMain/index.tsx, src/context/SettingsContext.tsx, src/pages/_app.tsx, cypress/config/settings.cypress.json, docs/using-seerr/settings/general.md, src/i18n/locale/en.json
Expose warnNonReleased in SettingsMain (messages, initialValues, submit payload, checkbox); add default to SettingsContext and app initial props; add cypress config flag, update docs, and add i18n keys.
RequestModal (Movie) warnings
src/components/RequestModal/MovieRequestModal.tsx
Import settings, compute discoverRegion and regional non-theatrical release timing, introduce i18n key, and render conditional warning Alert when enabled.
RequestModal (TV) warnings
src/components/RequestModal/TvRequestModal.tsx
Add i18n strings; compute selected seasons' air dates (future/missing); render up to two conditional warning Alerts when enabled.

Sequence Diagram

sequenceDiagram
    actor User
    participant UI as Request Modal
    participant Settings as Settings Context
    participant API as Backend API

    User->>UI: Open request modal / select media
    UI->>Settings: Read currentSettings.warnNonReleased
    Settings-->>UI: Return warnNonReleased
    UI->>UI: Compute regional release or season air dates
    alt warnNonReleased enabled AND item not released
        UI->>User: Render non-released warning alert
    else
        UI->>User: No warning shown
    end
    User->>UI: Submit request
    UI->>API: POST request
    API-->>UI: Respond
    UI-->>User: Show result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • gauthier-th
  • fallenbagel
  • M0NsTeRRR

Poem

🐰 I hopped through settings, tiny and bright,
To flag releases not yet in sight,
A gentle nudge before you plea,
So patience hops in company,
🥕 A soft warn for what’s not yet free.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main feature: adding a warning system for non-released media in request modals, which is the core change across the entire changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rienafairefr
rienafairefr force-pushed the warn-request-releases branch from ec8d9fa to 650ea7a Compare March 6, 2026 16:57
@rienafairefr
rienafairefr marked this pull request as draft March 6, 2026 17:02

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (2)
src/components/RequestModal/MovieRequestModal.tsx (2)

72-76: Consider simplifying with nullish coalescing.

The nested ternaries work correctly but could be more concise.

♻️ Optional simplification
-  const discoverRegion = user?.settings?.discoverRegion
-    ? user.settings.discoverRegion
-    : settings.currentSettings.discoverRegion
-    ? settings.currentSettings.discoverRegion
-    : 'US';
+  const discoverRegion =
+    user?.settings?.discoverRegion ??
+    settings.currentSettings.discoverRegion ??
+    'US';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/RequestModal/MovieRequestModal.tsx` around lines 72 - 76, The
nested ternary that computes discoverRegion is verbose; replace it with a
concise nullish coalescing expression using the existing symbols
(user?.settings?.discoverRegion, settings.currentSettings.discoverRegion) so
discoverRegion = user?.settings?.discoverRegion ??
settings.currentSettings.discoverRegion ?? 'US' (keep the same resolution order
and fallback).

80-82: Simplify the nonTheatricalInTheFuture logic.

The condition (!nonTheatricalReleases || nonTheatricalReleases.length > 0) is confusing and partially redundant:

  • When nonTheatricalReleases is undefined, the ?.every() returns undefined anyway, making the entire expression falsy.
  • The !nonTheatricalReleases check is thus unnecessary.

The intent appears to be: "releases exist AND all are in the future."

♻️ Proposed simplification
   const nonTheatricalInTheFuture =
-    (!nonTheatricalReleases || nonTheatricalReleases.length > 0) &&
-    nonTheatricalReleases?.every((r) => new Date(r.release_date) > new Date());
+    nonTheatricalReleases &&
+    nonTheatricalReleases.length > 0 &&
+    nonTheatricalReleases.every((r) => new Date(r.release_date) > new Date());
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/RequestModal/MovieRequestModal.tsx` around lines 80 - 82, The
conditional for nonTheatricalInTheFuture is using a redundant
!nonTheatricalReleases check; change the logic to explicitly require that
nonTheatricalReleases is an array with length > 0 and that every release’s
release_date is in the future. In other words, replace the current expression
for nonTheatricalInTheFuture with a check that nonTheatricalReleases is
present/array and has length > 0, then call nonTheatricalReleases.every(r => new
Date(r.release_date) > new Date()); reference symbols: nonTheatricalInTheFuture,
nonTheatricalReleases, and r.release_date.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/RequestModal/TvRequestModal.tsx`:
- Around line 386-390: Remove the stray console.log and stop hardcoding
airDateInTheFuture; compute it from seasonsAirDates instead by mapping
data?.seasons to their airDate (already done in seasonsAirDates) and then
checking whether every non-null airDate is in the future (or at least one is,
matching MovieRequestModal logic) to derive airDateInTheFuture; update the usage
of airDateInTheFuture in TvRequestModal so the unreleased state reflects actual
season air dates rather than always true.
- Around line 508-516: The conditional is calling airDateInTheFuture as a
function which causes a runtime error; change the JSX to use boolean
conjunction: check settings.currentSettings.warnNonReleased &&
airDateInTheFuture && then render the <div> with the Alert (using Alert,
intl.formatMessage, messages.requesttvNotReleased) so the alert only renders
when both booleans are true.

In `@src/components/Settings/SettingsMain/index.tsx`:
- Around line 56-58: Update the text for the warnNonReleased setting to indicate
it only shows a warning (does not block requests): change the warnNonReleasedTip
value so it reads that Seerr will display a warning banner to requesters if a
title is not yet released, and ensure the visible label warnNonReleased remains
the same; apply the exact same wording change to the i18n key warnNonReleasedTip
in en.json and mirror the updated copy in the settings documentation
(general.md) so UI, locale, and docs stay aligned.

In `@src/i18n/locale/en.json`:
- Line 569: The added i18n key
components.RequestModal.requestmovieNonTheattricalInTheFuture is unused and
inconsistent with MovieRequestModal which formats
components.RequestModal.requestmovieNotReleased; replace or remove the dead key
and add/update components.RequestModal.requestmovieNotReleased in
src/i18n/locale/en.json with the combined message text that covers both "in the
future" and "absent" cases so MovieRequestModal's calls resolve correctly (refer
to MovieRequestModal and the message id
components.RequestModal.requestmovieNotReleased).

---

Nitpick comments:
In `@src/components/RequestModal/MovieRequestModal.tsx`:
- Around line 72-76: The nested ternary that computes discoverRegion is verbose;
replace it with a concise nullish coalescing expression using the existing
symbols (user?.settings?.discoverRegion,
settings.currentSettings.discoverRegion) so discoverRegion =
user?.settings?.discoverRegion ?? settings.currentSettings.discoverRegion ??
'US' (keep the same resolution order and fallback).
- Around line 80-82: The conditional for nonTheatricalInTheFuture is using a
redundant !nonTheatricalReleases check; change the logic to explicitly require
that nonTheatricalReleases is an array with length > 0 and that every release’s
release_date is in the future. In other words, replace the current expression
for nonTheatricalInTheFuture with a check that nonTheatricalReleases is
present/array and has length > 0, then call nonTheatricalReleases.every(r => new
Date(r.release_date) > new Date()); reference symbols: nonTheatricalInTheFuture,
nonTheatricalReleases, and r.release_date.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bfb30d86-c0c8-475f-a16c-3c929140bede

📥 Commits

Reviewing files that changed from the base of the PR and between ff4ab21 and ec8d9fa.

📒 Files selected for processing (11)
  • cypress/config/settings.cypress.json
  • docs/using-seerr/settings/general.md
  • seerr-api.yml
  • server/interfaces/api/settingsInterfaces.ts
  • server/lib/settings/index.ts
  • src/components/RequestModal/MovieRequestModal.tsx
  • src/components/RequestModal/TvRequestModal.tsx
  • src/components/Settings/SettingsMain/index.tsx
  • src/context/SettingsContext.tsx
  • src/i18n/locale/en.json
  • src/pages/_app.tsx

Comment thread src/components/RequestModal/TvRequestModal.tsx Outdated
Comment thread src/components/RequestModal/TvRequestModal.tsx
Comment thread src/components/Settings/SettingsMain/index.tsx Outdated
Comment thread src/i18n/locale/en.json Outdated
@rienafairefr
rienafairefr force-pushed the warn-request-releases branch from 650ea7a to 1b6e19d Compare March 7, 2026 09:57
@rienafairefr

Copy link
Copy Markdown
Author

Added a similar feature (governed by the same config flag) for TV requests

image

@rienafairefr rienafairefr changed the title feat(movierequestmodal): warning for no non-theatrical release (or in the future) feat(tvrequestmodal) feat(movierequestmodal): warning for no yet released media Mar 7, 2026
@rienafairefr
rienafairefr requested a review from gauthier-th March 7, 2026 10:02
@rienafairefr
rienafairefr force-pushed the warn-request-releases branch from 1b6e19d to 4367d97 Compare March 7, 2026 10:08
@rienafairefr

Copy link
Copy Markdown
Author

Should be ready now, my thanks to the reviewers

@0xSysR3ll
0xSysR3ll marked this pull request as ready for review March 7, 2026 12:00
M0NsTeRRR
M0NsTeRRR previously approved these changes Jun 8, 2026

@fallenbagel fallenbagel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TV and movie warning strings should be consistent with each other and use cleaner phrasing.

Currently requesttvNotReleased says "The Air Date is in the future" while requestmovieNotReleased says "This movie release is in the future". These are different in structure, and both are, imo, very awkward.

Suggested replacements:

"components.RequestModal.requestmovieNotReleased": "This movie has not been released yet",
"components.RequestModal.requesttvNotReleased": "This series has not aired yet",
"components.RequestModal.requesttvNoAirDate": "No air date available for this series",

The requesttvNoAirDate value ("The Air Date is absent") also should be cleaned up here.

@rienafairefr
rienafairefr dismissed stale reviews from M0NsTeRRR, 0xSysR3ll, and gauthier-th via 8363e18 June 9, 2026 19:05
@rienafairefr
rienafairefr force-pushed the warn-request-releases branch from 2e96e29 to 8363e18 Compare June 9, 2026 19:05
@rienafairefr

Copy link
Copy Markdown
Author

The TV and movie warning strings should be consistent with each other and use cleaner phrasing.

Currently requesttvNotReleased says "The Air Date is in the future" while requestmovieNotReleased says "This movie release is in the future". These are different in structure, and both are, imo, very awkward.

Suggested replacements:

"components.RequestModal.requestmovieNotReleased": "This movie has not been released yet",
"components.RequestModal.requesttvNotReleased": "This series has not aired yet",
"components.RequestModal.requesttvNoAirDate": "No air date available for this series",

The requesttvNoAirDate value ("The Air Date is absent") also should be cleaned up here.

updated the wording 👍

gauthier-th
gauthier-th previously approved these changes Jun 9, 2026
@gauthier-th
gauthier-th requested a review from fallenbagel June 9, 2026 19:58
fallenbagel
fallenbagel previously approved these changes Jun 9, 2026

@TheCatLady TheCatLady left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions, mostly to improve strings.

Comment thread docs/using-seerr/settings/general.md
Comment thread src/components/RequestModal/MovieRequestModal.tsx
Comment thread src/components/RequestModal/MovieRequestModal.tsx
Comment thread src/components/RequestModal/TvRequestModal.tsx Outdated
Comment thread docs/using-seerr/settings/general.md Outdated
Comment thread src/components/Settings/SettingsMain/index.tsx Outdated
@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@montreyw

montreyw commented Aug 9, 2026

Copy link
Copy Markdown

Running into exactly the case this solves. Theatrical-only releases show up as requestable in Discover, users request them, and the requests sit there or fail because there's no digital release to grab yet. A warning at the request modal is the right place to catch it.

Looks like the only open thread is @TheCatLady's question about titles with missing release metadata, and the (nonTheatricalReleases?.length ?? 0) > 0 guard already handles that: no release data means no warning fires. If that reads as resolved, this needs a rebase and a re-review to move.

It was in the v3.4.0 milestone in June before it got pulled. Anything blocking beyond the conflict?

@rienafairefr
rienafairefr force-pushed the warn-request-releases branch from 67a308d to 025cde9 Compare August 20, 2026 21:09
@github-actions github-actions Bot removed the merge conflict Cannot merge due to merge conflicts label Aug 20, 2026
@rienafairefr

Copy link
Copy Markdown
Author

the PR was rebased conflict in the locale json fixed without issues

@gauthier-th gauthier-th added this to the v3.5.0 milestone Aug 25, 2026
@gauthier-th

Copy link
Copy Markdown
Member

It was in the v3.4.0 milestone in June before it got pulled. Anything blocking beyond the conflict?

That was enough to block it 😉

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.

Set minimum release status to request media