Skip to content

Refactor: migrate saved locations and place search to new :feature:fi…#208

Merged
bosankus merged 2 commits into
developfrom
feat/migrate-saved-location-to-new-finder-kmp
Jul 4, 2026
Merged

Refactor: migrate saved locations and place search to new :feature:fi…#208
bosankus merged 2 commits into
developfrom
feat/migrate-saved-location-to-new-finder-kmp

Conversation

@bosankus

@bosankus bosankus commented Jul 4, 2026

Copy link
Copy Markdown
Owner

What was changed?

This commit extracts the saved locations and place search functionality from the app and common-ui modules into a dedicated Kotlin Multiplatform (KMP) feature module.

  • Module Creation & Restructuring:
    • Created :feature:finder as a KMP module supporting Android and iOS.
    • Moved SavedLocationsScreen and PlaceSearchDialog from :common-ui to the new module.
    • Relocated domain logic (UseCases) and data mapping logic from the app module to :feature:finder.
    • Updated README.md and module diagrams to include the new architecture.
  • ViewModel & State Management:
    • Offloaded location management and search logic from MainViewModel to feature-specific SavedLocationsViewModel and PlaceSearchViewModel.
    • Implemented an MVI-style pattern with Intent, State, and Effect for the finder feature.
    • Introduced SavedLocationsFinderRoute as the public entry point for the feature, utilizing internal ViewModels.
  • Dependency Injection & Setup:
    • Migrated location-related DI from Hilt to Koin within the finder module.
    • Introduced finderDomainModule and finderViewModelModule Koin modules.
    • Wrapped AppContent in KoinContext in MainActivity to support Multiplatform ViewModel resolution via koinViewModel().
  • Code Cleanup:
    • Removed unused device metadata and Firebase utility methods from Extension.kt.
    • Deleted deprecated SavedLocationsUseCase and SearchPlacesUseCase from the app module.
    • Cleaned up unused kotlinx-datetime dependency in :feature:payment.
    • Simplified AppNavigation by delegating location UI state to the new finder route.

…nder KMP module

This commit extracts the saved locations and place search functionality from the `app` and `common-ui` modules into a dedicated Kotlin Multiplatform (KMP) feature module.

- **Module Creation & Restructuring:**
    - Created `:feature:finder` as a KMP module supporting Android and iOS.
    - Moved `SavedLocationsScreen` and `PlaceSearchDialog` from `:common-ui` to the new module.
    - Relocated domain logic (UseCases) and data mapping logic from the `app` module to `:feature:finder`.
    - Updated `README.md` and module diagrams to include the new architecture.
- **ViewModel & State Management:**
    - Offloaded location management and search logic from `MainViewModel` to feature-specific `SavedLocationsViewModel` and `PlaceSearchViewModel`.
    - Implemented an MVI-style pattern with `Intent`, `State`, and `Effect` for the finder feature.
    - Introduced `SavedLocationsFinderRoute` as the public entry point for the feature, utilizing `internal` ViewModels.
- **Dependency Injection & Setup:**
    - Migrated location-related DI from Hilt to Koin within the finder module.
    - Introduced `finderDomainModule` and `finderViewModelModule` Koin modules.
    - Wrapped `AppContent` in `KoinContext` in `MainActivity` to support Multiplatform ViewModel resolution via `koinViewModel()`.
- **Code Cleanup:**
    - Removed unused device metadata and Firebase utility methods from `Extension.kt`.
    - Deleted deprecated `SavedLocationsUseCase` and `SearchPlacesUseCase` from the `app` module.
    - Cleaned up unused `kotlinx-datetime` dependency in `:feature:payment`.
    - Simplified `AppNavigation` by delegating location UI state to the new finder route.
@bosankus bosankus self-assigned this Jul 4, 2026
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@bosankus, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 627ec2a6-03db-4763-8fcb-229ae381f833

📥 Commits

Reviewing files that changed from the base of the PR and between e479fdd and bb54f03.

📒 Files selected for processing (39)
  • README.md
  • app/build.gradle.kts
  • app/src/main/java/bose/ankush/weatherify/WeatherifyApplication.kt
  • app/src/main/java/bose/ankush/weatherify/base/common/Extension.kt
  • app/src/main/java/bose/ankush/weatherify/di/NetworkModule.kt
  • app/src/main/java/bose/ankush/weatherify/domain/use_case/SavedLocationsUseCase.kt
  • app/src/main/java/bose/ankush/weatherify/domain/use_case/SearchPlacesUseCase.kt
  • app/src/main/java/bose/ankush/weatherify/presentation/MainActivity.kt
  • app/src/main/java/bose/ankush/weatherify/presentation/MainViewModel.kt
  • app/src/main/java/bose/ankush/weatherify/presentation/navigation/AppNavigation.kt
  • app/src/main/java/bose/ankush/weatherify/presentation/strings/SavedLocationsScreenStrings.kt
  • feature/finder/build.gradle.kts
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/data/mapper/LocationMapper.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/data/repository/FinderRepositoryImpl.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/data/usecase/DeleteLocationUseCaseImpl.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/data/usecase/GetSavedLocationsUseCaseImpl.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/data/usecase/SaveLocationUseCaseImpl.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/data/usecase/SearchPlacesUseCaseImpl.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/di/FinderModule.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/domain/model/Location.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/domain/model/LocationSuggestion.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/domain/repository/FinderRepository.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/domain/usecase/DeleteLocationUseCase.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/domain/usecase/GetSavedLocationsUseCase.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/domain/usecase/SaveLocationUseCase.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/domain/usecase/SearchPlacesUseCase.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/placesearch/PlaceSearchIntent.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/placesearch/PlaceSearchState.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/placesearch/PlaceSearchViewModel.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/savedlocations/PlaceSearchDialog.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/savedlocations/SavedLocationsEffect.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/savedlocations/SavedLocationsFinderRoute.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/savedlocations/SavedLocationsIntent.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/savedlocations/SavedLocationsScreen.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/savedlocations/SavedLocationsState.kt
  • feature/finder/src/commonMain/kotlin/bose/ankush/finder/presentation/savedlocations/SavedLocationsViewModel.kt
  • feature/payment/build.gradle.kts
  • gradle/libs.versions.toml
  • settings.gradle.kts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/migrate-saved-location-to-new-finder-kmp

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Test Results

4 tests   4 ✅  6s ⏱️
2 suites  0 💤
2 files    0 ❌

Results for commit bb54f03.

@bosankus bosankus merged commit f9f0980 into develop Jul 4, 2026
5 checks passed
@bosankus bosankus deleted the feat/migrate-saved-location-to-new-finder-kmp branch July 5, 2026 09:35
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