Repository navigation
chore(testers): add Rozenite DevTools plugins to tester apps - #1509
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
db32e4b to
425ac31
Compare
425ac31 to
4b4f357
Compare
4b4f357 to
146524d
Compare
|
/review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 4 new findings on 146524d. The verdict and the full list are in the summary comment.
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.
146524d to
f1c96b0
Compare
Apex Sentinel · ✅ Approve · review of
|
| 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.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on f1c96b0. The verdict and the full list are in the summary comment.
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,withRozenitereturns the config unchanged (/rozenite404s).tester-apprspack.config.mjs,webpack.config.mjstester-federationconfig.host-app.mts(rspack + webpack)tester-federation-v2config.host-app.mts(rspack + webpack)tester-exporspack.config.mjsScriptManageruses 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-expopassesprojectType: '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-expodoesn't get the React Navigation plugin. expo-router 57 vendors React Navigation, souseNavigationContainerRef()from expo-router doesn't typecheck against the plugin's@react-navigation/coretypes, and I didn't want a cast. (Upstream issue: the Rozenite docs show exactly this usage.)NODE_ENV === 'production', so release bundles aren't affected.testerscatalog (2.5.0).Test plan
WITH_ROZENITE=truedev servers for all four apps report the expected plugins at/rozenite/app/config. With the flag off,/rozenitereturns 404./json/listreturnsdevtoolsFrontendUrl: /rozenite/rn_fusebox.html…, DevTools shows the Rozenite tab with the Network Activity panel, and a boot-time request was recordedtester-appvitest (17/17),@callstack/repack-expotests (125/125), biome,tscfortester-expo(other testers have only pre-existing errors)