Sunlight Indicators (Planner + Race Day)
RaceCraft now adds route-based sunlight context to both Planner and Race Day views.
What it includes
- Sunrise, sunset, civil dawn, and civil dusk events computed from route coordinates
- Multi-day event generation for long races
- Checkpoint phase classification:
nightpre_dawn_twilightdaypost_dusk_twilight
- Planner summary card with timeline strip and phase-based recommendations
- Race Day live sunlight status and recommendation updates as actual times change
Backend notes
- Solar calculations are generated in
/api/calculate - Payload key:
sunlight - Includes timezone fallback behavior (
UTC) and warning metadata when timezone resolution is unavailable
Frontend notes
- Shared helpers are implemented in
static/js/sunlight.js - Planner uses the payload for summary strip + checkpoint phase chips
- Race Day uses the same payload for live status text and timeline rendering