Refactored code, updated dependencies, and removed deprecated usage#396
Conversation
|
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 (1)
WalkthroughMigrates Compose components resources to a version-catalog entry, updates several build files and imports, removes an experimental Kotlin compiler opt-in, simplifies minor UI/control-flow logic, adjusts one icon and an Instant type import, adds a deprecation suppression, and fixes README markup/wording. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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)
core/presentation/src/jvmMain/kotlin/zed/rainxch/core/presentation/components/ScrollbarContainer.jvm.kt (1)
1-1: Narrow@file:Suppress("DEPRECATION")to specific function scopes.The file-level suppression hides all deprecation warnings in the file. Since the deprecated APIs (
LocalScrollbarStyle,VerticalScrollbar,rememberScrollbarAdapter,ScrollbarAdapter) are used only within the twoScrollbarContainerfunctions and theStaggeredGridScrollbarAdapterclass, move the suppression to those declarations to avoid masking unrelated future deprecations.Suggested refactor
-@file:Suppress("DEPRECATION") package zed.rainxch.core.presentation.components @@ -19,6 +19,7 @@ import androidx.compose.ui.unit.dp +@Suppress("DEPRECATION") `@Composable` actual fun ScrollbarContainer( listState: LazyListState, @@ -52,6 +53,7 @@ actual fun ScrollbarContainer( } +@Suppress("DEPRECATION") `@Composable` actual fun ScrollbarContainer( gridState: LazyStaggeredGridState, @@ -89,6 +91,7 @@ actual fun ScrollbarContainer( * Custom [ScrollbarAdapter] for [LazyStaggeredGridState] since Compose Desktop * does not provide a built-in [rememberScrollbarAdapter] overload for staggered grids. */ +@Suppress("DEPRECATION") private class StaggeredGridScrollbarAdapter( private val gridState: LazyStaggeredGridState, ) : ScrollbarAdapter {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@core/presentation/src/jvmMain/kotlin/zed/rainxch/core/presentation/components/ScrollbarContainer.jvm.kt` at line 1, The file-level suppression should be narrowed: remove `@file`:Suppress("DEPRECATION") and instead add `@Suppress`("DEPRECATION") directly on the two ScrollbarContainer function declarations and on the StaggeredGridScrollbarAdapter class where LocalScrollbarStyle, VerticalScrollbar, rememberScrollbarAdapter and ScrollbarAdapter are used, so only those scopes silence deprecation warnings and unrelated future deprecations remain visible.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt`:
- Line 25: Add the file-level opt-in for Kotlin experimental time APIs: insert
`@file`:OptIn(ExperimentalTime::class) at the very top of AppsRoot.kt and add an
import for kotlin.time.ExperimentalTime so usages of kotlin.time.Instant (used
around the logic that references Instant at lines where Instant is used) compile
without warnings; follow the same pattern as HomeRepositoryImpl.kt and
StarredReposRoot.kt by opting into ExperimentalTime at file level.
---
Nitpick comments:
In
`@core/presentation/src/jvmMain/kotlin/zed/rainxch/core/presentation/components/ScrollbarContainer.jvm.kt`:
- Line 1: The file-level suppression should be narrowed: remove
`@file`:Suppress("DEPRECATION") and instead add `@Suppress`("DEPRECATION") directly
on the two ScrollbarContainer function declarations and on the
StaggeredGridScrollbarAdapter class where LocalScrollbarStyle,
VerticalScrollbar, rememberScrollbarAdapter and ScrollbarAdapter are used, so
only those scopes silence deprecation warnings and unrelated future deprecations
remain visible.
🪄 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: 913da90e-201a-4f54-8a0c-390d904af7f8
📒 Files selected for processing (21)
README.mdbuild-logic/convention/src/main/kotlin/zed/rainxch/githubstore/convention/KotlinAndroid.ktcomposeApp/build.gradle.ktscore/presentation/build.gradle.ktscore/presentation/src/jvmMain/kotlin/zed/rainxch/core/presentation/components/ScrollbarContainer.jvm.ktfeature/apps/presentation/build.gradle.ktsfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.ktfeature/auth/presentation/build.gradle.ktsfeature/details/presentation/build.gradle.ktsfeature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/AppHeader.ktfeature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/SmartInstallButton.ktfeature/dev-profile/presentation/build.gradle.ktsfeature/favourites/presentation/build.gradle.ktsfeature/home/presentation/build.gradle.ktsfeature/profile/presentation/build.gradle.ktsfeature/recently-viewed/presentation/build.gradle.ktsfeature/search/presentation/build.gradle.ktsfeature/starred/presentation/build.gradle.ktsfeature/tweaks/presentation/build.gradle.ktsfeature/tweaks/presentation/src/commonMain/kotlin/zed/rainxch/tweaks/presentation/TweaksViewModel.ktgradle/libs.versions.toml
💤 Files with no reviewable changes (4)
- feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/AppHeader.kt
- build-logic/convention/src/main/kotlin/zed/rainxch/githubstore/convention/KotlinAndroid.kt
- feature/details/presentation/src/commonMain/kotlin/zed/rainxch/details/presentation/components/SmartInstallButton.kt
- feature/tweaks/presentation/src/commonMain/kotlin/zed/rainxch/tweaks/presentation/TweaksViewModel.kt
feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt
Show resolved
Hide resolved
|
Addressed the review feedback by adding the required ExperimentalTime opt-in. All checks are passing and the application runs successfully. |
|
@RudraYBedekar Changes look all good, thank you for your contribution, lets get it merged 🩵 |
This PR refactors the codebase by removing redundant conditions and unnecessary null checks, updates dependencies to the modern Compose version catalog, and eliminates deprecated APIs and configurations. These changes improve overall code quality, maintainability, and align the project with current Kotlin and Compose best practices. The project builds successfully and runs without issues after these updates.
Summary by CodeRabbit
Documentation
Refactor