fix(details): platform chip opens filtered Search#597
Conversation
There was a problem hiding this comment.
rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughPlatform chips in repository details now become clickable to filter search results by the selected platform. The search route is refactored to carry an optional initial platform, the details feature dispatches platform-chip clicks as actions, and the search view model applies the initial platform during initialization. Navigation and DI wiring thread the platform through the system. ChangesPlatform-filtered search from repository details
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/NavigationUtils.kt`:
- Line 12: The Search tab selection breaks because BottomNavigation compares
item.screen == currentScreen using data class equality which includes
parameters; update the selection logic in BottomNavigation (references:
BottomNavigation.kt selection checks around lines where item.screen ==
currentScreen is used) to compare only the screen identity without parameters —
e.g., compare screen::class (item.screen::class == currentScreen::class) or
compare the base route string (strip query/args from getCurrentScreen() or use
NavigationUtils route name) so SearchScreen(initialPlatform=Github) matches the
tab defined as SearchScreen().
In
`@feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/AppHeader.kt`:
- Line 75: The onPlatformClick default lambda makes chips always appear
clickable even when no action is intended; change the parameter type in
AppHeader from onPlatformClick: (DiscoveryPlatform) -> Unit = {} to a nullable
handler onPlatformClick: ((DiscoveryPlatform) -> Unit)? = null, update the chip
rendering to only add a clickable modifier or onClick when onPlatformClick !=
null, and update call sites (e.g., where chips are created around the code
referenced at the previous call sites) to pass null when no action is intended
instead of relying on the no-op lambda so the UI correctly shows non-interactive
chips.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: dddf8fd2-bd52-46c5-adf6-3ccff932c79f
📒 Files selected for processing (27)
composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/Main.ktcomposeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/di/ViewModelsModule.ktcomposeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/AppNavigation.ktcomposeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigationUtils.ktcomposeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/GithubStoreGraph.ktcomposeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/NavigationUtils.ktcore/presentation/src/commonMain/composeResources/files/whatsnew/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/ar/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/bn/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/es/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/fr/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/hi/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/it/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/ja/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/ko/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/pl/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/ru/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/tr/18.jsoncore/presentation/src/commonMain/composeResources/files/whatsnew/zh-CN/18.jsoncore/presentation/src/commonMain/kotlin/zed/rainxch/core/presentation/components/RepositoryCard.ktfeature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsAction.ktfeature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsRoot.ktfeature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsViewModel.ktfeature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/AppHeader.ktfeature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/sections/Header.ktfeature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/SearchViewModel.ktfeature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/mappers/SearchPlatformMappers.kt
There was a problem hiding this comment.
rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Sprint 3 Task 12. Platform chips on Details were no-op. Now navigate to Search pre-filtered.
Wiring
PlatformChipaccepts optionalonClick.DetailsAction.OnPlatformChipClick(platform)→onNavigateToSearchByPlatform.SearchScreenroute nowdata classwithinitialPlatform.SearchViewModelapplies on first start via Koin params.Test plan
18.jsonvalidSource: UnFaakin Real email.
Summary by CodeRabbit
Bug Fixes
New Features
Documentation