feat: delete locations and populate all weather dashboard titles - #14
Open
lcchin wants to merge 3 commits into
Open
feat: delete locations and populate all weather dashboard titles#14lcchin wants to merge 3 commits into
lcchin wants to merge 3 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements two features:
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.
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