Skip to content

feat: add a customizable message for local login#3168

Open
gauthier-th wants to merge 1 commit into
developfrom
feat/login-message
Open

feat: add a customizable message for local login#3168
gauthier-th wants to merge 1 commit into
developfrom
feat/login-message

Conversation

@gauthier-th

@gauthier-th gauthier-th commented Jun 16, 2026

Copy link
Copy Markdown
Member

Description

This PR adds the possibility to add a customizable message displayed on the local login form. This will be useful to display the username/password of the upcoming Seerr online demo.

Re #3017

How Has This Been Tested?

LOGIN_MESSAGE='Hello World!' pnpm dev

Screenshots / Logs (if applicable)

image

Checklist:

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

Summary by CodeRabbit

  • New Features
    • Administrators can now configure an informational alert message to display on the login page. This feature enables effectively communicating time-sensitive updates, maintenance notices, service announcements, or other important information directly to users when they access the login screen, improving transparency and communication during critical operational moments.

This PR adds the possibility to add a customizable message displayed on the local login form. This
will be useful to display the username/password of the upcoming Seerr online demo.
@gauthier-th gauthier-th requested a review from a team as a code owner June 16, 2026 13:01
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

next.config.ts exposes a new LOGIN_MESSAGE environment variable as loginMessage in the Next.js env block. LocalLogin imports the Alert component and conditionally renders an info alert above the login form when that variable is set.

Changes

Optional Login Message Banner

Layer / File(s) Summary
Env var wiring in Next.js config
next.config.ts
Adds loginMessage: process.env.LOGIN_MESSAGE to the env section of nextConfig.
Conditional Alert rendering in LocalLogin
src/components/Login/LocalLogin.tsx
Imports Alert and conditionally renders an informational alert above the login form when process.env.loginMessage is truthy.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A message appears at the login gate,
Typed in .env, it seals its fate.
🐇 The rabbit hops in, reads the sign,
An Alert of blue — everything's fine!
Config and component, two hops in sync. ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add a customizable message for local login' accurately describes the main change: adding a LOGIN_MESSAGE environment variable that displays a customizable message on the login form.
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.

