Skip to content

Release: 2.27.1#220

Merged
uc-brunosilva merged 3 commits into
masterfrom
release/2.27.1
Jun 16, 2026
Merged

Release: 2.27.1#220
uc-brunosilva merged 3 commits into
masterfrom
release/2.27.1

Conversation

@uc-brunosilva

Copy link
Copy Markdown
Collaborator

No description provided.

@codeant-ai

codeant-ai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Skipping CodeAnt AI review — this PR is a back-merge between long-lived branches (release/2.27.1master). The diff here has already been reviewed when the underlying commits landed on the source branch, so re-running analysis would produce duplicate findings on already-reviewed code.

If you want to analyze this anyway (e.g. you resolved conflicts with new logic), comment @codeant-ai : review and CodeAnt will start a review.

@qodo-code-review

qodo-code-review Bot commented Jun 16, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Missing notAllowedPurposes field 🐞 Bug ≡ Correctness
Description
src/__tests__/mocks.ts now adds notAllowedPurposes to an object typed as TCF2ChangedPurposes,
but the exported TCF2ChangedPurposes model does not define that property. This makes the mock
inconsistent with the TS model (and native expectations), causing type drift and potential typecheck
failures for consumers/tests.
Code

src/tests/mocks.ts[R173-178]

const tcf2ChangedPurposes: TCF2ChangedPurposes = {
    legIntPurposes: [1],
-    purposes: [2]
+    purposes: [2],
+    notAllowedPurposes: [],
+    consentOrPay: undefined
}
Evidence
The TS test mock explicitly sets notAllowedPurposes, while the exported TS TCF2ChangedPurposes
model does not declare it; meanwhile the iOS sample mock constructs TCF2ChangedPurposes with
notAllowedPurposes, indicating the field exists/expected in the native model.

src/tests/mocks.ts[173-178]
src/models/TCF2Settings.tsx[206-221]
sample/ios/sampleTests/Mock/CMPData+Mock.swift[475-479]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`TCF2ChangedPurposes` is used as a typed shape for TCF2 settings, but the test mock now includes `notAllowedPurposes` which is not represented in the exported TypeScript model. This creates an inconsistency between the mock/native model and the public TS API surface.

## Issue Context
- The RN package exports `TCF2ChangedPurposes` from `src/models/TCF2Settings.tsx`.
- The iOS sample mock indicates `notAllowedPurposes` is part of the native model.

## Fix Focus Areas
- src/models/TCF2Settings.tsx[206-221]
- src/__tests__/mocks.ts[173-178]
- sample/ios/sampleTests/Mock/CMPData+Mock.swift[475-479]

## Suggested fix
1. Extend `TCF2ChangedPurposes` in `src/models/TCF2Settings.tsx` to include `notAllowedPurposes` (likely `number[]`, possibly optional depending on native contract) and update the constructor accordingly.
2. Ensure the mock in `src/__tests__/mocks.ts` matches the updated TS model (or, if the field is not intended to be exposed, remove it from the mock and align the Swift sample/mock usage accordingly).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@uc-brunosilva, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 3 minutes and 2 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: df2be231-5e3f-4fa2-b06c-69ab67be34b2

📥 Commits

Reviewing files that changed from the base of the PR and between e1e95ed and c550d55.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • sample/ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • CHANGELOG.md
  • android/build-legacy.gradle
  • android/build.gradle.kts
  • package.json
  • sample/ios/sampleTests/Mock/CMPData+Mock.swift
  • src/__tests__/mocks.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/2.27.1

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.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Release 2.27.1 (changelog, version bumps, test mocks)
📝 Documentation ⚙️ Configuration changes 🧪 Tests 🕐 10-20 Minutes

Grey Divider

Description

• Publish 2.27.1 release notes covering iOS accessibility, stability, and PUR fixes
• Bump SDK/package versions to 2.27.1 for Android and React Native distribution
• Update iOS/TS test mocks to include newly introduced TCF2 consent-or-pay fields
Diagram

