Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughRaised Android/Gradle toolchain and app versions; added an idle ApiResponse state and UI handling for it; added RouteRepository.clearLastRoute and made RouteViewModel explicitly clear/cancel when coordinates are missing; wired map marker clicks to a new onPlaceClick → beginRouteOptions → navigation flow; minor UI padding and manifest orientation/property changes. Changes
Sequence Diagram(s)sequenceDiagram
participant Marker as "Map Marker"
participant Home as "HomeScreen / UI"
participant HomeVM as "HomeViewModel"
participant Nav as "NavController"
participant RouteVM as "RouteViewModel"
participant Repo as "RouteRepository"
Marker->>Home: user taps marker
Home->>HomeVM: onPlaceClick(place)
HomeVM->>RouteVM: beginRouteOptions(place)
HomeVM->>Nav: navigateSingleTop(\"route\")
RouteVM->>RouteVM: compute start/end coords (nullable)
alt coords missing
RouteVM->>RouteVM: cancel fetchRouteJob
RouteVM->>Repo: clearLastRoute()
RouteVM-->>HomeVM: return (no fetch)
else coords present
RouteVM->>Repo: getRoute(start,end,arriveBy)
Repo-->>RouteVM: route response (Pending/Success/Error)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/build.gradle.kts (1)
45-53: ConsolidateECOSYSTEM_FLAGtodefaultConfigto eliminate duplication across build types.
ECOSYSTEM_FLAG=trueis currently set in three separate build types (ecosystem, debug, release), enabling ecosystem-related init-time fetches and UI inRouteRepository.kt(line 78),GymRepository.kt(line 72),EateryRepository.kt(line 29), andHomeScreen.kt(line 307). Moving the flag todefaultConfigavoids per-build-type drift and simplifies maintenance.♻️ Suggested consolidation
android { defaultConfig { applicationId = "com.cornellappdev.transit" minSdk = 26 targetSdk = 36 versionCode = 10 versionName = "2.0" + buildConfigField("boolean", "ECOSYSTEM_FLAG", "true") } buildTypes { create("ecosystem") { initWith(getByName("debug")) isDebuggable = true - buildConfigField("boolean", "ECOSYSTEM_FLAG", "true") signingConfig = signingConfigs.getByName("debug") } debug { - buildConfigField("boolean", "ECOSYSTEM_FLAG", "true") } release { - buildConfigField("boolean", "ECOSYSTEM_FLAG", "true") signingConfig = signingConfigs.getByName("debug") } } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/build.gradle.kts` around lines 45 - 53, Move the ECOSYSTEM_FLAG build config into the module's defaultConfig and remove the duplicated buildConfigField("boolean", "ECOSYSTEM_FLAG", "true") entries from each build type; specifically, add buildConfigField("boolean", "ECOSYSTEM_FLAG", "true") inside the existing defaultConfig block and delete the same calls from the ecosystem, debug and release buildType blocks so RouteRepository, GymRepository, EateryRepository and HomeScreen (which read BuildConfig.ECOSYSTEM_FLAG) use the single consolidated value.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/src/main/java/com/cornellappdev/transit/models/RouteRepository.kt`:
- Around line 117-119: In clearLastRoute(), stop emitting ApiResponse.Pending
(which RouteScreen treats as isRefreshing) and instead emit a non-loading
cleared state via _lastRouteFlow; e.g., emit ApiResponse.Idle or
ApiResponse.Empty (add this new sealed-case to ApiResponse if it doesn't exist)
so RouteScreen won’t show a refresh spinner—update clearLastRoute() to set
_lastRouteFlow.value = ApiResponse.Idle (or ApiResponse.Empty) and ensure any
consumers handle the new state.
---
Nitpick comments:
In `@app/build.gradle.kts`:
- Around line 45-53: Move the ECOSYSTEM_FLAG build config into the module's
defaultConfig and remove the duplicated buildConfigField("boolean",
"ECOSYSTEM_FLAG", "true") entries from each build type; specifically, add
buildConfigField("boolean", "ECOSYSTEM_FLAG", "true") inside the existing
defaultConfig block and delete the same calls from the ecosystem, debug and
release buildType blocks so RouteRepository, GymRepository, EateryRepository and
HomeScreen (which read BuildConfig.ECOSYSTEM_FLAG) use the single consolidated
value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e8705081-e404-4b4c-aefa-891a1347b617
📒 Files selected for processing (11)
app/build.gradle.ktsapp/release/app-release.aabapp/src/main/AndroidManifest.xmlapp/src/main/java/com/cornellappdev/transit/models/RouteRepository.ktapp/src/main/java/com/cornellappdev/transit/ui/components/home/AddFavoritesSearchSheet.ktapp/src/main/java/com/cornellappdev/transit/ui/components/home/HomeScreenMarkers.ktapp/src/main/java/com/cornellappdev/transit/ui/screens/HomeScreen.ktapp/src/main/java/com/cornellappdev/transit/ui/viewmodels/HomeViewModel.ktapp/src/main/java/com/cornellappdev/transit/ui/viewmodels/RouteViewModel.ktbuild.gradle.ktsgradle/wrapper/gradle-wrapper.properties
AndrewCheung360
left a comment
There was a problem hiding this comment.
Overall LGTM, just take a look at the coderabbit comments if they make snese.
Overview
Changes Made
Test Coverage
Screenshots (delete if not applicable)
Marker Functionality Demo
marker_demo.webm
Summary by CodeRabbit
New Features
Bug Fixes
Chores
Behavior