Weather: manual location setting with city search (fixes #177) - #187
Open
starbrightlab wants to merge 1 commit into
Open
Weather: manual location setting with city search (fixes #177)#187starbrightlab wants to merge 1 commit into
starbrightlab wants to merge 1 commit into
Conversation
Weather location came from IP geolocation, resolved once and cached forever
with no override and no refresh — so when the ISP's exit node geolocated to
the wrong city (common), the weather chip, forecast widget, sunrise/sunset
times, and ISS passes were all permanently wrong with no way to correct them.
- Weather gains a manual override (manual_lat/lon/city in the existing
immortal_weather prefs) that takes precedence over the auto cache in
location() and cachedCity(); redetectAutomatically() clears both the
override and the cached IP answer so re-detection starts from scratch.
- City search via Open-Meteo's keyless geocoding API (matches the house
no-keys rule); the response parse is pure and unit-tested.
- WeatherLocationActivity: search field + result rows + "Detect automatically
instead", mirroring the AlbumUrlEntryActivity look. Registered per the
settings rules as a NavSpec row ("Weather location") in the immortal
domain, next to the temperature-unit setting.
No persisted registry fields added (NavSpec navigates only), so the domain
tripwires are untouched. Full unit suite green.
Co-Authored-By: Claude Fable 5 <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.
Problem (issue #177)
Weather location comes from IP geolocation, resolved once and cached forever, with no override and no refresh. When the ISP's exit node geolocates to the wrong city (common), the weather chip, forecast widget, sunrise/sunset times, and ISS passes are all permanently wrong with nothing the user can do about it.
Fix
Weather:manual_lat/lon/cityin the existingimmortal_weatherprefs, taking precedence over the auto cache inlocation()andcachedCity().redetectAutomatically()clears both the override and the cached IP answer, so re-detection starts from scratch instead of reviving a stale first answer.WeatherLocationActivity: search field, tappable result rows ("Boston, Massachusetts, US"), a "Detect automatically instead" action that re-resolves and shows what it found, and Done. Mirrors theAlbumUrlEntryActivitylook and thetvFocusableinteraction pattern.NavSpecrow ("Weather location") in theimmortaldomain next to the temperature unit, showing the pinned place or "Auto: " as its value. No persisted registry fields added (NavSpec navigates only), so the domain tripwires are untouched.Testing
Fixes #177.
🤖 Generated with Claude Code