Fix blank radar on public location pages (#123) #124

Merged
claude-bot merged 1 commit from fix/public-page-radar into main 2026-07-22 16:06:18 +00:00
Contributor

The public location page rendered a blank Radar panel for unauthenticated visitors — it embedded the authenticated /api/locations/{id}/radar endpoint (require_user), so a public viewer's <img> request got a 302 to login instead of the PNG. (The radar itself works fine — confirmed live on prod.)

  • New GET /api/locations/{id}/public/radar — gated by public_enabled (not auth), mirroring the public page's own gating; serves the same disk-cached radar PNG (so repeat public hits don't reach upstream).
  • Repointed public_location.html's radar <img> at the public route.
  • Tests: public radar serves the image without auth; 404 for a non-public location.

Testing (dev server)

ruff clean; 5 public-location tests (2 new); bulk suite 778 passed.

Closes #123

🤖 Generated with Claude Code

The public location page rendered a **blank Radar panel** for unauthenticated visitors — it embedded the *authenticated* `/api/locations/{id}/radar` endpoint (`require_user`), so a public viewer's `<img>` request got a 302 to login instead of the PNG. (The radar itself works fine — confirmed live on prod.) - New **`GET /api/locations/{id}/public/radar`** — gated by `public_enabled` (not auth), mirroring the public page's own gating; serves the same disk-cached radar PNG (so repeat public hits don't reach upstream). - Repointed `public_location.html`'s radar `<img>` at the public route. - Tests: public radar serves the image without auth; 404 for a non-public location. ## Testing (dev server) ruff clean; 5 public-location tests (2 new); bulk suite **778 passed**. Closes #123 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fix blank radar on public location pages (#123)
All checks were successful
CI / test (pull_request) Successful in 5m53s
0c2aff55f2
The public location page embedded the authenticated /api/locations/{id}/radar
endpoint (require_user), so unauthenticated visitors were redirected to login and
the radar rendered blank.

- Add GET /api/locations/{id}/public/radar — gated by public_enabled (not auth),
  mirroring the public page itself; serves the same disk-cached radar PNG.
- Repoint public_location.html's radar <img> at the public route.
- Tests: public radar serves the image without auth; 404 for a non-public location.

Full suite green on the dev server: 778 passed.

Closes #123

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-bot deleted branch fix/public-page-radar 2026-07-22 16:06:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/WeatherBot!124
No description provided.