feat(ambient): día/noche vivo desde Open-Meteo (sin chorradas) - #121
Blackleets wants to merge 3 commits into
Conversation
Subtle AmbientSky phases (dawn/day/golden/dusk/night) over the map without inventing weather. Clear sky stays wash-only; existing WeatherAtmosphere still handles precip/clouds. Dims during navigation. WeatherCapsule uses design tokens for theme-friendly chrome.
|
Deployment failed for project aegis with the following error: Learn More: https://vercel.com/nfyns-projects-b0cc0f41?upgradeToPro=build-rate-limit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd7f117f5e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| function AmbientSky({ weather, navigationActive, visible }: AmbientSkyProps) { | ||
| const sky = useMemo( | ||
| () => (visible ? getAmbientSky(weather, navigationActive) : null), |
There was a problem hiding this comment.
Hide the wash when weather is no longer live
After any successful load, a refresh failure makes useLocalWeather set its status to unavailable without clearing the previous weather object, but this component receives no status and continues rendering that cached phase indefinitely; similarly, a new GPS grid can temporarily reuse weather from the previous location. Gate the wash on weather correlated to the current grid and a live status, or clear stale weather when loading fails.
AGENTS.md reference: AGENTS.md:L17-L18
Useful? React with 👍 / 👎.
| function parseTime(iso: string | null | undefined): number | null { | ||
| if (!iso) return null; | ||
| const ms = new Date(iso).getTime(); | ||
| return Number.isFinite(ms) ? ms : null; |
There was a problem hiding this comment.
Parse solar times in the reported timezone
When the browser timezone differs from the GPS location timezone, these offsetless Open-Meteo timestamps are interpreted in the browser's local timezone by new Date(iso). The API route requests timezone=auto and forwards daily.sunrise and daily.sunset unchanged, so the calculated dawn, golden, and dusk windows can be shifted by several hours; parse them using weather.timezone or return absolute timestamps from the server.
Useful? React with 👍 / 👎.
Night uses screen-blend so it reads on dark basemap (mobile). Mood tint from live icon; soft horizon band; html data-ambient-* hooks. No particles/stars; still dims hard during navigation.
Summary
dawn/day/golden/dusk/night) a partir deisDay+sunrise/sunsetde Open-Meteo.WeatherAtmosphere.WeatherCapsulepasa a tokens de diseño (--bg-panel,--text-*,--border-secondary).docs/ambient-sky.md. Tests de fase enambient-sky.test.ts.Constraints
prefers-reduced-motionsin transición animada del wash.Test plan
day; de nochenight.dawn/golden/dusk.vitestambient-sky + weather-atmosphere verdes; lint OK.