-
Notifications
You must be signed in to change notification settings - Fork 13
Fix Android New Arch Issue #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughParameter types across nine ReactMethod signatures in the Usercentrics React Native module are converted from Int to Double. Implementation methods include corresponding Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
|
PR Summary: Update RN Usercentrics module spec to use Double for numeric params to fix React Native New Architecture (codegen/TurboModule) type mismatches. Changes:
Impact:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
Nitpicks 🔍
|
|
|
||
| @ReactMethod | ||
| abstract fun setCMPId(id: Int) | ||
| abstract fun setCMPId(id: Double) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Non-nullable Double parameter will be compiled to a primitive double and will throw a NullPointerException if the JS bridge passes null; make the parameter nullable (Double?) so it accepts boxed null values coming from JS interop. [null pointer]
Severity Level: Critical 🚨
- ❌ Native module call setCMPId may crash on null input.
- ⚠️ JS callers that omit id receive failed native invocation.| abstract fun setCMPId(id: Double) | |
| abstract fun setCMPId(id: Double?) |
Steps of Reproduction ✅
1. Build and run the Android app with this PR code so the TurboModule is registered (file:
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt,
declaration at line 58).
2. From JavaScript, call the native method exported by the TurboModule (e.g.,
RNUsercentricsModule.setCMPId(null) or omit the numeric argument so JS sends
null/undefined).
3. The React Native bridge invokes the generated/native implementation for the spec which
maps to the abstract signature at RNUsercentricsModuleSpec.kt:58; the bridge passes a
boxed Double which can be null.
4. Kotlin's non-nullable Double compiles to a primitive double and the runtime attempts to
unbox the null, causing a NullPointerException at the unboxing site and the native call to
fail.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt
**Line:** 58:58
**Comment:**
*Null Pointer: Non-nullable `Double` parameter will be compiled to a primitive `double` and will throw a NullPointerException if the JS bridge passes null; make the parameter nullable (`Double?`) so it accepts boxed null values coming from JS interop.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
|
||
| @ReactMethod | ||
| abstract fun acceptAllForTCF(fromLayer: Int, consentType: Int, promise: Promise) | ||
| abstract fun acceptAllForTCF(fromLayer: Double, consentType: Double, promise: Promise) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Non-nullable Double parameters in the bridge method can cause unboxing NullPointerExceptions if JS sends null; declare fromLayer and consentType as nullable Double? so the module safely accepts boxed null values from the JS side. [null pointer]
Severity Level: Critical 🚨
- ❌ acceptAllForTCF native calls may throw runtime exceptions.
- ⚠️ Consent flows relying on TCF acceptance break unpredictably.| abstract fun acceptAllForTCF(fromLayer: Double, consentType: Double, promise: Promise) | |
| abstract fun acceptAllForTCF(fromLayer: Double?, consentType: Double?, promise: Promise) |
Steps of Reproduction ✅
1. Deploy the Android app containing RNUsercentricsModuleSpec (file path:
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt, method at
line 70).
2. From the React Native JS layer, invoke acceptAllForTCF with missing/null numeric args
(e.g., RNUsercentricsModule.acceptAllForTCF(null, null, promise)).
3. The TurboModule bridge calls into the native implementation bound to the abstract
signature at RNUsercentricsModuleSpec.kt:70 and forwards boxed Double values.
4. Because the signature requires non-nullable Double, the JVM will unbox the null and
throw an NPE, causing the native method to fail and the promise to reject unexpectedly.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt
**Line:** 70:70
**Comment:**
*Null Pointer: Non-nullable `Double` parameters in the bridge method can cause unboxing NullPointerExceptions if JS sends null; declare `fromLayer` and `consentType` as nullable `Double?` so the module safely accepts boxed null values from the JS side.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
|
||
| @ReactMethod | ||
| abstract fun denyAllForTCF(fromLayer: Int, consentType: Int, unsavedPurposeLIDecisions: ReadableArray, promise: Promise) | ||
| abstract fun denyAllForTCF(fromLayer: Double, consentType: Double, unsavedPurposeLIDecisions: ReadableArray, promise: Promise) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Method accepts a ReadableArray from JS alongside Double values; the consentType Double should be nullable (Double?) to avoid unboxing NullPointerException if JS passes null/undefined for numeric args. [null pointer]
Severity Level: Critical 🚨
- ❌ denyAllForTCF can crash when JS supplies null numerics.
- ⚠️ Purpose-level decision processing may be interrupted.| abstract fun denyAllForTCF(fromLayer: Double, consentType: Double, unsavedPurposeLIDecisions: ReadableArray, promise: Promise) | |
| abstract fun denyAllForTCF(fromLayer: Double?, consentType: Double?, unsavedPurposeLIDecisions: ReadableArray, promise: Promise) |
Steps of Reproduction ✅
1. Install the PR version of the Android module so RNUsercentricsModuleSpec is used (see
file android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt,
method at line 76).
2. From JS, call denyAllForTCF and pass null for numeric args while providing a
ReadableArray (e.g., RNUsercentricsModule.denyAllForTCF(null, null, someArray, promise)).
3. The TurboModule bridge forwards boxed numeric values to the native method bound to
RNUsercentricsModuleSpec.kt:76.
4. The non-nullable Double parameters force JVM unboxing of null, causing an NPE and
failing the native denyAllForTCF execution and promise resolution.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt
**Line:** 76:76
**Comment:**
*Null Pointer: Method accepts a `ReadableArray` from JS alongside `Double` values; the `consentType` Double should be nullable (`Double?`) to avoid unboxing NullPointerException if JS passes null/undefined for numeric args.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
|
||
| @ReactMethod | ||
| abstract fun track(event: Int) | ||
| abstract fun track(event: Double) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The track method's event parameter is declared as non-nullable Double which will be compiled to a primitive and will NPE if JS sends null; change it to nullable Double? (or a boxed type) to safely accept bridge values. [null pointer]
Severity Level: Critical 🚨
- ❌ Analytics track calls may throw runtime exceptions.
- ⚠️ Event tracking reliability degraded on null inputs.| abstract fun track(event: Double) | |
| abstract fun track(event: Double?) |
Steps of Reproduction ✅
1. Run the Android app including this PR so the TurboModule and RNUsercentricsModuleSpec
are active (file:
android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt, line 94).
2. From JS, call the tracking method with null or undefined event (e.g.,
RNUsercentricsModule.track(null) or omit event).
3. The React Native bridge invokes the native implementation tied to
RNUsercentricsModuleSpec.kt:94, passing a boxed Double that may be null.
4. The non-nullable Double requires unboxing; if null is received the JVM throws an NPE
and the track call fails silently or raises an exception on the native side.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt
**Line:** 94:94
**Comment:**
*Null Pointer: The `track` method's `event` parameter is declared as non-nullable `Double` which will be compiled to a primitive and will NPE if JS sends null; change it to nullable `Double?` (or a boxed type) to safely accept bridge values.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.| abstract fun setCMPId(id: Double) | ||
|
|
||
| @ReactMethod | ||
| abstract fun setABTestingVariant(variant: String) | ||
|
|
||
| @ReactMethod | ||
| abstract fun changeLanguage(language: String, promise: Promise) | ||
|
|
||
| @ReactMethod | ||
| abstract fun acceptAll(consentType: Int, promise: Promise) | ||
| abstract fun acceptAll(consentType: Double, promise: Promise) | ||
|
|
||
| @ReactMethod | ||
| abstract fun acceptAllForTCF(fromLayer: Int, consentType: Int, promise: Promise) | ||
| abstract fun acceptAllForTCF(fromLayer: Double, consentType: Double, promise: Promise) | ||
|
|
||
| @ReactMethod | ||
| abstract fun denyAll(consentType: Int, promise: Promise) | ||
| abstract fun denyAll(consentType: Double, promise: Promise) | ||
|
|
||
| @ReactMethod | ||
| abstract fun denyAllForTCF(fromLayer: Int, consentType: Int, unsavedPurposeLIDecisions: ReadableArray, promise: Promise) | ||
| abstract fun denyAllForTCF(fromLayer: Double, consentType: Double, unsavedPurposeLIDecisions: ReadableArray, promise: Promise) | ||
|
|
||
| @ReactMethod | ||
| abstract fun saveDecisions(decisions: ReadableArray, consentType: Int, promise: Promise) | ||
| abstract fun saveDecisions(decisions: ReadableArray, consentType: Double, promise: Promise) | ||
|
|
||
| @ReactMethod | ||
| abstract fun saveDecisionsForTCF( | ||
| tcfDecisions: ReadableMap, | ||
| fromLayer: Int, | ||
| fromLayer: Double, | ||
| saveDecisions: ReadableArray, | ||
| consentType: Int, | ||
| consentType: Double, | ||
| promise: Promise | ||
| ) | ||
|
|
||
| @ReactMethod | ||
| abstract fun saveOptOutForCCPA(isOptedOut: Boolean, consentType: Int, promise: Promise) | ||
| abstract fun saveOptOutForCCPA(isOptedOut: Boolean, consentType: Double, promise: Promise) | ||
|
|
||
| @ReactMethod | ||
| abstract fun track(event: Int) | ||
| abstract fun track(event: Double) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[CRITICAL_BUG] You changed multiple method signatures from Int to Double in the TurboModule spec. This is the correct direction for New Architecture codegen (number -> Double), but you must also update the concrete RNUsercentricsModule implementation and any call sites/tests to accept Double and convert safely. Right now tests such as testSetCMPId and others (see RNUsercentricsModuleTest.kt around lines 341-382 and 473-691) call methods with Ints and expect integer/enums on the Kotlin side. Actionable steps:
- Update RNUsercentricsModule method signatures to accept Double (or keep Double in spec and add overloads) so the generated interface matches the implementation.
- Immediately convert Double -> the needed Kotlin types inside the implementation (e.g. toInt() and map to enums) with validation (see other suggestions). If you leave only spec changes without updating implementation/tests, the build will fail or runtime mapping will be incorrect.
// In RNUsercentricsModule.kt (implementation)
@ReactMethod
override fun setCMPId(id: Double) {
val intId = id.toInt()
usercentricsProxy.setCMPId(intId)
}
@ReactMethod
override fun acceptAll(consentType: Double, promise: Promise) {
val type = UsercentricsConsentType.values()[consentType.toInt()]
handleResult(promise) {
usercentricsProxy.acceptAll(type)
}
}
@ReactMethod
override fun acceptAllForTCF(fromLayer: Double, consentType: Double, promise: Promise) {
val layer = TCFDecisionUILayer.values()[fromLayer.toInt()]
val type = UsercentricsConsentType.values()[consentType.toInt()]
handleResult(promise) {
usercentricsProxy.acceptAllForTCF(layer, type)
}
}
@ReactMethod
override fun denyAll(consentType: Double, promise: Promise) {
val type = UsercentricsConsentType.values()[consentType.toInt()]
handleResult(promise) {
usercentricsProxy.denyAll(type)
}
}
@ReactMethod
override fun denyAllForTCF(
fromLayer: Double,
consentType: Double,
unsavedPurposeLIDecisions: ReadableArray,
promise: Promise,
) {
val layer = TCFDecisionUILayer.values()[fromLayer.toInt()]
val type = UsercentricsConsentType.values()[consentType.toInt()]
val liDecisions = unsavedPurposeLIDecisions.toUserDecisionsOrNull()
handleResult(promise) {
usercentricsProxy.denyAllForTCF(layer, type, liDecisions)
}
}
@ReactMethod
override fun saveDecisions(
decisions: ReadableArray,
consentType: Double,
promise: Promise,
) {
val type = UsercentricsConsentType.values()[consentType.toInt()]
val mapped = decisions.toUserDecisions()
handleResult(promise) {
usercentricsProxy.saveDecisions(mapped, type)
}
}
@ReactMethod
override fun saveDecisionsForTCF(
tcfDecisions: ReadableMap,
fromLayer: Double,
saveDecisions: ReadableArray,
consentType: Double,
promise: Promise,
) {
val layer = TCFDecisionUILayer.values()[fromLayer.toInt()]
val type = UsercentricsConsentType.values()[consentType.toInt()]
val tcf = tcfDecisions.toTCFUserDecisions()
val mapped = saveDecisions.toUserDecisions()
handleResult(promise) {
usercentricsProxy.saveDecisionsForTCF(tcf, layer, mapped, type)
}
}
@ReactMethod
override fun saveOptOutForCCPA(
isOptedOut: Boolean,
consentType: Double,
promise: Promise,
) {
val type = UsercentricsConsentType.values()[consentType.toInt()]
handleResult(promise) {
usercentricsProxy.saveOptOutForCCPA(isOptedOut, type)
}
}
@ReactMethod
override fun track(event: Double) {
val eventType = UsercentricsAnalyticsEventType.values()[event.toInt()]
usercentricsProxy.track(eventType)
}|
Reviewed up to commit:90a4c939250d3e4ddeac3d88392464511c21a8d1 Additional SuggestionOthers- Introduce a single helper utility (e.g. NumberUtils or BridgeConverters) that centralizes conversions from Double -> Int and Double -> Enum (with bounds checks). Many methods require the same conversions (consentType, fromLayer, event, cmpId). Centralizing avoids duplication and makes it easier to maintain behavior (rounding/truncation policy, error messages). Example helper signatures: - fun doubleToIntStrict(value: Double, fieldName: String): Int - fun doubleToEnumOrdinal>(value: Double, values: Array, fieldName: String): T Use these helpers in every bridge method instead of repeating conversion logic.// New file: android/src/main/java/com/usercentrics/reactnative/util/BridgeConverters.kt
package com.usercentrics.reactnative.util
import com.facebook.react.bridge.Promise
internal object BridgeConverters {
fun doubleToIntStrict(value: Double, fieldName: String, promise: Promise? = null): Int {
if (!value.isFinite()) {
val message = "Invalid $fieldName: value must be finite"
promise?.reject(IllegalArgumentException(message))
throw IllegalArgumentException(message)
}
val intValue = value.toInt()
if (intValue.toDouble() != value) {
val message = "Invalid $fieldName: $value is not an integer"
promise?.reject(IllegalArgumentException(message))
throw IllegalArgumentException(message)
}
return intValue
}
fun <T : Enum<T>> doubleToEnumOrdinal(
value: Double,
values: Array<T>,
fieldName: String,
promise: Promise? = null,
): T {
val index = doubleToIntStrict(value, fieldName, promise)
if (index !in values.indices) {
val message = "Invalid $fieldName: index $index out of bounds [0, ${values.lastIndex}]"
promise?.reject(IllegalArgumentException(message))
throw IllegalArgumentException(message)
}
return values[index]
}
}
// Usage example in RNUsercentricsModule.kt
@ReactMethod
override fun track(event: Double) {
val eventType = BridgeConverters.doubleToEnumOrdinal(
value = event,
values = UsercentricsAnalyticsEventType.values(),
fieldName = "event"
)
usercentricsProxy.track(eventType)
}
// Example validation usage in RNUsercentricsModule.kt
@ReactMethod
override fun acceptAll(consentType: Double, promise: Promise) {
try {
val type = BridgeConverters.doubleToEnumOrdinal(
value = consentType,
values = UsercentricsConsentType.values(),
fieldName = "consentType",
promise = promise,
)
handleResult(promise) {
usercentricsProxy.acceptAll(type)
}
} catch (_: IllegalArgumentException) {
// Promise already rejected in converter
}
}
@ReactMethod
override fun setCMPId(id: Double, promise: Promise) {
try {
val intId = BridgeConverters.doubleToIntStrict(id, "cmpId", promise)
usercentricsProxy.setCMPId(intId)
promise.resolve(null)
} catch (_: IllegalArgumentException) {
// Promise already rejected
}
} |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt`:
- Around line 206-208: The track method currently indexes
UsercentricsAnalyticsEventType.values() with event.toInt() which can throw
ArrayIndexOutOfBounds; update RNUsercentricsModule.track to validate the index
before using it (e.g., obtain vals = UsercentricsAnalyticsEventType.values(),
check eventIndex >= 0 && eventIndex < vals.size), and if out of range handle
gracefully (log via usercentricsProxy.instance or no-op/return) instead of
indexing directly into UsercentricsAnalyticsEventType.values().
- Around line 134-140: The acceptAllForTCF method currently indexes enums
directly with TCFDecisionUILayer.values()[fromLayer.toInt()] and
UsercentricsConsentType.values()[consentType.toInt()] which can throw
ArrayIndexOutOfBoundsException for invalid Double inputs; add defensive
validation or conversion helper(s) (e.g., getTCFDecisionUILayer(fromLayer:
Double) and getConsentType(consentType: Double)) that convert toInt(), check
index is within values().indices, and throw/return a clear error; wrap the enum
access in try-catch in acceptAllForTCF and call promise.reject(...) with a
descriptive message on failure, otherwise resolve as before.
| override fun acceptAllForTCF(fromLayer: Double, consentType: Double, promise: Promise) { | ||
| promise.resolve( | ||
| usercentricsProxy.instance.acceptAllForTCF( | ||
| TCFDecisionUILayer.values()[fromLayer], UsercentricsConsentType.values()[consentType] | ||
| TCFDecisionUILayer.values()[fromLayer.toInt()], UsercentricsConsentType.values()[consentType.toInt()] | ||
| ).toWritableArray() | ||
| ) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential ArrayIndexOutOfBoundsException from unchecked enum index access.
Using .values()[fromLayer.toInt()] and .values()[consentType.toInt()] without bounds validation can cause runtime crashes if JavaScript passes invalid values (negative numbers, values exceeding enum size, or fractional values that truncate unexpectedly).
While this pattern existed before the Int → Double change, the wider Double range and truncation behavior (e.g., 2.9 → 2) increase the surface for unexpected inputs.
Consider adding defensive bounds checking, or at minimum, wrapping enum access in a try-catch to provide a meaningful error message back to the JS layer via promise.reject().
Example defensive approach
private fun getConsentType(value: Double): UsercentricsConsentType {
val index = value.toInt()
val values = UsercentricsConsentType.values()
require(index in values.indices) { "Invalid consentType: $value" }
return values[index]
}🤖 Prompt for AI Agents
In `@android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt`
around lines 134 - 140, The acceptAllForTCF method currently indexes enums
directly with TCFDecisionUILayer.values()[fromLayer.toInt()] and
UsercentricsConsentType.values()[consentType.toInt()] which can throw
ArrayIndexOutOfBoundsException for invalid Double inputs; add defensive
validation or conversion helper(s) (e.g., getTCFDecisionUILayer(fromLayer:
Double) and getConsentType(consentType: Double)) that convert toInt(), check
index is within values().indices, and throw/return a clear error; wrap the enum
access in try-catch in acceptAllForTCF and call promise.reject(...) with a
descriptive message on failure, otherwise resolve as before.
| override fun track(event: Double) { | ||
| usercentricsProxy.instance.track(UsercentricsAnalyticsEventType.values()[event.toInt()]) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same bounds-check concern applies here.
UsercentricsAnalyticsEventType.values()[event.toInt()] has the same risk as the consent-type methods. If this enum is controlled by the SDK and validated elsewhere, this may be acceptable, but the same defensive pattern would improve robustness.
🤖 Prompt for AI Agents
In `@android/src/main/java/com/usercentrics/reactnative/RNUsercentricsModule.kt`
around lines 206 - 208, The track method currently indexes
UsercentricsAnalyticsEventType.values() with event.toInt() which can throw
ArrayIndexOutOfBounds; update RNUsercentricsModule.track to validate the index
before using it (e.g., obtain vals = UsercentricsAnalyticsEventType.values(),
check eventIndex >= 0 && eventIndex < vals.size), and if out of range handle
gracefully (log via usercentricsProxy.instance or no-op/return) instead of
indexing directly into UsercentricsAnalyticsEventType.values().
User description
User description
Codegen generates Double for number, you can check here https://reactnative.dev/docs/appendix
right now your whole TurboModule doesn't work for functions that takes number primitive type.
PR Type
Bug fix
Description
Replace Int with Double for number parameters in TurboModule methods
Align with React Native codegen specification for number primitives
Fix compatibility with Android New Architecture
Diagram Walkthrough
File Walkthrough
RNUsercentricsModuleSpec.kt
Convert Int parameters to Double in TurboModule specandroid/src/main/java/com/usercentrics/reactnative/RNUsercentricsModuleSpec.kt
InttoDoubleinsetCMPIdmethodacceptAll,acceptAllForTCF,denyAll,denyAllForTCFmethods touse
Doublefor numeric parameterssaveDecisionsandsaveDecisionsForTCFmethods to acceptDoubleinstead ofIntsaveOptOutForCCPAandtrackmethods to useDoublefor numericparameters
CodeAnt-AI Description
Use Double for numeric TurboModule parameters to fix Android New Architecture compatibility
What Changed
Impact
✅ Fixes TurboModule numeric parameter failures on Android New Architecture✅ Consent actions (accept/deny/track/save) invoked from JS work reliably✅ Prevents runtime type errors for numeric inputs in the native module💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.