Skip to content

fix(details): platform chip opens filtered Search#597

Merged
rainxchzed merged 3 commits into
mainfrom
fix/android-category-nav
May 14, 2026
Merged

fix(details): platform chip opens filtered Search#597
rainxchzed merged 3 commits into
mainfrom
fix/android-category-nav

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented May 14, 2026

Sprint 3 Task 12. Platform chips on Details were no-op. Now navigate to Search pre-filtered.

Wiring

  • PlatformChip accepts optional onClick.
  • DetailsAction.OnPlatformChipClick(platform)onNavigateToSearchByPlatform.
  • SearchScreen route now data class with initialPlatform.
  • SearchViewModel applies on first start via Koin params.

Test plan

  • Android + JVM compile clean
  • 13 18.json valid
  • Real-device: tap Android chip → Search opens with Android filter

Source: UnFaakin Real email.

Summary by CodeRabbit

  • Bug Fixes

    • Platform chips in repository details are now interactive and open Search filtered by the selected platform.
  • New Features

    • Search now accepts an initial platform filter when opened from repository details or other navigation points.
  • Documentation

    • "What's New" release notes updated across locales to mention the platform-chip → Search fix.

Review Change Stack

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fa72520e-9d7d-4414-adaf-2cf87aa9a4e0

📥 Commits

Reviewing files that changed from the base of the PR and between 49b2216 and 668b697.

📒 Files selected for processing (2)
  • composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt
  • feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/AppHeader.kt

Walkthrough

Platform 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.

Changes

Platform-filtered search from repository details

Layer / File(s) Summary
Search route parameterization
composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/GithubStoreGraph.kt
SearchScreen converts from a singleton data object to a data class with an optional initialPlatform: SearchPlatformUi? = null parameter, enabling typed routing of the selected platform.
Details platform chip click handling
feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsAction.kt, DetailsRoot.kt, DetailsViewModel.kt, components/AppHeader.kt, components/sections/Header.kt, core/presentation/src/commonMain/kotlin/zed/rainxch/core/presentation/components/RepositoryCard.kt
New OnPlatformChipClick action carries the selected platform; PlatformChip accepts an optional onClick callback; AppHeader and Header wire click handlers that dispatch the action; DetailsRoot accepts and handles onNavigateToSearchByPlatform callback.
Search initialization with initial platform
feature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/SearchViewModel.kt, mappers/SearchPlatformMappers.kt
SearchViewModel constructor accepts optional initialPlatform and applies it to selectedSearchPlatform during onStart; new DiscoveryPlatform.toSearchPlatformUi() mapper converts domain platforms to search UI representation.
Navigation and DI wiring
composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/di/ViewModelsModule.kt, app/navigation/AppNavigation.kt, app/navigation/BottomNavigationUtils.kt, app/navigation/NavigationUtils.kt, Main.kt, app/navigation/BottomNavigation.kt
ViewModelsModule registers SearchViewModel with a parameter-aware factory extracting initialPlatform from Koin; AppNavigation routes SearchScreen to SearchRoot with typed args and Koin parameter injection; Home, BottomNavigation, Main, and NavigationUtils updated to use SearchScreen() constructor form and class-based matching.
Release notes across locales
core/presentation/src/commonMain/composeResources/files/whatsnew/*/18.json
Multi-language whatsnew JSON files (13 locales: English, Arabic, Bengali, Spanish, French, Hindi, Italian, Japanese, Korean, Polish, Russian, Turkish, Chinese) updated with a FIXED section describing the platform-chip-to-filtered-search behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A chip nudged, a search begins,
A platform hop, and filters spin,
Routes carry badges, params in tow,
Details and Search in gentle flow,
Hopping results appear below.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enabling platform chips on the Details screen to open filtered Search results, which is the core functionality delivered across all modified files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/android-category-nav

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ec584cf and 49b2216.

📒 Files selected for processing (27)
  • composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/Main.kt
  • composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/di/ViewModelsModule.kt
  • composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/AppNavigation.kt
  • composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigationUtils.kt
  • composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/GithubStoreGraph.kt
  • composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/NavigationUtils.kt
  • core/presentation/src/commonMain/composeResources/files/whatsnew/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/ar/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/bn/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/es/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/fr/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/hi/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/it/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/ja/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/ko/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/pl/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/ru/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/tr/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/zh-CN/18.json
  • core/presentation/src/commonMain/kotlin/zed/rainxch/core/presentation/components/RepositoryCard.kt
  • feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsAction.kt
  • feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsRoot.kt
  • feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/DetailsViewModel.kt
  • feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/AppHeader.kt
  • feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/sections/Header.kt
  • feature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/SearchViewModel.kt
  • feature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/mappers/SearchPlatformMappers.kt

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@rainxchzed rainxchzed merged commit 8db46e9 into main May 14, 2026
1 check passed
@rainxchzed rainxchzed deleted the fix/android-category-nav branch May 14, 2026 12:49
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