Skip to content

Renovate web sample#324

Merged
vkatz merged 7 commits intomainfrom
feature/#232-Renovate-web-sample
Jan 5, 2026
Merged

Renovate web sample#324
vkatz merged 7 commits intomainfrom
feature/#232-Renovate-web-sample

Conversation

@vkatz
Copy link
Copy Markdown
Contributor

@vkatz vkatz commented Dec 23, 2025

Resolves #323 - renovate web sample

Summary by CodeRabbit

  • New Features

    • Version information now displayed in the WASM sample application.
  • Refactor

    • Improved browser navigation and history synchronization for WASM sample.
  • Chores

    • Updated build configuration and deployment workflow.

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

@vkatz vkatz closed this Dec 23, 2025
@vkatz vkatz reopened this Dec 23, 2025
@vkatz vkatz marked this pull request as draft December 23, 2025 16:24
@vkatz vkatz marked this pull request as ready for review December 23, 2025 19:02
@vkatz
Copy link
Copy Markdown
Contributor Author

vkatz commented Dec 23, 2025

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 23, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@vkatz vkatz linked an issue Dec 23, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 23, 2025

Walkthrough

The 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

Cohort / File(s) Summary
CI/CD Workflow Updates
.github/workflows/wasm_deploy.yml
Updated Build web app and Upload artifact steps to reference sample app-wasm project and its build output directory instead of example composeApp.
Build Configuration
sample/app-wasm/build.gradle.kts
Added BuildConfig plugin with version package definition, enabling generated Kotlin BuildConfig file with TIAMAT\_VERSION constant.
WASM Browser Interop
sample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/Browser.kt
New internal Browser object providing browser history and navigation state synchronization between NavController and window, with popstate event binding, URL/path encoding, and title management.
Sample App Main Entry
sample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/main.kt
Replaced hardcoded title and inline browser logic with Browser.bind(this) and BuildConfig.TIAMAT\_VERSION; removed legacy commented history management code.

Possibly related PRs

Suggested reviewers

  • egorikftp

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Renovate web sample' is vague and generic, using a broad term that doesn't convey specific details about the actual changes made. Consider a more specific title that describes the actual changes, such as 'Extract browser history logic into Browser object' or 'Add BuildConfig integration to WASM sample app'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR addresses issue #232 objectives (unified tiamat version, updated tag name) through BuildConfig integration and version constants, meeting the linked issue requirements.
Out of Scope Changes check ✅ Passed All changes align with the PR objective of renovating the web sample; the refactoring of browser history logic, BuildConfig addition, and workflow update are all within scope.
✨ 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 feature/#232-Renovate-web-sample

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4031f35 and a2601d8.

📒 Files selected for processing (4)
  • .github/workflows/wasm_deploy.yml
  • sample/app-wasm/build.gradle.kts
  • sample/app-wasm/src/wasmJsMain/kotlin/composegears/tiamat/sample/Browser.kt
  • sample/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.kt
  • sample/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: The tiamat.versions.tiamat.get() accessor is properly defined. The tiamat version catalog is explicitly registered in settings.gradle.kts and sources its versions from gradle/tiamat.toml, which contains the tiamat version entry. This is a deliberate architectural choice to maintain a separate version catalog for project-specific versions alongside the standard libs catalog. 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 Browser object
  • 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, and addEventListener are 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 (using window.* for DOM APIs and direct external calls for these functions), this is valid Kotlin/JS interop idiom.

@vkatz vkatz merged commit f26939d into main Jan 5, 2026
7 checks passed
@vkatz vkatz deleted the feature/#232-Renovate-web-sample branch January 5, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renovate web sample

2 participants