Conversation
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
WalkthroughThe WASM sample app is enhanced with version-managed BuildConfig and a new Browser utility object for browser-to-NavController synchronization. The CI/CD deployment workflow is updated to target the sample app-wasm instead of the example composeApp. Main composition simplified to use Browser.bind() and version from BuildConfig. Changes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ 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
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/wasm_deploy.ymlsample/app-wasm/build.gradle.ktssample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/Browser.ktsample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/main.kt
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-12-22T11:53:21.126Z
Learnt from: vkatz
Repo: ComposeGears/Tiamat PR: 320
File: sample/app-android/build.gradle.kts:33-42
Timestamp: 2025-12-22T11:53:21.126Z
Learning: In Kotlin DSL build scripts (e.g., build.gradle.kts) for projects using Kotlin 2.3.0 with Hilt, add ksp("org.jetbrains.kotlin:kotlin-metadata-jvm:2.3.0") as a temporary workaround until Dagger/Hilt updates their shaded kotlinx-metadata-jvm library to support Kotlin 2.3.0. This follows the recommendation documented in the Dagger issue tracker.
Applied to files:
sample/app-wasm/build.gradle.kts
📚 Learning: 2025-12-22T11:53:13.202Z
Learnt from: vkatz
Repo: ComposeGears/Tiamat PR: 320
File: sample/shared/src/commonMain/kotlin/composegears/tiamat/sample/App.kt:52-55
Timestamp: 2025-12-22T11:53:13.202Z
Learning: In sample/ code, KDoc/documentation is not required for Kotlin sample/demo files. Prioritize simplicity over exhaustive documentation. During reviews, apply this guideline to files under the sample/ directory unless the documentation is necessary for public API clarity or critical usage scenarios.
Applied to files:
sample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/Browser.ktsample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/main.kt
🧬 Code graph analysis (1)
sample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/main.kt (1)
sample/shared/src/commonMain/kotlin/composegears/tiamat/sample/App.kt (1)
App(23-50)
🔇 Additional comments (6)
sample/app-wasm/build.gradle.kts (2)
8-8: LGTM! BuildConfig plugin added.The plugin addition is appropriate for generating build-time configuration.
33-38: Thetiamat.versions.tiamat.get()accessor is properly defined. Thetiamatversion catalog is explicitly registered insettings.gradle.ktsand sources its versions fromgradle/tiamat.toml, which contains thetiamatversion entry. This is a deliberate architectural choice to maintain a separate version catalog for project-specific versions alongside the standardlibscatalog. The code is correct as-is..github/workflows/wasm_deploy.yml (1)
25-25: LGTM! Deployment correctly targets the renovated sample app.The workflow now builds and deploys the sample app-wasm instead of the example composeApp, aligning with the PR objectives.
Also applies to: 30-30
sample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/main.kt (1)
17-17: Excellent refactoring! Code is now cleaner and more maintainable.The changes successfully:
- Delegate browser navigation/history management to the
Browserobject- Replace hardcoded version strings with
BuildConfig.TIAMAT_VERSION- Simplify the main composition logic
This refactoring significantly improves code organization and reduces duplication.
Also applies to: 24-26, 35-35
sample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/Browser.kt (2)
19-33: LGTM! Navigation binding logic is sound.The
bind()method correctly establishes bidirectional synchronization between the browser history and the NavController.
12-14: These external function declarations are properly accessible and already in use.The functions
encodeURIComponent,decodeURIComponent, andaddEventListenerare declared as global external functions and actively used throughout the code (lines 22, 67, 78), confirming they work correctly in the Kotlin/Wasm-JS target. The code compiles and executes without accessibility issues. While the file mixes patterns (usingwindow.*for DOM APIs and direct external calls for these functions), this is valid Kotlin/JS interop idiom.
Resolves #323 - renovate web sample
Summary by CodeRabbit
New Features
Refactor
Chores
✏️ Tip: You can customize this high-level summary in your review settings.