Skip to content

Fix compile errors in feature:tweaks:presentation post-merge#565

Merged
rainxchzed merged 1 commit into
mainfrom
fix/tweaks-presentation-immutable-deps
May 10, 2026
Merged

Fix compile errors in feature:tweaks:presentation post-merge#565
rainxchzed merged 1 commit into
mainfrom
fix/tweaks-presentation-immutable-deps

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented May 10, 2026

Why

After #559 (skip-version polish), #561 (downgrade detection), and #564 (text overflow) all landed on main, `./gradlew compileDebugKotlinAndroid` from `main` failed with three errors in `:feature:tweaks:presentation`. CI didn't catch this because each individual PR compiled fine in isolation — the regression only surfaced once all three were merged together.

Errors fixed

  1. SkippedUpdatesState.kt / SkippedUpdatesViewModel.kt — imported kotlinx.collections.immutable.ImmutableList, persistentListOf, and toImmutableList, but the module's build.gradle.kts had no dependency on kotlinx-collections-immutable. Eight unresolved-reference errors.

    • Fix: add implementation(libs.kotlinx.collections.immutable) to feature/tweaks/presentation/build.gradle.kts commonMain (the alias already exists in gradle/libs.versions.toml).
  2. SkippedUpdatesRoot.kt:96stringResource(Res.string.navigate_back) referenced without an explicit per-string import. compose-resources requires every string to be individually imported alongside the Res reference.

    • Fix: import zed.rainxch.githubstore.core.presentation.res.navigate_back.
  3. TweaksViewModel.onAction()when (action) missing the OnSkippedUpdatesClick branch. The composable handles the navigation, so the ViewModel branch is a no-op, but the compiler-promoted exhaustiveness check still requires it.

    • Fix: add a no-op TweaksAction.OnSkippedUpdatesClick -> { /* handled in composable */ } branch.

Verify

./gradlew compileDebugKotlinAndroid     # passes
./gradlew compileKotlinJvm              # passes

Only pre-existing warnings remain (Unnecessary safe call in DetailsViewModel.kt lines 510 + 1469) — unrelated.

Summary by CodeRabbit

  • New Features
    • Added navigation to a skipped updates screen, now accessible from the settings interface.

Review Change Stack

Three failures showed up after the skip-version + downgrade + text-overflow
PRs all landed:

1. SkippedUpdatesState/SkippedUpdatesViewModel imported
   kotlinx.collections.immutable.ImmutableList / persistentListOf /
   toImmutableList, but the module's build.gradle.kts didn't declare
   the dependency. Added libs.kotlinx.collections.immutable to
   commonMain.
2. SkippedUpdatesRoot used stringResource(Res.string.navigate_back)
   without an explicit import — kotlin-resources requires each string
   to be individually imported. Added the import.
3. TweaksViewModel.onAction() was missing the OnSkippedUpdatesClick
   branch, which the navigation screen handles in the composable. The
   exhaustive-when warning was promoted to an error. Added a no-op
   branch with a comment explaining the navigation lives in the UI.

./gradlew compileDebugKotlinAndroid now passes clean from main.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 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: d10af120-7d01-41c7-a74b-ce45d77e5552

📥 Commits

Reviewing files that changed from the base of the PR and between 8083c4d and 1ff8085.

📒 Files selected for processing (3)
  • feature/tweaks/presentation/build.gradle.kts
  • feature/tweaks/presentation/src/commonMain/kotlin/zed/rainxch/tweaks/presentation/TweaksViewModel.kt
  • feature/tweaks/presentation/src/commonMain/kotlin/zed/rainxch/tweaks/presentation/skipped/SkippedUpdatesRoot.kt

Walkthrough

This PR adds navigation support for a skipped-updates screen within the Tweaks feature. The changes introduce a new action handler in the ViewModel, add a dependency on immutable collections, and prepare resource imports for navigation UI elements.

Changes

Skipped Updates Navigation

Layer / File(s) Summary
Dependencies
feature/tweaks/presentation/build.gradle.kts
libs.kotlinx.collections.immutable is added as a commonMain implementation dependency.
Action Handler Wiring
feature/tweaks/presentation/src/commonMain/kotlin/zed/rainxch/tweaks/presentation/TweaksViewModel.kt
TweaksAction.OnSkippedUpdatesClick handler added to onAction with behavior delegated to the composable; no state mutations or side effects.
Resource Import Setup
feature/tweaks/presentation/src/commonMain/kotlin/zed/rainxch/tweaks/presentation/skipped/SkippedUpdatesRoot.kt
navigate_back resource imported from core presentation resources.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A hop through the tweaks, a click brings delight,
Skipped updates now flow with navigation so bright.
Immutable lists and imports align,
Composables dance in a UI design.
One action, one handler—let the journey begin!

🚥 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 PR's main objective: fixing compile errors in the feature:tweaks:presentation module after a multi-PR merge.
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/tweaks-presentation-immutable-deps

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.

@rainxchzed rainxchzed merged commit f46e20f into main May 10, 2026
1 check passed
@rainxchzed rainxchzed deleted the fix/tweaks-presentation-immutable-deps branch May 10, 2026 09:16
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