Skip to content

fix(android): configure embedded views on New Architecture - #291

Merged
thomson-t merged 1 commit into
mainfrom
fix/android-embedded-view-codegen-delegate
Jul 29, 2026
Merged

fix(android): configure embedded views on New Architecture#291
thomson-t merged 1 commit into
mainfrom
fix/android-embedded-view-codegen-delegate

Conversation

@thomson-t

@thomson-t thomson-t commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Background

  • On React Native's New Architecture, RoktEmbeddedViewManager implements the codegen-generated interface but did not return its generated delegate from getDelegate().
  • React Native therefore logged a ReactNoCrashSoftException whenever it created RoktNativeWidget, and placeholderName was not routed through codegen property dispatch.

What Has Changed

  • Instantiated RoktNativeWidgetManagerDelegate in the New Architecture view manager and returned it from getDelegate().
  • Removed the redundant @ReactProp annotation because the generated delegate now owns placeholderName dispatch.
  • Kept the Paper implementation, event handling, and public JavaScript API unchanged.

Screenshots/Video

  • N/A — no visual changes. Verified by launching the RN 0.81.5 sample under Fabric and confirming the RoktNativeWidget delegate soft exception no longer appears in logcat.

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

  • trunk check --ci, Widget lint, TypeScript build, Expo plugin build, package creation, and the Android New Architecture build all pass.
  • The sample repository has no matching Jest tests or dedicated Android view-manager test harness, so this regression is covered by codegen compilation and emulator runtime validation.
  • No documentation or changelog update is required because the public API and integration steps are unchanged.

The Fabric view manager implemented the generated interface without
returning its codegen delegate. React Native logged a soft exception when
creating each embedded view, and placeholder properties skipped generated
dispatch.

Instantiate and return the generated delegate so placeholderName is
routed through codegen. Remove the redundant ReactProp annotation; the
Paper path is unchanged.

#agentic
@thomson-t
thomson-t requested a review from a team as a code owner July 29, 2026 14:32
@paved-road-agent

Copy link
Copy Markdown

🛣️ ROKT Data Platform Paved Roads Scan Complete

No paved-road issues detected

Scanned files against 2 rules. · Reviewed commit: 49fa44066b

📜 Scan history (1 scan)
Commit Time (UTC) Status Findings
49fa440 2026-07-29 14:33:00 ✅ success 0
ℹ️ About ROKT Data Platform Paved Roads Agent

This scan was performed by the ROKT Data Platform Paved Roads Agent, an automated paved-road standards review tool for pull requests. See the User Guide for details on severity levels, feedback reactions, and scan configuration.

Reply @paved-road-agent help for the list of commands you can run on this PR.

@pr-security-agent

Copy link
Copy Markdown

🔒 Security Scan Complete

No security issues detected

Scanned files against 64 rules. · Reviewed commit: 49fa44066b

📜 Scan history (1 scan)
Commit Time (UTC) Status Findings
49fa440 2026-07-29 14:33:01 ✅ success 0
ℹ️ About PR Security Agent

This scan was performed by PR Security Agent, an automated security review tool for pull requests. See the User Guide for details on severity levels, feedback reactions, and scan configuration.

Reply @pr-security-agent help for the list of commands you can run on this PR.

@thomson-t
thomson-t merged commit 2538054 into main Jul 29, 2026
10 checks passed
@thomson-t
thomson-t deleted the fix/android-embedded-view-codegen-delegate branch July 29, 2026 15:05
@rokt-releases rokt-releases Bot mentioned this pull request Jul 29, 2026
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.

2 participants