feat: add widget type dropdown and PR ID input for easier widget testing#40
Draft
irving-vega wants to merge 4 commits intodevelopfrom
Draft
feat: add widget type dropdown and PR ID input for easier widget testing#40irving-vega wants to merge 4 commits intodevelopfrom
irving-vega wants to merge 4 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
1 issue found across 10 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="samplekotlin/src/main/java/io/axept/samplekotlin/config/ConfigurationManager.kt">
<violation number="1" location="samplekotlin/src/main/java/io/axept/samplekotlin/config/ConfigurationManager.kt:99">
Guard the widget type lookup against out-of-range persisted values to avoid crashes when the saved ordinal no longer matches the enum entries.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| cookiesVersion = cookiesVersion, | ||
| token = if (token.isNullOrEmpty()) null else token, | ||
| token = token?.takeIf { it.isNotEmpty() }, | ||
| widgetType = WidgetType.entries[widgetType], |
There was a problem hiding this comment.
Guard the widget type lookup against out-of-range persisted values to avoid crashes when the saved ordinal no longer matches the enum entries.
Prompt for AI agents
Address the following comment on samplekotlin/src/main/java/io/axept/samplekotlin/config/ConfigurationManager.kt at line 99:
<comment>Guard the widget type lookup against out-of-range persisted values to avoid crashes when the saved ordinal no longer matches the enum entries.</comment>
<file context>
@@ -3,148 +3,169 @@ package io.axept.samplekotlin.config
cookiesVersion = cookiesVersion,
- token = if (token.isNullOrEmpty()) null else token,
+ token = token?.takeIf { it.isNotEmpty() },
+ widgetType = WidgetType.entries[widgetType],
+ prId = prId?.takeIf { it.isNotEmpty() },
targetService = targetService
</file context>
Suggested change
| widgetType = WidgetType.entries[widgetType], | |
| widgetType = WidgetType.entries.getOrElse(widgetType) { WidgetType.PRODUCTION }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚧 Draft: Update Sample App for Upcoming SDK Release
✨ Summary
This PR updates the public sample Android apps to support the new SDK features
(widget type dropdown, PR ID configuration, etc.).
These changes align the sample app with the upcoming SDK release that includes these new capabilities.
🧩 Changes
PRODUCTION,STAGING,PR)🧪 Testing
Once released:
build.gradle.🧠 Notes
Summary by cubic
Add a widget type selector (Production, Staging, PR), optional PR ID, and a consent expiration override to the sample Android apps to make testing non‑production widget versions and consent lifespan control easy. Updated SDK init and build config to support these options.
New Features
Bug Fixes
Written for commit 92c7501. Summary will update automatically on new commits.