Skip to content

chore(testers): add Rozenite DevTools plugins to tester apps - #1509

Merged
dannyhw merged 3 commits into
mainfrom
feat/rozenite-tester-apps
Nov 18, 2026
Merged

dannyhw merged 3 commits into
mainfrom
feat/rozenite-tester-apps

Conversation

@dannyhw

@dannyhw dannyhw commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds Rozenite to the tester apps so we get extra React Native DevTools panels while debugging Re.Pack. It is opt-in: start a tester's dev server with WITH_ROZENITE=true. Without the flag, withRozenite returns the config unchanged (/rozenite 404s).

App Config wrapped Plugins
tester-app rspack.config.mjs, webpack.config.mjs network activity
tester-federation config.host-app.mts (rspack + webpack) network activity, React Navigation, storage
tester-federation-v2 config.host-app.mts (rspack + webpack) network activity, React Navigation, storage
tester-expo rspack.config.mjs network activity
  • Only the MF host dev servers are wrapped, since DevTools connects to the server the host bundle comes from. Mini-app and widget servers don't need it.
  • The storage plugin points at the AsyncStorage instance that ScriptManager uses for its cache, so cached remote scripts can be inspected in the MF hosts.
  • withOnBootNetworkActivityRecording() runs in each entry so early requests (e.g. MF v2 manifest/preload fetches) are captured.
  • tester-expo passes projectType: 'react-native-cli'. Rozenite otherwise guesses "Expo" and patches the dev-middleware copy resolved through Expo's CLI, but Re.Pack serves DevTools through React Native's copy. They happen to be the same file in this workspace today, but that isn't guaranteed.
  • tester-expo doesn't get the React Navigation plugin. expo-router 57 vendors React Navigation, so useNavigationContainerRef() from expo-router doesn't typecheck against the plugin's @react-navigation/core types, and I didn't want a cast. (Upstream issue: the Rozenite docs show exactly this usage.)
  • Plugin hooks are no-ops when NODE_ENV === 'production', so release bundles aren't affected.
  • All packages are dev dependencies pinned in the testers catalog (2.5.0).

Test plan

  • WITH_ROZENITE=true dev servers for all four apps report the expected plugins at /rozenite/app/config. With the flag off, /rozenite returns 404.
  • Android emulator (tester-app, RN 0.86 before rebase): /json/list returns devtoolsFrontendUrl: /rozenite/rn_fusebox.html…, DevTools shows the Rozenite tab with the Network Activity panel, and a boot-time request was recorded
  • tester-app vitest (17/17), @callstack/repack-expo tests (125/125), biome, tsc for tester-expo (other testers have only pre-existing errors)
  • Device check on the MF v2 host (navigation + storage panels) after RN 0.88

@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
repack-website Ready Ready Preview Nov 18, 2026 1:24pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f1c96b0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dannyhw

dannyhw commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@callstack callstack deleted a comment from apex-sentinel-staging Bot Nov 9, 2026
@callstack callstack deleted a comment from apex-sentinel-staging Bot Nov 9, 2026
@apex-sentinel-staging

This comment has been minimized.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 4 new findings on 146524d. The verdict and the full list are in the summary comment.

Comment thread apps/tester-app/webpack.config.mjs Resolved
Comment thread apps/tester-app/src/rozenite.ts Resolved
@MrMuzyk

MrMuzyk commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

@dannyhw
Needs a rebase and addressing this comment from Apex - preferably by updating the comment and CONTRIBUTING.md mentioning that WITH_PRELOAD has to be true in order to populate Storage tab in devtools.

Other than that LGTM 👌

Wrap the tester-app, MF v1/v2 host and tester-expo configs with
withRozenite, gated behind WITH_ROZENITE=true, and wire up the network
activity plugin, plus React Navigation and AsyncStorage (ScriptManager
cache) plugins in the Module Federation hosts.
The tester configs imported @rozenite/repack and the apps imported the
Rozenite plugins in every run, so default dev runs and E2E builds bundled
and ran DevTools code even with the flag off.

Configs now import @rozenite/repack only when WITH_ROZENITE=true, and each
tester requires its plugins from rozenitePlugins.ts behind a
__WITH_ROZENITE__ define, so the bundler drops them otherwise. Documented
in CONTRIBUTING.md and AGENTS.md.
@dannyhw

dannyhw commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto main (6e72ac0). The only conflict was apps/tester-federation-v2/src/host/index.js against the LogBox/global.css/setup changes from #1514, and both sides are kept. @MrMuzyk: addressed the WITH_PRELOAD note in f1c96b0.

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of f1c96b0

Since the review of 146524d: 1 new · 1 still open · 3 no longer raised (1 marked fixed)

2 finding(s): 2 minor.

🟡 Minor (2)

Where Finding
apps/tester-expo/components/rozenite.ts:4 🆕 Release builds of tester-expo hit WITH_ROZENITE as an undefined global
apps/tester-federation-v2/config.host-app.mts:19 Top-level await added to .mts configs that the app's tsconfig still compiles as ES2020
Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

2 findings below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (6e72ac0df314).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@apex-sentinel-staging apex-sentinel-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apex Sentinel: 1 new finding on f1c96b0. The verdict and the full list are in the summary comment.

Comment thread apps/tester-expo/components/rozenite.ts Resolved
@dannyhw
dannyhw merged commit f9491e6 into main Nov 18, 2026
13 checks passed
@dannyhw
dannyhw deleted the feat/rozenite-tester-apps branch November 18, 2026 14:36

This branch was successfully deployed

1 active deployment
Preview — f1c96b0d Deployed Nov 18, 2026 by vercel[bot]
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