Skip to content

feat: delete locations and populate all weather dashboard titles - #14

Open
lcchin wants to merge 3 commits into
AISG-AIAP:mainfrom
lcchin:main
Open

feat: delete locations and populate all weather dashboard titles#14
lcchin wants to merge 3 commits into
AISG-AIAP:mainfrom
lcchin:main

Conversation

@lcchin

@lcchin lcchin commented Jun 15, 2026

Copy link
Copy Markdown

Implements two features:

  1. Delete location — adds DELETE /api/locations/:id endpoint, wires up
    deleteLocation() in db.ts and the router, exposes deletingId state and
    deleteLocation action in the frontend store, and renders a close button
    on each SidebarCard with optimistic selection fallback. Two new tests
    cover the delete path.

  2. Complete weather data fetching — getCurrentWeather() previously only
    called the 2-hr forecast endpoint, leaving temperature, humidity,
    rainfall, wind, UV, air quality, 24-hr forecast periods, and 4-day
    forecast all null. It now fans out to all ten data.gov.sg endpoints in
    parallel via Promise.allSettled(), merging successful results into the
    snapshot so every dashboard tile and the hero card render real data.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Chin and others added 3 commits June 15, 2026 11:16
Implements two features:

1. Delete location — adds DELETE /api/locations/:id endpoint, wires up
   deleteLocation() in db.ts and the router, exposes deletingId state and
   deleteLocation action in the frontend store, and renders a close button
   on each SidebarCard with optimistic selection fallback. Two new tests
   cover the delete path.

2. Complete weather data fetching — getCurrentWeather() previously only
   called the 2-hr forecast endpoint, leaving temperature, humidity,
   rainfall, wind, UV, air quality, 24-hr forecast periods, and 4-day
   forecast all null. It now fans out to all ten data.gov.sg endpoints in
   parallel via Promise.allSettled(), merging successful results into the
   snapshot so every dashboard tile and the hero card render real data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a dedicated Condition tile to the dashboard tile grid. The tile
displays the nearest-area weather condition string, area name, and
valid period sourced from the existing two-hr-forecast snapshot fields
(condition, area, valid_period_text) that were already being fetched
and persisted.

The icon adapts to the condition: SunIcon for fair/sunny/clear
conditions, MoonIcon for night conditions, and CloudIcon as the
default. The tile spans two columns to match the Air Quality and
Wind tiles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a MapCard component showing all saved locations as glassmorphism
pins on a dark Carto map. Expands to fullscreen; clicking a pin
selects that location. Wires Vite dev proxy so /api reaches the backend.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant