Give FocusedStop a GeoPoint instead of loose lat/lon (#1949)#1950
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthrough
ChangesFocusedStop GeoPoint migration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bmander
force-pushed
the
focusedstop-geopoint-1949
branch
from
July 18, 2026 18:38
3ab1e7a to
0ef7a86
Compare
Follow-up to the GeoPoint reform (#1944): `FocusedStop` was the type its now-`GeoPoint`-carrying neighbours (`MapDirective.RecenterOnFocusedStop`, `ReportTarget.Location`, `StopReveal`) clustered around, but it still modeled position as two bare `Double`s — leaving a ring of wrap/unwrap churn. Replace `FocusedStop.lat`/`lon` with `point: GeoPoint`. This lets the carriers speak `GeoPoint` end-to-end: - `HomeViewModel` emits `RecenterOnFocusedStop(it.point)` (was re-wrapping `GeoPoint(it.lat, it.lon)`), and `HomeNavHost` builds the stop straight from `reveal.point` (was unwrapping it). - `ReportTarget.Stop` now sits consistently beside `ReportTarget.Location`. The construction/read sites that touch a genuine boundary keep their conversion there: Intent extras (`HomeActivity.fromIntent`), the persisted `home.focusedStop.lat`/`lon` keys (`CurrentFocusPersistence`), and `ReportLauncher.start(..., lat, lon)` — only the in-memory type changed; the persistence/extra keys are untouched. Stacked on #1948 (base `geopoint-reform-1944`); rebase to `main` once it lands. Verified: `compile{ObaGoogle,ObaMaplibre}DebugKotlin` + both test source sets compile with `-PwarningsAsErrors=true`; full `testObaGoogleDebugUnitTest` passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bmander
force-pushed
the
focusedstop-geopoint-1949
branch
from
July 18, 2026 18:41
0ef7a86 to
382992c
Compare
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.
Closes #1949.
Important
Stacked on #1948 — base branch is
geopoint-reform-1944, notmain. Review/merge #1948 first; I'll rebase this ontomainonce it lands (the diff below is only this change's commit).What
Follow-up to the GeoPoint reform. #1948 standardized the loose
(lat, lon)data-class carriers onGeoPoint, but deliberately stopped short of the type they all cluster around:FocusedStop, which still modeled position as two bareDoubles. That left a ring of wrap/unwrap churn around it.This replaces
FocusedStop.lat/lonwith a singlepoint: GeoPoint, so the carriers speakGeoPointend-to-end:HomeViewModelemitsRecenterOnFocusedStop(it.point)— was re-wrappingGeoPoint(it.lat, it.lon).HomeNavHostbuilds the stop straight fromreveal.point— was unwrapping it intoFocusedStop(..., reveal.point.latitude, reveal.point.longitude).ReportTarget.Stopnow sits consistently beside itsReportTarget.Location(point: GeoPoint)sibling.Boundaries kept (intentional)
The sites that read/write a genuine boundary keep their conversion there — only the in-memory type changed, the wire/persistence keys are untouched:
HomeActivity.fromIntent— from Intent extras (CENTER_LAT/LON)CurrentFocusPersistence— the persistedhome.focusedStop.lat/lonkeysReportLauncher.start(..., lat, lon)— Intent-extras launch (still unwrapsit.point.latitude/longitude)Verification
compileObaGoogleDebugKotlin+compileObaMaplibreDebugKotlin+ both test source sets compile with-PwarningsAsErrors=true.testObaGoogleDebugUnitTest(JVM) suite passes (the ~48FocusedStop(...)test constructions were updated).🤖 Generated with Claude Code
Summary by CodeRabbit