Skip to content

chore: bump to 2.1.0 - #57

Merged
pandeymangg merged 3 commits into
mainfrom
chore/bump-2.1.0
Aug 6, 2026
Merged

chore: bump to 2.1.0#57
pandeymangg merged 3 commits into
mainfrom
chore/bump-2.1.0

Conversation

@pandeymangg

Copy link
Copy Markdown
Contributor

Release prep for #56. Two commits.

Important

The first commit is required for 2.1.0 to be a correct version number. Please read that section before cutting the release.


1. fix: default onFinished() so WebAppCallback stays source-compatible

This was pushed to #56 but did not make it into the merge — the merge queue had already snapshotted the branch at 02b93d9, and the squash commit does not contain it. So it is on this PR instead.

WebAppInterface.WebAppCallback is declared with no visibility modifier, which in Kotlin means public:

class WebAppInterface(private val callback: WebAppCallback?) {
    interface WebAppCallback { ... }
}

#56 added an abstract onFinished() to it. Adding an abstract member to a public interface stops any existing implementor from compiling — which under semver makes the release breaking, i.e. 3.0.0 rather than 2.1.0.

In practice nobody implements it: the SDK constructs WebAppInterface itself in FormbricksFragment, and the interface appears nowhere in the README. So cutting a major would be pointless churn. Giving the method a default body removes the dilemma instead of arguing about it:

fun onFinished() {}

Now the change is genuinely additive and 2.1.0 is correct.

Note

Nothing on main is broken today — an abstract member is valid Kotlin and the SDK compiles and runs fine. This is purely about the version number being honest, so it is release-blocking rather than urgent.

2. chore: bump to 2.1.0

  • android/build.gradle.kts: version = "2.0.0""2.1.0"
  • README.md: the install snippet that names a concrete version

Why minor, not patch

It adds a feature. Survey-interaction segment filters ("have seen X", "have completed X", …) did not work on Android at all before — the SDK kept using the segment list from app launch, so "completed survey A → show survey B" never fired in the same session.

It changes behaviour for apps that upgrade, whether or not they use the feature. The user-state sync was only ever armed after a successful sync, so a launch that found a still-valid cached state scheduled nothing and segments stayed frozen for the whole process. It is now also armed from the warm-cache path — which means periodic POST /user traffic that wasn't there before. That is the main rollout consideration, and it's why patch would be the wrong signal.

Workspaces using interaction targeting also get an extra /user call after a display, response or finish, gated per survey and per event and debounced so a burst costs one request.

It also carries a crash fix#43, IllegalStateException: FragmentManager has been destroyed. On its own that would be a patch, but it ships alongside the feature.

Verification

compileDebugKotlin and compileDebugAndroidTestKotlin both pass.

Warning

The 19 instrumented tests added in #56 have still never been run — no emulator or device has been available. They compile, which is not the same as passing. Worth running before the release goes out; happy to do it if an emulator can be started.

WebAppCallback is public with no visibility modifier, so adding an abstract
member would stop any existing implementor from compiling — turning an additive
change into a breaking one and forcing a major release. Only the SDK implements
it today, but a default body costs nothing and keeps this a minor.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The Android SDK version changes from 2.0.0 to 2.1.0 in the Gradle project and README installation example. The Maven publishing coordinates use the new version. The WebAppCallback.onFinished() method changes from an abstract declaration to a default empty implementation, with updated documentation.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: updating the SDK version to 2.1.0.
Description check ✅ Passed The description directly explains the compatibility fix, version bump, release scope, and verification status.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt`:
- Around line 18-23: Configure the Android module’s Kotlin compiler with an
explicit JVM default-method compatibility mode so the default implementation in
WebAppCallback.onFinished() is emitted for consumers. Add a compatibility test
with a Java implementation of WebAppCallback that omits onFinished(), and ensure
the test passes before publishing.
🪄 Autofix

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6b85a56b-2f48-4786-bbcb-0536f7c97a5b

📥 Commits

Reviewing files that changed from the base of the PR and between 4817c88 and 74378f9.

📒 Files selected for processing (3)
  • README.md
  • android/build.gradle.kts
  • android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt

Comment thread android/src/main/java/com/formbricks/android/webview/WebAppInterface.kt Outdated
@pandeymangg
pandeymangg requested a review from Dhruwang August 5, 2026 15:41
Sonar wants the explanation nested inside the braces; a KDoc block above the
declaration does not count. Kept the KDoc for why the default exists and added
a body comment for why it is empty.
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@pandeymangg
pandeymangg added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit 0289486 Aug 6, 2026
7 checks passed
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