- Umbrella tip now bigger (larger padding/font/icon) and there can be
more than one chip shown at once (e.g. cold + rainy).
- Added a softer 'You might want an umbrella' tier: shown when the
existing strong threshold isn't met but any remaining hour today
still has a real (>10%) rain chance -- previously that case showed
nothing at all.
- Added a jacket tip: shown when today's forecast high is below 12°C.
Both new thresholds are named constants at the top of summary.js,
easy to retune without touching the logic.
summary.js's umbrella boolean is replaced by a tips[] array so future
nudges (e.g. a UV/sun-cream tip, if we add UV index data) slot in the
same way without another one-off boolean + span.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Was showing right-now's temp/feels-like/rain% under a headline that's
already a whole-day summary -- mismatched framing (a day-level
headline next to point-in-time numbers).
- Big temp is now today's forecast high, with a small 'High' label.
- Feels-like is paired with that same high-temp hour, not right now.
- Rain% is the day's peak chance, shown as 'X% chance of rain around
HH:00' instead of the current hour's (often much lower) number.
summarizeToday() now returns highTemp/highFeelsLike/rainChance
alongside the existing headline/note/umbrella, computed from the same
already-fetched hourly points. Frontend falls back to currentPoint's
own values only if summary is unexpectedly null.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The shared --surface/--surface-2 tokens (7-8% white) read as barely
there against the navy background on the 10" kiosk tab. Added a
--surface-strong/--surface-strong-border pair (13%/22%) scoped to
these 3 cards specifically, rather than touching the shared design
tokens which stay verbatim across apps. Also gives next-day-card and
day-card a border they didn't have before, for definition beyond just
the background tint.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Was rendering all 24 hours of today (including already-passed ones) in
a horizontally-scrolling strip -- only ~11 fit at the card's minimum
readable width on the 10" tablet. Now shows now-onward only, at full
1-hour resolution near-term, coarsening to 2-hour steps further into
the day so the total stays <=11 (worst case 12, only in the ~1hr
window right after midnight).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Was: one Promise.all across all 3 Met Office endpoints, any single failure
threw and discarded ALL of it, falling back to Open-Meteo entirely -- even
though only the daily endpoint has ever been confirmed to work (only Spot
key configured; hourly/three-hourly may need the separate Forecast
subscription settings just gained a field for). So the display was very
possibly running on Open-Meteo for everything despite a working Met Office
key, silently.
Now: hourly, three-hourly and daily are fetched independently
(Promise.allSettled). hourly/three-hourly try met_office's new
forecast_api_key first (falling back to api_key if no separate Forecast
key is set); daily keeps using api_key (Spot), matching what's actually
confirmed live. Only the tiers that fail fall back to Open-Meteo -- and
Open-Meteo itself is now fetched lazily, once, only if at least one tier
actually needs it.
status.last_provider is now {hourly, threeHourly, daily} instead of one
flat string, so the admin page shows exactly which source served which
tier. Admin.tsx / types.ts updated to match.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Backend now stores hourly points for every day the provider returns (not
just today) -- for Open-Meteo this is free, the hourly= block already
covers the full forecast_days=8 window in the one call, today's strip just
discarded everything past today. Met Office's hourly product window isn't
verified this far out (only daily has been exercised live so far); an
empty result for a given date just means "no hourly detail", handled as a
graceful fallback, not an error.
New GET /api/public/forecast/hourly?date=YYYY-MM-DD backs the modal. The
main /api/public/forecast payload's `hourly` field is now its own scoped
query (today only) rather than filtering the much bigger stored set in JS.
Frontend: tapping any "Coming up" card (tomorrow/day-after or days 4-7)
opens DayModal with that day's hourly points, falling back to the
already-known 3-hourly points (or the single daily summary) if the
provider doesn't have hourly detail that far out. Auto-closes after 20s of
no interaction (pointerdown/keydown/wheel/scroll all reset the timer), with
a depleting progress bar so the countdown isn't a surprise. Extracted
PointMeta/AstroRow and the date/format helpers out of Display.tsx into
shared modules since DayModal needs them too.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wrong direction on the previous fix -- hiding the number lost real
information. Better fix: when no hour's icon is rain-classified but there's
still a real (if low) numeric precip_prob somewhere in the day, the
headline now says 'Mostly dry, slim chance of rain' instead of a flat 'Dry
today' that silently disagreed with a 5% sitting on an hour card. Rain% is
shown unconditionally again everywhere (hourly cards, next-2-days cards,
the Now hero line).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The headline is icon-based (does any hour have a rain-classified icon), not
precip_prob-based, so an hour can have a non-rain icon and still carry a
token 5% chance -- both numbers are real, they're just independent fields.
Nothing was gating the tiny one from display, so a hour card could show
'5%' right next to 'Dry today'. New MIN_PRECIP_DISPLAY threshold (15) hides
percentages below that everywhere it's shown (hourly cards, next-2-days
cards, the Now hero line) rather than second-guessing the provider's own
icon classification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Icon 26->39px, temp font-size scaled ~150%. Rain% and wind now render on
separate lines (was one line with a '·' separator) with a small Droplet/
Wind icon in front of each. large prop on PointMeta keeps the next-2-days
cards at their existing smaller size -- only today's hourly strip is meant
to read as the detailed/primary view.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Neither Met Office's Global Spot API nor Open-Meteo return a narrative text
summary -- both are purely numeric/coded. New lib/summary.js derives one
rule-based from today's already-fetched hourly points (icon + precip_prob),
no extra API call, no LLM:
- Headline: "Scattered showers today", "Rain likely later", "Heavy rain
today", "Dry today", etc. -- compares rain distribution across the whole
day vs specifically the hours still ahead of "now".
- Note: "Thunderstorms possible", appended when a thunder icon shows up.
- Umbrella nudge: shown when there's a real rain chance now or later today.
Computed fresh per-request (not cached at fetch time), since "later" means
later than whoever's looking at the screen right now, not later than the
last hourly refresh.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Previous layout used flex + clamp()-based intrinsic sizing, which worked
until the rain%/wind additions made hourly cards tall enough to push total
content past 100vh -- overflow was silently clipped rather than scrolling
(the container has overflow:hidden by design for a kiosk screen), so the
bottom of the page (daily row / "updated" footer) could vanish depending on
viewport height.
Now .wx-display is a CSS grid with explicit rows (auto for header/now/label
rows, minmax(0, 1fr) for the two content rows) that always sum to exactly
100vh. Each 1fr row's direct child gets min-height:0 + overflow:hidden so it
actually respects its shrunk allotment instead of forcing the track to grow
-- the standard CSS grid overflow gotcha. Wrapped the next-2-days + daily
row together in a new .wx-coming-up flex column so they share one grid
track instead of each claiming independent space.
Also: rain% + wind now render on one line ("12% · SW 8mph") instead of two
stacked lines, trimming card height further.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New `config` table + routes/config.js: GET /api/public/config (no auth,
Display.tsx needs it with no session) and PUT /api/admin/config (authed +
'settings' cap). A blank title clears the override and falls back to the
build-time VITE_HOTEL_NAME, so an unconfigured install still shows
something sensible. Admin.tsx gets a "Display title" field above the
existing status card.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Today's hourly cards and the next-2-days 3-hourly cards now always show
rain chance% and wind (compass direction + mph), not just rain% above a
20% threshold. New wind_dir_deg column on forecast_points (Met Office
windDirectionFrom10m / Open-Meteo winddirection_10m).
- New forecast_astro table: sunrise/sunset for today + next 2 days, shown
next to each day's section label. No extra API calls needed — both
providers' daily responses already carry sunrise/sunset for those dates,
just weren't being extracted before.
- Today's hourly strip now sits in its own bordered block (wx-today-block)
so it reads as a distinct group instead of blending into the cards below.
- "Next 2 days" no longer has its own separate heading — tomorrow and the
day after now sit under the single "Coming up" label, same as days 4-7.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Backend: Fastify service polling Met Office DataHub (Global Spot: hourly,
three-hourly, daily endpoints) with Open-Meteo fallback, hourly refresh.
Reuses settings' hotel_location/met_office integrations (same pattern as
hvac's lib/weather.js) rather than its own credential copy.
- Three display tiers stored in one forecast_points table: today (hourly),
next 2 days (3-hourly), days 4-7 (plain daily) - 7 days total.
- Public /api/public/forecast (no auth) feeds the reception kiosk display;
/api/internal/forecast (WEATHER_SECRET bearer) lets other apps read the
stored forecast instead of polling providers themselves; /api/admin/*
(normal JWT + settings cap) is the staff status/refresh page.
- Frontend: root / is the public full-screen Display (no AuthGate at all -
first genuinely public app in the stack); /admin is the authed status
page. apps.base_path is /weather/admin so the portal card opens the
admin view directly, precedented by forecasting's history sub-route.
- LXC 131 / 10.10.10.131, registered in auth/src/db.js, push-to-forgejo.sh,
and stack-init/install-stack.sh (deploy_weather + --only dispatch + full
install chain).
- Typechecks and builds clean; not yet deployed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>