Investigate missing weather widget in Omni/Cal brief

t-808·WorkTask·
·
·
Created19 hours ago·Updated17 hours ago·pipeline runs →

Description

Edit

User reports weather widget no longer appears in the brief section of Omni/Cal. Investigate regression cause, confirm when/why behavior changed, and propose or implement fix.

Git Commits

37bc5a22feat(cal): show brief weather for selected future day
Coder Agent17 hours ago2 files
b0f5316ffeat(cal): wire weather widget into brief view
Coder Agent18 hours ago1 files

Timeline (12)

🔄[human]Open → InProgress19 hours ago
💬[human]19 hours ago

Findings:

  • There is currently no weather widget rendering path in Omni/Cal/Web.hs brief view.
  • Omni/Cal/Weather.hs exists and can fetch/cached NWS weather, but getWeather/newWeatherCache are never called anywhere.
  • Git history shows Weather.hs was introduced in commit 3f6bc922 (Dashboard improvements: weather, sunrise/sunset...), but the Web.hs diff in that commit only integrated sunrise/sunset guide lines via Weather.sunTimes and did not add brief weather UI.
  • Searched all history for Weather.getWeather usage in Web and found none.

Conclusion:

  • The weather widget appears to have never been wired in committed code; likely intended but incomplete in that commit.
🔄[human]InProgress → Review19 hours ago
🔄[human]Review → InProgress18 hours ago
💬[human]17 hours ago

Implemented weather wiring for Omni/Cal brief view.

What changed:

  • Wired weather cache lifecycle into cal app startup:
  • main now initializes Weather.newWeatherCache
  • mkApp now initializes Weather.newWeatherCache
  • app signature now carries Weather.WeatherCache and routes []/brief pass it through
  • briefPage now fetches weather via Weather.getWeather (today-only) and renders a weather section card.
  • Added brief weather UI rendering helpers:
  • briefWeather
  • renderWeatherPeriod
  • Added CSS styles for weather card/period chips in calStyles.

Verification:

  • typecheck.sh Omni/Cal/Web.hs
  • lint Omni/Cal/Web.hs
  • bild Omni/Cal/Web.hs
  • bild Omni/Web/Core.hs
  • runtime smoke test: started cal-web in tmux, requested /brief, verified Weather section and weather content present in rendered HTML.

Commit:

  • b0f5316f
🔄[human]InProgress → Review17 hours ago
🔄[human]Review → InProgress17 hours ago
💬[human]17 hours ago

Follow-up implemented for /brief weather day selection.

Request addressed:

  • When navigating to a future day (e.g. tomorrow), /brief now shows that day's forecast.
  • If no forecast exists for the selected day, the weather widget is omitted.

Code changes:

  • Omni/Cal/Weather.hs
  • Extended ForecastPeriod with fpStartTime (from NWS period startTime).
  • Increased parsed forecast horizon to 14 periods.
  • Omni/Cal/Web.hs
  • Always fetch weather once for /brief, then select display model by selected day.
  • Added day-specific weather card builder:
  • today => current conditions card
  • future day => forecast card built from periods whose startTime date matches selected day
  • past day or no matching periods => no weather card rendered

Validation:

  • typecheck.sh Omni/Cal/Web.hs
  • lint Omni/Cal/Web.hs Omni/Cal/Weather.hs
  • bild Omni/Cal/Web.hs
  • bild Omni/Web/Core.hs
  • smoke test (tmux + curl):
  • /brief?from=tomorrow => weather widget present
  • /brief?from=+30days => weather widget absent

Commit:

  • 37bc5a22
🔄[human]InProgress → Review17 hours ago