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 (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds Room DB migration v8→v9 adding Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as AppsScreen
participant VM as AppsViewModel
participant Repo as InstalledAppsRepository
participant DB as AppDatabase
participant PM as PackageManager
User->>UI: open apps screen / select sort
UI->>VM: dispatch AppsAction.OnSortRuleSelected
VM->>VM: update state.sortRule, filterApps()
VM->>Repo: request apps (sorted)
Repo->>DB: query installed_apps (includes latestReleasePublishedAt)
DB-->>Repo: rows with latestReleasePublishedAt
Repo-->>VM: domain models (with latestReleasePublishedAt)
VM-->>UI: ui models list (sorted using latestReleasePublishedAt / lastUpdatedAt / name)
UI->>PM: (Android) resolve app icon by packageName for each item
PM-->>UI: app icon bitmap or NameNotFound -> UI uses drawable fallback
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
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: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@core/presentation/src/commonMain/composeResources/values/strings.xml`:
- Line 264: The string resource install_permission_blocked_message contains a
malformed apostrophe ("doesn't\'t") that will render as "doesn't't"; update the
value for install_permission_blocked_message to use a single correct apostrophe
or proper XML escaping (e.g., "doesn't" or ') so the message reads: "The
APK was downloaded successfully but this device doesn't allow direct
installation. Would you like to open it with an external installer?".
In
`@feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.kt`:
- Around line 911-939: The code currently uses
latestReleasePublishedAt?.take(10) which returns the UTC day substring and falls
back to lastUpdatedAt; instead parse latestReleasePublishedAt through the same
local-time path and only show a date when a parsed local date exists and
latestReleasePublishedAt is non-null. Update buildVersionLabel to stop using
take(10) and call a new helper (or overload formatEpochDate) that converts an
ISO timestamp String -> Instant ->
toLocalDateTime(TimeZone.currentSystemDefault()).date.toString(), and keep the
existing formatEpochDate(Long) for lastUpdatedAt but do NOT use lastUpdatedAt as
a fallback for the release date; if latestReleasePublishedAt is null or fails to
parse, hide the date.
In
`@feature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsViewModel.kt`:
- Around line 363-379: The comparator always prefixes updatesFirst (defined in
appComparator) so AppSortRule.Name and AppSortRule.RecentlyUpdated never become
the primary sort; change appComparator to apply updatesFirst only for the
AppSortRule.UpdatesFirst branch and for AppSortRule.RecentlyUpdated and
AppSortRule.Name return comparators that start with their intended primary key
(e.g., lastUpdatedAt or appName.lowercase()) and only optionally call thenBy/on
updatesFirst if you truly want updateable apps secondary; update the when
branches for AppSortRule.RecentlyUpdated and AppSortRule.Name to not reuse the
updatesFirst comparator as the head.
🪄 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: 53ff5145-2e5d-46a7-82f3-7db9ec687d43
📒 Files selected for processing (23)
.gradle-local/wrapper/dists/gradle-8.14.3-bin/cv11ve7ro1n3o1j4so8xd9n66/gradle-8.14.3-bin.zip.lck.gradle-local/wrapper/dists/gradle-8.14.3-bin/cv11ve7ro1n3o1j4so8xd9n66/gradle-8.14.3-bin.zip.partcore/data/schemas/zed.rainxch.core.data.local.db.AppDatabase/9.jsoncore/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/initDatabase.ktcore/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_8_9.ktcore/data/src/commonMain/kotlin/zed/rainxch/core/data/local/db/AppDatabase.ktcore/data/src/commonMain/kotlin/zed/rainxch/core/data/local/db/dao/InstalledAppDao.ktcore/data/src/commonMain/kotlin/zed/rainxch/core/data/local/db/entities/InstalledAppEntity.ktcore/data/src/commonMain/kotlin/zed/rainxch/core/data/mappers/InstalledAppsMappers.ktcore/data/src/commonMain/kotlin/zed/rainxch/core/data/repository/InstalledAppsRepositoryImpl.ktcore/domain/src/commonMain/kotlin/zed/rainxch/core/domain/model/InstalledApp.ktcore/presentation/src/commonMain/composeResources/values/strings.xmlfeature/apps/presentation/build.gradle.ktsfeature/apps/presentation/src/androidMain/kotlin/zed/rainxch/apps/presentation/components/InstalledAppIcon.android.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsAction.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsRoot.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsState.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/AppsViewModel.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/components/InstalledAppIcon.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/mappers/InstalledAppMapper.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/model/AppSortRule.ktfeature/apps/presentation/src/commonMain/kotlin/zed/rainxch/apps/presentation/model/InstalledAppUi.ktfeature/apps/presentation/src/jvmMain/kotlin/zed/rainxch/apps/presentation/components/InstalledAppIcon.jvm.kt
Summary by CodeRabbit
New Features
Bug Fixes
Chores