Skip to content

Splash screen: [web] port, IP address only (M7) - #243

Merged
txoof merged 3 commits into
mainfrom
242-splash-port
Oct 7, 2026
Merged

txoof merged 3 commits into
mainfrom
242-splash-port

Conversation

@txoof-bot

@txoof-bot txoof-bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #242

What changed

  • splash_screen gets a setting port (default 8080, 1–65535) and uses it in both web addresses and in the QR code. The fixed WEB_PORT constant is gone.
  • Scheduler: the built-in splash is built with port = [web] port from the config at start. Like the web interface itself ([web] port is in WEB_NEXT_START), a changed port applies at the next start of PaperPi, so the splash never shows a port the web interface isn't using.
  • A splash that a user adds to the rotation with a [[plugin]] block uses its own port setting (default 8080); the README says so.
  • The host-name line is gone (txoof, 2026-10-07: "keep it simple"): the web interface only accepts IP addresses, so http://<name>.local:8080 led to an error page. The splash now shows the IP address (larger) and the QR code; the host-name reader is removed.
  • Plugin README updated.

Why: #236 used a fixed 8080 because [web] port did not exist yet when it was built; it arrived with M5 part 1 (#239/#240). With another port, the splash and its QR code pointed to the wrong address.

Size: +88/−107 (git diff --shortstat origin/main...HEAD). Small on purpose: txoof asked for this fix as its own PR.

Reference images for the splash changed (one address line instead of two).

Area

plugins/splash_screen, the splash part of src/paperpi/scheduler.py, their tests. Checked: open PR #241 (M5 part 2a) also changes scheduler.py, but other lines.

Tests

  • splash_screen: the default port equals [web] port's default; with port = 9000 both addresses and the QR code use 9000.
  • splash_screen: port must be a whole number 1–65535 (0, 65536 and text are refused).
  • scheduler: the splash update gets [web] port, and keeps it after reloads (also when it draws again after a rotation change).
  • uv run pytest passes (1151 passed, 1 deselected; fewer because the host-name tests are gone)
  • uv run ruff check . passes
  • Hardware tests: not needed

Review

  • Review agents' comments answered (one combined comment)

Only txoof approves and merges this PR.

🤖 Generated with Claude Code

The built-in splash gets [web] port as its `port` setting; a reload that
changes the port gives the splash the new address at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@txoof-bot
txoof-bot requested a review from txoof as a code owner October 7, 2026 16:05
[web] port only changes at the next start (WEB_NEXT_START), so the splash
keeps the port the web interface started with; the plugin's port is strict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@txoof-bot

Copy link
Copy Markdown
Collaborator Author

Answers to the review

One review agent did all four reviews (code, tests, security, docs), since the PR is small.

  1. Blocking: after a reload the splash showed a port the web interface isn't using. [web] port only changes at the next start (WEB_NEXT_START; the web server keeps its port). Fixed: the scheduler keeps the port from the start; the reload test now expects the old port, also when the splash draws again after a rotation change. README updated.
  2. A splash added to the rotation by the user shows its own port (default 8080), not [web] port. Kept as it is: it is not what the plugin is meant for, and the README says so.
  3. The plugin's port accepted text ([web] port is strict). Fixed: strict=True; test for 0, 65536 and text.
  4. The host-name address (http://paperpi.local:PORT) can't be opened: the web interface only accepts an IP address or localhost. Not caused by this PR; asking txoof how to handle it (follow-up).

Security: nothing found. Tests: 3 of 4 planted bugs were caught; the 4th (port range) now has a test.

The web interface only accepts IP addresses, so the http://<name>.local
line led to an error page. txoof chose to drop it (keep it simple).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@txoof-bot txoof-bot changed the title Splash screen shows the [web] port (M7) Splash screen: [web] port, IP address only (M7) Oct 7, 2026
@txoof
txoof merged commit 34b429f into main Oct 7, 2026
2 checks passed
@txoof
txoof deleted the 242-splash-port branch October 7, 2026 18:18
@txoof-bot txoof-bot mentioned this pull request Oct 7, 2026
4 tasks done
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.

Splash screen shows the [web] port (M7)

2 participants