Reviewed shared/weather.ts and Web/mobile weather components at membership revision ef8c6cd. Twelve mocked scenarios were rerun; live geolocation providers were not called in these checks.
Location is one way to choose a city
The interface supports shortcuts, city search and location. When the user manually selects a city while GPS is pending, that selection should remain authoritative. load() increments locationGeneration, so a late device or network result cannot replace the new city.
Keeping an old temperature on screen while changing the city can imply that the temperature belongs to the new location. The current load path clears weather data first and shows a loading state, then renders the returned result.
Expose the source and precision
The reviewed logic accepts finite device coordinates within geographic ranges and device accuracy no worse than 5,000 metres. Otherwise it tries a network estimate. This is a project threshold for nearby weather, not a general rule for attendance, delivery or emergency services.
Network location can follow a VPN exit or a carrier address. The UI labels it as an estimate, identifies ipwho.is and leaves manual city selection available. Location success and weather-data success are separate outcomes: locate() starts load() without awaiting the weather request.
Handle typing before the response returns
The search watcher invalidates old results synchronously as the query changes. find() checks a separate search generation before writing results, errors or loading state. This covers the case where a user types a new term but has not submitted the next search yet.
The 12 passing fixtures cover reversed response order, short queries, typing during a request, search failure, permission or accuracy fallback, device versus network choice, late positioning after manual selection, location failure and unmount. They validate application choices with mocked inputs.
Next checks need the real platforms
The remaining work is to observe timeouts and permission changes on actual devices, validate the server response shape, and show data age when the provider is slow. A typed return value alone does not guarantee a current observation or a valid daily forecast array.
Sources & further reading
Compiled from code and documents, with AI-assisted drafting and translation. Examples and proposed checks are learning material; only linked evidence establishes what was run.