Skip to content

Conversation

@pandeymangg
Copy link
Contributor

Fixes #38 #39 #40

@coderabbitai
Copy link

coderabbitai bot commented Sep 29, 2025

Warning

Rate limit exceeded

@pandeymangg has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b78a4f4 and 25d6f9d.

📒 Files selected for processing (1)
  • android/src/main/java/com/formbricks/android/model/environment/Survey.kt (1 hunks)

Walkthrough

  • SurveyManager.track: adds null-check for actionClass; logs error and returns early if not found. Logs when a survey display is delayed due to a positive timeout.
  • Survey model: introduces @serializable SurveyProjectOverwrites with brandColor, highlightBorderColor, clickOutsideClose, placement, darkOverlay (nullable). Survey gains optional projectOverwrites field.
  • FormbricksViewModel: refactors to use matchedSurvey and project variables. Multi-language count uses matchedSurvey?.languages?.size. Adds placement and darkOverlay to JSON, preferring projectOverwrites over project values. Styling logic uses hasCustomStyling and enabled flags, selecting survey or project styling accordingly.

Pre-merge checks

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The PR also includes SurveyManager logging enhancements and broad additions to the SurveyProjectOverwrites class (such as styling and overlay fields) that extend beyond the scope of the linked issue #38, introducing functionality unrelated to the placement fix. Consider splitting the logging improvements and non-placement model fields into separate pull requests or explicitly referencing issues #39 and #40 to clarify their relevance and keep each PR focused on a single objective.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “fix: fixes placement and other logger bugs” directly references the core changes to survey placement and the additional logging fixes introduced in this PR, summarizing both primary modifications without including extraneous file details or unrelated content.
Linked Issues Check ✅ Passed The changes introduce and use a new projectOverwrites.placement property and update the ViewModel to prioritize this override, which directly addresses the placement bug described in issue #38 by ensuring surveys honor the configured placement on larger screens.
Description Check ✅ Passed The description “Fixes #38 #39 #40” correctly references the issues that this PR is intended to resolve and relates directly to the changes in placement handling and logging behavior implemented in the code.

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

@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: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
android/src/main/java/com/formbricks/android/webview/FormbricksViewModel.kt (1)

36-38: CSS container may bias placement toward bottom on large screens

The body uses display:flex with justify-content:flex-end, which can force children toward the bottom. If the JS SDK renders relative to this container (not position:fixed to viewport), it can override requested placement on bigger screens. Consider removing flex from the body or ensuring the SDK attaches to document.body/uses fixed positioning.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5add8a and b78a4f4.

📒 Files selected for processing (3)
  • android/src/main/java/com/formbricks/android/manager/SurveyManager.kt (2 hunks)
  • android/src/main/java/com/formbricks/android/model/environment/Survey.kt (1 hunks)
  • android/src/main/java/com/formbricks/android/webview/FormbricksViewModel.kt (2 hunks)
⏰ 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: SonarCloud
  • GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (4)
android/src/main/java/com/formbricks/android/webview/FormbricksViewModel.kt (4)

136-137: Multi‑language detection — LGTM


145-145: Custom styling presence check — LGTM


150-152: darkOverlay override passthrough — LGTM


153-153: Style overwrite gating — LGTM

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
56.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@mattinannt mattinannt merged commit 765026f into main Sep 30, 2025
6 of 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.

BUG: Survey placement does not work on a bigger screen

3 participants