Skip to content

Conversation

@arkivanov
Copy link
Owner

@arkivanov arkivanov commented Dec 14, 2025

Follow-up to #958.

Summary by CodeRabbit

  • Bug Fixes
    • Improved page identity resolution for more accurate recomposition and state preservation in multi-page layouts.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 14, 2025

Walkthrough

The PR updates multiple overloads of the ChildPages function in ChildPages.kt, changing the default key selector parameter from Child<*, *>::keyHashString to Child<*, *>::key. This affects how child component keys are derived for pagination, with no other parameter or return type modifications.

Changes

Cohort / File(s) Summary
ChildPages key selector updates
extensions-compose/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/pages/ChildPages.kt
Changed default key selector from Child<*, *>::keyHashString to Child<*, *>::key across multiple ChildPages function overloads

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that all affected overloads are updated consistently with the new key selector default
  • Confirm the change from hash-based to identity-based key generation doesn't break existing use cases or recomposition behavior

Possibly related PRs

Poem

🐰 A key change, subtle yet grand,
From hash to truth, we now take a stand.
Identity flows through pages anew,
Recomposition dances—crisp, clean, and true!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title claims to add docs for ChildPages composable functions, but the actual changes modify the default key selector parameter from keyHashString to key—no documentation additions are present in the changeset. Update the title to reflect the actual change, such as 'Change ChildPages default key selector to Child.key' or add documentation changes to match the stated title.
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ChildPages-docs

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7eade5 and 5dc0985.

📒 Files selected for processing (1)
  • extensions-compose/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/pages/ChildPages.kt (6 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: arkivanov
Repo: arkivanov/Decompose PR: 954
File: decompose/src/commonMain/kotlin/com/arkivanov/decompose/router/children/ChildrenNavigator.kt:38-44
Timestamp: 2025-11-09T18:14:31.048Z
Learning: The Child.key property in Decompose is marked with ExperimentalDecomposeApi, so changes to its runtime value (e.g., from configuration to ItemKey) are acceptable breaking changes within the experimental API surface.
📚 Learning: 2025-11-09T18:14:31.048Z
Learnt from: arkivanov
Repo: arkivanov/Decompose PR: 954
File: decompose/src/commonMain/kotlin/com/arkivanov/decompose/router/children/ChildrenNavigator.kt:38-44
Timestamp: 2025-11-09T18:14:31.048Z
Learning: The Child.key property in Decompose is marked with ExperimentalDecomposeApi, so changes to its runtime value (e.g., from configuration to ItemKey) are acceptable breaking changes within the experimental API surface.

Applied to files:

  • extensions-compose/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/pages/ChildPages.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build on macOS
  • GitHub Check: Build on Linux
🔇 Additional comments (1)
extensions-compose/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/pages/ChildPages.kt (1)

21-34: Excellent documentation additions!

The KDoc is comprehensive, well-structured, and includes helpful cross-references to related navigation types. The documentation clearly explains the purpose of each parameter and how they integrate with the Decompose navigation model.


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.

@arkivanov arkivanov merged commit 5c4742b into master Dec 14, 2025
3 checks passed
@arkivanov arkivanov deleted the ChildPages-docs branch December 14, 2025 19:33
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.

2 participants