Skip to content

Ask once which country the places nearby are in - #1082

Merged
davecraig merged 2 commits into
Scottish-Tech-Army:mainfrom
davecraig:main
Sep 12, 2026
Merged

davecraig merged 2 commits into
Scottish-Tech-Army:mainfrom
davecraig:main

Conversation

@davecraig

Copy link
Copy Markdown
Contributor

process() looked the country up from each place's own coordinates, once for the address's fallback country code and again inside japaneseAddress(), and each of those is an R-tree query over the country boundaries plus a point-in-polygon test for every candidate. filterLocations() builds fresh LocationDescriptions on every uiState change - roughly once a second while the screen is open - so the whole visible list was re-resolved that often.

Everything in the list is within a grid of the user and so in the same country they are, so PlacesNearbyViewModel looks it up from their own location and carries it in the ui state for the rows to share. It only asks again once they have moved 5km, which a country is not something you do by accident.

process() takes that as an optional argument and falls back to the feature's own location without one, which is what a search result on the other side of the world needs. japaneseAddress() takes it as a lambda rather than a value so a feature with no quarter or neighbourhood still short-circuits before the lookup.

Near a border a place a few hundred metres over the line is now written the way the user's side writes addresses rather than its own. For a list of what's nearby that's the better answer, and the only behaviour this changes.

Claude-Session: https://claude.ai/code/session_01THRgoVbh1G3pVacd7csDqJ

process() looked the country up from each place's own coordinates, once for the
address's fallback country code and again inside japaneseAddress(), and each of
those is an R-tree query over the country boundaries plus a point-in-polygon test
for every candidate. filterLocations() builds fresh LocationDescriptions on every
uiState change - roughly once a second while the screen is open - so the whole
visible list was re-resolved that often.

Everything in the list is within a grid of the user and so in the same country
they are, so PlacesNearbyViewModel looks it up from their own location and
carries it in the ui state for the rows to share. It only asks again once they
have moved 5km, which a country is not something you do by accident.

process() takes that as an optional argument and falls back to the feature's own
location without one, which is what a search result on the other side of the
world needs. japaneseAddress() takes it as a lambda rather than a value so a
feature with no quarter or neighbourhood still short-circuits before the lookup.

Near a border a place a few hundred metres over the line is now written the way
the user's side writes addresses rather than its own. For a list of what's nearby
that's the better answer, and the only behaviour this changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgoVbh1G3pVacd7csDqJ
ef4feb9 added --configure-on-demand to the ios-build and ios-firebase jobs
in build-app.yaml, but nightly.yaml has its own copy of the same
:shared:compileTestKotlinIosSimulatorArm64 step and was left as it was, so
the nightly iOS build still fails on the self-hosted Mac:

  * What went wrong:
  A problem occurred configuring project ':app'.
  > java.lang.NullPointerException (no error message)

which is AGP's NdkLocator dereferencing a null File.list() on
$ANDROID_HOME/ndk. Same flag, same reason: this job only needs :shared.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THRgoVbh1G3pVacd7csDqJ
@davecraig
davecraig merged commit 8729bbd into Scottish-Tech-Army:main Sep 12, 2026
4 checks passed
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