[PR #1] [MERGED] feat(warnings): KNMI weather warnings widget #2

Closed
opened 2026-08-09 19:09:24 +02:00 by zaph0d · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/niels-emmer/wall-cast/pull/1
Author: @niels-emmer
Created: 3/21/2026
Status: Merged
Merged: 3/21/2026
Merged by: @niels-emmer

Base: mainHead: weather-warnings


📝 Commits (1)

  • 30eeb59 feat(warnings): add KNMI weather warnings widget

📊 Changes

13 files changed (+736 additions, -10 deletions)

View changed files

📝 backend/app/main.py (+2 -1)
backend/app/routers/warnings.py (+157 -0)
📝 config/wall-cast.yaml (+2 -0)
📝 docs/memory/INDEX.md (+21 -3)
📝 docs/memory/records/decision-log.md (+12 -0)
docs/memory/records/future-ideas.md (+226 -0)
frontend/src/hooks/use-warnings.ts (+13 -0)
📝 frontend/src/i18n/translations.ts (+19 -0)
📝 frontend/src/types/api.ts (+13 -0)
📝 frontend/src/widgets/base-registry.ts (+4 -0)
📝 frontend/src/widgets/rotate/RotatorWidget.tsx (+46 -5)
frontend/src/widgets/warnings/WarningsWidget.tsx (+220 -0)
📝 frontend/vite.config.ts (+1 -1)

📄 Description

Summary

  • New KNMI warnings widget — fetches active weather warnings (Code Geel/Oranje/Rood) from the public KNMI CDN XML feed, no API key required
  • Colour-coded cards per warning: 5px left accent bar + badge in yellow/orange/red, phenomenon name, affected regions, validity window, description
  • Auto-skips in rotation when no warnings are active — no blank slide, no config needed; silently appears when KNMI has something active
  • Extended RotatorWidget with a generic onSkip() mechanism (WidgetProps) so any future widget can opt out of rotation when it has no content
  • vite.config.ts proxy updated to 192.168.101.184 so npm run dev works against the live VPS backend without Docker

Test plan

  • Deploy with docker compose up --build -d on the VPS
  • Confirm GET /api/warnings returns {"warnings": []} during calm weather
  • Confirm warnings slot is not shown in rotation during calm weather
  • When KNMI issues a warning: confirm widget appears in rotation with correct colour coding
  • Confirm npm run dev (frontend only) connects to VPS backend via proxy

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/niels-emmer/wall-cast/pull/1 **Author:** [@niels-emmer](https://github.com/niels-emmer) **Created:** 3/21/2026 **Status:** ✅ Merged **Merged:** 3/21/2026 **Merged by:** [@niels-emmer](https://github.com/niels-emmer) **Base:** `main` ← **Head:** `weather-warnings` --- ### 📝 Commits (1) - [`30eeb59`](https://github.com/niels-emmer/wall-cast/commit/30eeb59489120b11cdfc47e78bb8624c194f94e3) feat(warnings): add KNMI weather warnings widget ### 📊 Changes **13 files changed** (+736 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/main.py` (+2 -1) ➕ `backend/app/routers/warnings.py` (+157 -0) 📝 `config/wall-cast.yaml` (+2 -0) 📝 `docs/memory/INDEX.md` (+21 -3) 📝 `docs/memory/records/decision-log.md` (+12 -0) ➕ `docs/memory/records/future-ideas.md` (+226 -0) ➕ `frontend/src/hooks/use-warnings.ts` (+13 -0) 📝 `frontend/src/i18n/translations.ts` (+19 -0) 📝 `frontend/src/types/api.ts` (+13 -0) 📝 `frontend/src/widgets/base-registry.ts` (+4 -0) 📝 `frontend/src/widgets/rotate/RotatorWidget.tsx` (+46 -5) ➕ `frontend/src/widgets/warnings/WarningsWidget.tsx` (+220 -0) 📝 `frontend/vite.config.ts` (+1 -1) </details> ### 📄 Description ## Summary - New **KNMI warnings widget** — fetches active weather warnings (Code Geel/Oranje/Rood) from the public KNMI CDN XML feed, no API key required - Colour-coded cards per warning: 5px left accent bar + badge in yellow/orange/red, phenomenon name, affected regions, validity window, description - **Auto-skips in rotation** when no warnings are active — no blank slide, no config needed; silently appears when KNMI has something active - Extended **RotatorWidget** with a generic `onSkip()` mechanism (`WidgetProps`) so any future widget can opt out of rotation when it has no content - `vite.config.ts` proxy updated to `192.168.101.184` so `npm run dev` works against the live VPS backend without Docker ## Test plan - [ ] Deploy with `docker compose up --build -d` on the VPS - [ ] Confirm `GET /api/warnings` returns `{"warnings": []}` during calm weather - [ ] Confirm warnings slot is not shown in rotation during calm weather - [ ] When KNMI issues a warning: confirm widget appears in rotation with correct colour coding - [ ] Confirm `npm run dev` (frontend only) connects to VPS backend via proxy 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zaph0d 2026-08-09 19:09:24 +02:00
Sign in to join this conversation.
No labels
pull-request
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
github-mirrors/wall-cast#2
No description provided.