feat(MSDK-4514): Propagate isExempt to the ServiceConsent bridge model - #234
Conversation
Threads the isExempt field (added to the native UsercentricsServiceConsent in MSDK-4513) through the TS model, iOS Swift and Android Kotlin serialization extensions, and their mock/test fixtures. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe consent model now exposes ChangesConsent exemption field
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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: Propagate isExempt on ServiceConsent objects across native-to-JS bridge so the RN layer receives the new boolean field. Changes:
|
|
Reviewed up to commit:fd35f3cc94b4494978a3ec262ec485b46b4b2d04 |
…ctor change isExempt was added as a required positional constructor parameter, breaking any existing call site that doesn't pass it. Give it the same false default the native model and every other bridge use.
PR Summary by QodoPropagate
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1. Constructor default not applied
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@sample/ios/sampleTests/ReadyStatusDictTests.swift`:
- Around line 17-18: Update the serialization tests around the ReadyStatus
fixtures to assert the serialized isExempt field, and set isExempt to true in
one fixture so non-default values are verified; apply the same assertion and
fixture adjustment to the additional indicated test cases.
In `@src/__tests__/index.test.ts`:
- Around line 152-153: Update the changed fixture literals in the test file,
including the entries around category and isExempt at all referenced locations,
to use the repository’s Prettier formatting: single-quoted TypeScript strings
and no semicolons. Preserve the fixture values and structure.
In `@src/models/UsercentricsServiceConsent.tsx`:
- Line 15: Apply the repository’s Prettier formatting to all changed TypeScript:
reformat the long constructor declaration in
src/models/UsercentricsServiceConsent.tsx:15, remove the semicolon at
src/models/UsercentricsServiceConsent.tsx:24, and convert the changed fixtures
to single quotes at src/__tests__/index.test.ts:152-153, 206-207, 275-276, and
585-586. Use no semicolons and preserve the existing JSX formatting conventions.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a6084472-36fc-4c28-b0a9-88c0ac0be2a3
📒 Files selected for processing (8)
android/src/androidTest/java/com/usercentrics/reactnative/mock/GetConsentsMock.ktandroid/src/androidTest/java/com/usercentrics/reactnative/mock/SaveDecisionsForTCFMock.ktandroid/src/main/java/com/usercentrics/reactnative/extensions/UsercentricsServiceConsentExtensions.ktios/Extensions/UsercentricsServiceConsents+Dict.swiftsample/ios/sampleTests/Mock/UsercentricsIsReady+Mock.swiftsample/ios/sampleTests/ReadyStatusDictTests.swiftsrc/__tests__/index.test.tssrc/models/UsercentricsServiceConsent.tsx
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
User description
Threads the isExempt field (added to the native UsercentricsServiceConsent in MSDK-4513) through the TS model, iOS Swift and Android Kotlin serialization extensions, and their mock/test fixtures.
Summary by CodeRabbit
New Features
false.Tests
CodeAnt-AI Description
Expose consent exemption status across JavaScript, Android, and iOS
What Changed
isExemptvalue across all supported platformsisExempttofalseImpact
✅ Consistent exemption status across platforms✅ Backward-compatible consent object creation✅ Clearer consent compliance data💡 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.