✏️ 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 and usage tips.

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@next.config.ts`:
- Line 6: The loginMessage field in the env config is build-time only and won't
update in containerized deployments without a rebuild. Remove the loginMessage
entry from the env config in next.config.ts, then add loginMessage to the
PublicSettingsResponse interface and implement it in the /api/v1/settings/public
endpoint to make it runtime configurable. This will allow the setting to be
changed via the existing admin settings system without requiring a container
rebuild.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 37caf1c7-c31b-4cd0-b8b5-cffe8d7cddf3

📥 Commits

Reviewing files that changed from the base of the PR and between 6c8527f and 8c51a81.

📒 Files selected for processing (2)
  • next.config.ts
  • src/components/Login/LocalLogin.tsx

Comment thread next.config.ts
const nextConfig: NextConfig = {
env: {
commitTag: process.env.COMMIT_TAG || 'local',
loginMessage: process.env.LOGIN_MESSAGE,

@coderabbitai coderabbitai Bot Jun 16, 2026

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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Locate all sources/consumers of login message env.
rg -nP "LOGIN_MESSAGE|process\.env\.loginMessage|nextConfig|env:\s*\{" --type ts --type tsx --type js --type jsx

# 2) Check docs/container files for runtime env expectations.
fd -HI 'Dockerfile|docker-compose|compose|README|docs' || true
rg -nP "environment|env var|runtime|docker|COMMIT_TAG|LOGIN_MESSAGE" README* docs* Dockerfile* docker-compose* 2>/dev/null || true

# 3) Look for existing runtime settings pathways that could carry a login message.
rg -nP "currentSettings|publicSettings|runtimeConfig|/api/.*/settings" src server 2>/dev/null || true

Repository: seerr-team/seerr

Length of output: 88


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) First, locate next.config.ts and inspect it
echo "=== Locating next.config.ts ==="
fd -t f 'next\.config\.ts$' || echo "Not found with strict match"

# 2) Search for LOGIN_MESSAGE and loginMessage references (fix file type issue)
echo "=== Searching for LOGIN_MESSAGE usage ==="
rg -n "LOGIN_MESSAGE|loginMessage" -t ts -t js --no-heading 2>/dev/null || echo "Search completed"

# 3) Check for docker/deployment files
echo "=== Looking for Docker and deployment config ==="
fd -t f -e Dockerfile -e 'docker-compose.yml' -e 'docker-compose.yaml' -e '.env*' -e 'README*' . 2>/dev/null | head -20 || true

# 4) Check for runtime settings/config patterns
echo "=== Searching for runtime settings patterns ==="
rg -n "publicRuntimeConfig|serverRuntimeConfig|runtimeConfig|currentSettings|/api" -t ts -t js --max-count 20 2>/dev/null || echo "No runtime config patterns found"

Repository: seerr-team/seerr

Length of output: 50372


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1. Read next.config.ts to see full context
echo "=== next.config.ts content ===" 
head -30 next.config.ts

# 2. Check PublicSettingsResponse interface
echo -e "\n=== PublicSettingsResponse interface ==="
fd -t f 'settingsInterfaces' | head -5 | xargs -I {} head -100 {}

# 3. Check if loginMessage exists in settings
echo -e "\n=== Looking for loginMessage in interfaces and database ==="
rg -n "loginMessage" -t ts -t js 2>/dev/null | head -20

# 4. Check Settings entity/table
echo -e "\n=== Looking for Settings entity definitions ==="
fd -t f -e ts 'Settings' src server | xargs grep -l "class Settings" 2>/dev/null || echo "No Settings class found"
fd -t f -e ts 'MainSettings\|PublicSettings' src server 2>/dev/null | head -5

# 5. Check routes for settings endpoints
echo -e "\n=== Settings routes (main settings endpoint) ===" 
rg -A 10 "'/api/v1/settings/main'" server/routes -t ts 2>/dev/null | head -40

Repository: seerr-team/seerr

Length of output: 3059


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check if there are any environment variable documentation or examples
echo "=== Checking for docs and .env examples ==="
fd -t f '\.(env|md|txt)' . | grep -i -E '(env|readme|doc|example)' | head -20

# Check docker/deployment setup
echo -e "\n=== Checking for deployment documentation ==="
find . -maxdepth 2 -name 'Dockerfile*' -o -name 'docker-compose*' -o -name '.dockerignore' 2>/dev/null | xargs cat 2>/dev/null | head -60 || echo "No Docker files"

# Confirm PublicSettingsResponse is fetched at runtime
echo -e "\n=== Confirm runtime public settings endpoint ==="
rg -n "'/api/v1/settings/public'" src server -t ts -A 3 2>/dev/null | head -30

Repository: seerr-team/seerr

Length of output: 4412


loginMessage is build-time only, not runtime configurable in containerized deployments.

Line 6 uses Next.js env config to expose LOGIN_MESSAGE, which inlines the value at build time. In Docker deployments, changing the LOGIN_MESSAGE environment variable won't take effect without a rebuild and restart. The codebase already has a runtime settings system via the /api/v1/settings/public API endpoint and PublicSettingsResponse interface; loginMessage should be added there if runtime admin configurability is required.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@next.config.ts` at line 6, The loginMessage field in the env config is
build-time only and won't update in containerized deployments without a rebuild.
Remove the loginMessage entry from the env config in next.config.ts, then add
loginMessage to the PublicSettingsResponse interface and implement it in the
/api/v1/settings/public endpoint to make it runtime configurable. This will
allow the setting to be changed via the existing admin settings system without
requiring a container rebuild.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@seerr-team/seerr-core WDYT? The goal of this is not really to be a configurable setting for everyone, but rather to add the possibility to display a custom message in very particular cases (for the demo feature).

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.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@cypress

cypress Bot commented Jun 16, 2026

Copy link
Copy Markdown

seerr    Run #3562

Run Properties:  status check passed Passed #3562  •  git commit 8c51a81144: feat: add a customizable message for local login
Project seerr
Branch Review feat/login-message
Run status status check passed Passed #3562
Run duration 02m 16s
Commit git commit 8c51a81144: feat: add a customizable message for local login
Committer Gauthier
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32
View all changes introduced in this branch ↗︎

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