graph TD
  R(["Release 2.27.1"]) --> C["CHANGELOG.md"] --> V["Version metadata"] --> T["Test mocks"]
  V --> A["android/build.gradle.kts"] --> P["package.json"]
  T --> I["CMPData+Mock.swift"] --> J["src/__tests__/mocks.ts"]

  subgraph Legend
    direction LR
    _rel(["Release"]) ~~~ _doc["Docs"] ~~~ _cfg["Config"] ~~~ _test["Tests"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Single-source versioning (generated versions)
  • ➕ Prevents mismatched versions across Gradle/package.json/iOS package fields
  • ➕ Reduces manual release edits and review surface area
  • ➕ Easier to automate release PR creation
  • ➖ Requires build/release tooling changes (scripts or CI)
  • ➖ Initial setup cost and potential migration friction
2. Contract-driven mock generation from SDK models
  • ➕ Mocks stay in sync when TCF2 models add/rename fields
  • ➕ Reduces recurring test-fix churn after model updates
  • ➖ More tooling complexity for relatively small mock datasets
  • ➖ May reduce readability/intent of hand-crafted test fixtures

Recommendation: The current approach is appropriate for a patch release PR: bump versions, document fixes, and keep mocks compiling with the updated models. If this repo frequently ships releases, consider single-source versioning to eliminate manual multi-file bumps and reduce the chance of version skew.

Files changed (5) +25 / -7

Tests (2) +10 / -4
CMPData+Mock.swiftUpdate iOS TCF2 mocks for new consent-or-pay fields +3/-2

Update iOS TCF2 mocks for new consent-or-pay fields

• Extends 'TCF2Settings' mock initialization to include 'specialFeaturesConsentOrPay'. Updates 'TCF2ChangedPurposes.mock()' to include the new 'consentOrPay' field for model parity.

sample/ios/sampleTests/Mock/CMPData+Mock.swift

mocks.tsUpdate TS Jest mocks for expanded TCF2 settings +7/-2

Update TS Jest mocks for expanded TCF2 settings

• Extends 'TCF2ChangedPurposes' mocks with 'notAllowedPurposes' and 'consentOrPay'. Extends 'TCF2Settings' mocks with 'mandatoryLabel', 'consentOrPay', and 'specialFeaturesConsentOrPay' to match updated SDK types.

src/tests/mocks.ts

Documentation (1) +12 / -0
CHANGELOG.mdAdd 2.27.1 release notes entry +12/-0

Add 2.27.1 release notes entry

• Adds a new 2.27.1 section documenting iOS accessibility fixes, iOS crash/main-thread presentation fixes, restored default button order, and a PUR vendor-consent fix.

CHANGELOG.md

Other (2) +3 / -3
build.gradle.ktsBump Android Usercentrics version to 2.27.1 +1/-1

Bump Android Usercentrics version to 2.27.1

• Updates the declared 'usercentricsVersion' constant from 2.27.0 to 2.27.1 for the Android build.

android/build.gradle.kts

package.jsonBump npm and iOS package versions to 2.27.1 +2/-2

Bump npm and iOS package versions to 2.27.1

• Updates the npm package version and the embedded 'iosPackageVersion' from 2.27.0 to 2.27.1 to align release artifacts.

package.json

@pantoaibot

pantoaibot Bot commented Jun 16, 2026

Copy link
Copy Markdown

PR Summary:

Release 2.27.1: accessibility and UI fixes, build/version bumps, and test/mock updates.

  • CHANGELOG: Added 2.27.1 release notes describing fixes (multiple iOS accessibility improvements for VoiceOver, restored visible focus indicator, fixed VoiceOver language and link/semantic exposure, restored default button order, crash fix for service info icon, main-thread dispatch and double-presentation guard in showFirstLayer, and PUR vendor-consent fix when showTogglesForVendors=false).
  • Version bumps: updated usercentrics version to 2.27.1 in android/build-legacy.gradle, android/build.gradle.kts, and package.json (including iosPackageVersion).
  • Tests/mocks updated:
    • Swift sample mocks: added specialFeaturesConsentOrPay and extended TCF2ChangedPurposes initializer to accept consentOrPay.
    • TypeScript mocks: extended tcf2ChangedPurposes with notAllowedPurposes and consentOrPay, and added mandatoryLabel, consentOrPay, specialFeaturesConsentOrPay to tcf2Settings.
  • No API-breaking changes indicated; primarily fixes and test updates.

Reviewed by Panto AI

Comment thread package.json
Comment thread src/__tests__/mocks.ts
@pantoaibot

pantoaibot Bot commented Jun 16, 2026

Copy link
Copy Markdown

Reviewed up to commit:c550d559fb4694a3ed4ea28388c6270c6d8045e8

Additional Suggestion
Others - You added new consent-related fields across languages (Swift: specialFeaturesConsentOrPay, consentOrPay; TS: consentOrPay, specialFeaturesConsentOrPay, mandatoryLabel). Please verify cross-language mapping and backward compatibility: make new fields optional in models, ensure JSON serialization/deserialization is tolerant (default values or missing-field handling), and add migration or fallback logic when older persisted consent data lacks these fields. Run full CI including native builds and integration tests before publishing.
- [ ] Confirm that new consent-related fields (`consentOrPay`, `specialFeaturesConsentOrPay`, `mandatoryLabel`) are declared as optional in all public TypeScript types and Swift/Objective‑C models.
- [ ] Ensure JSON (de)serialization tolerates missing values from older native SDKs / stored payloads by providing safe defaults (e.g., `undefined`/`nil` or empty collections) and no non-null assertions.
- [ ] Add or update integration tests to cover scenarios where these new fields are omitted from the payload, verifying that parsing and existing flows still work.

Reviewed by Panto AI

@uc-brunosilva uc-brunosilva merged commit 1514998 into master Jun 16, 2026
13 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.

3 participants