Skip to content

feat: Add more features and tests to MF2 test app - #1514

Merged
dannyhw merged 34 commits into
callstack:mainfrom
MrMuzyk:add-more-features-to-mf2-testing-app
Nov 16, 2026
Merged

dannyhw merged 34 commits into
callstack:mainfrom
MrMuzyk:add-more-features-to-mf2-testing-app

Conversation

@MrMuzyk

@MrMuzyk MrMuzyk commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Grows apps/tester-federation-v2 into the app that covers Re.Pack's bundling and runtime surface on a device, so checking a change means booting one app instead of several. Six new feature screens (NativeWind, Reanimated, runtime events, async chunk, remote chunk, mini-app install), a FEATURES.ts registry driving Home, typed against the navigator’s routes, and one e2e spec per feature replacing smoke.e2e.ts — every spec owns one distinct way to fail, with one documented exception (miniapp-install overlaps remote-chunk, kept as the manual install / clear-cache demo).

  • Asset rules split into four explicit rules (90 KB inline gate, svgr for .svg, localAssets always emitted, inlineAssets always inlined), and the Host Assets spec asserts each one produces what it claims, including the emitted URI actually served (fetch → 200 built from the on-screen URI, never hardcoded).
  • NativeWindPlugin and ReanimatedPlugin wired into both rspack and webpack configs (kept in parity), with the NativeWind toolchain and a host-scoped JSX retag in babel.
  • extraChunks gains a local rule for the async chunk (/^host-async-local$/ — anchored so a chunk whose name only contains host-async-local doesn’t become local too).
  • The runtime-event counters tap only the non-owning ScriptManager hooks: resolve/load are bail hooks, so a counting tap would replace the built-in loop instead of observing it.
  • Boot anchor (home-screen after app.open()) asserts at 30 s: app.open() returns when the window draws, and a cold JS boot on the CI emulator needs more than the 5 s default. Two more overrides, both with a named cause in design.md: 45 s on miniapp-gallery, 30 s on pipeline: settled.

agent_context/e2e-oct2026/design.md documents layout, conventions and the traps worth knowing before editing this app.

Test plan

Demo video:

mf2-upgraded-v2.mp4

CI: https://github.com/MrMuzyk/repack/actions/runs/43412470991 — Android + iOS, artifacts carry junit, screenshots and dev-server logs on failure.

Locally (boot an emulator/simulator first; Node ≥ 24.8):

adb shell cmd uimode night no        # or: xcrun simctl ui booted appearance light
pnpm start:hostapp    # 8081
pnpm start:miniapp    # 8082
E2E_DEVICE=<name> pnpm exec e2e run --target ios   # or --target android

The Debug build loads JS from the two dev servers, so both must stay up. Warm the platform bundle on a fresh server before the first run (curl the index.bundle URL the workflow uses), otherwise the cold compile eats the boot anchor.

Every spec owns one distinct way to fail, with one documented exception (miniapp-install overlaps remote-chunk, kept as the manual install / clear-cache demo).

Webpack config is maintained in parity but the CI lane runs rspack only; pnpm start:hostapp:webpack + pnpm start:miniapp:webpack run the suite against it.

@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

@MrMuzyk is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9c28bcf

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

@MrMuzyk
MrMuzyk marked this pull request as ready for review October 30, 2026 15:52
@apex-sentinel-staging

apex-sentinel-staging Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 1 no longer raised

No open findings.

Not in the reviewers' prompt (8 files)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack@2x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack@3x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack@2x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack@3x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/pic_3.jpg: no text diff (a binary, empty or mode-only change)
  • 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 (499679feaa85).

💬 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.

Earlier reviews

Review of ff52ef66 · 10.11.2026 11:48 UTC

Apex Sentinel

Verdict: approve

Since the last review: 1 new · 1 still open · 6 no longer raised

2 finding(s): 2 minor.

🟡 Minor (2)

Where Finding
apps/tester-federation-v2/src/host/screens/RuntimeEventsScreen.tsx:12 🆕 runtime-events pipeline row never updates after mount, so its 30 s retry is dead
apps/tester-federation-v2/src/host/setup.ts:19 Release branch of the resolver is dead code: every release chunk resolves to localhost:9999

5 findings below minor not shown (user_settings.min_severity).

Not in the reviewers' prompt (8 files)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack@2x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack@3x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack@2x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack@3x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/pic_3.jpg: no text diff (a binary, empty or mode-only change)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (499679feaa85).

Review of 4db27ce7 · 10.11.2026 10:39 UTC

Apex Sentinel

Verdict: request_changes

Since the last review: 5 new · 2 still open · 2 no longer raised

7 finding(s): 1 major, 6 minor.

Required fixes

  • Decide between: useAnimatedReaction args swapped: reported width is the previous frame, not the current / useAnimatedReaction null-check tests the non-nullable argument, so it never fires

🟠 Major (1)

Where Finding
apps/tester-federation-v2/src/host/features/reanimated/ReanimatedBox.tsx:26 🆕 useAnimatedReaction args swapped: reported width is the previous frame, not the current

🟡 Minor (6)

Where Finding
apps/tester-federation-v2/src/host/features/miniapp/MiniAppSection.tsx:17 install() after Clear cache re-runs import(), which stays in the chunk cache
apps/tester-federation-v2/src/host/features/miniapp/MiniAppSection.tsx:17 🆕 Mini-app install and clear-cache have no catch: a rejection becomes an unhandled rejection
apps/tester-federation-v2/src/host/features/reanimated/ReanimatedBox.tsx:25 🆕 useAnimatedReaction null-check tests the non-nullable argument, so it never fires
apps/tester-federation-v2/src/host/features/runtime/events.ts:72 getPipelineStatus counts a prefetched script as a settled load
apps/tester-federation-v2/src/host/index.js:6 🆕 LogBox.ignoreLogs runs too late: css-interop's injection already locks it
apps/tester-federation-v2/src/host/setup.ts:26 🆕 setup.ts resolver points release builds at http://localhost:9999, a port nothing serves

5 findings below minor not shown (user_settings.min_severity).

Not in the reviewers' prompt (8 files)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack@2x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack@3x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack@2x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack@3x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/pic_3.jpg: no text diff (a binary, empty or mode-only change)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (499679feaa85).

Review of b2772fee · 09.11.2026 14:48 UTC

Apex Sentinel

Verdict: approve

4 finding(s): 4 minor.

🟡 Minor (4)

Where Finding
apps/tester-federation-v2/src/host/navigation/MainNavigator.tsx:10 MiniAppInstallScreen imported with a literal .tsx extension in MainNavigator
apps/tester-federation-v2/src/host/features/miniapp/MiniAppSection.tsx:15 install() re-runs import() after invalidateScripts, which stays in the webpack chunk cache
apps/tester-federation-v2/src/host/features/runtime/events.ts:67 getPipelineStatus counts a prefetched script as a settled load
apps/tester-federation-v2/src/host/screens/HostAssetsScreen.tsx:128 HostAssetsScreen truncates the local asset URI with '…' when it is inlined, breaking the fetch assertion

6 findings below minor not shown (user_settings.min_severity).

Not in the reviewers' prompt (8 files)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack@2x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/inlineAssets/webpack@3x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack@2x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/localAssets/webpack@3x.png: no text diff (a binary, empty or mode-only change)
  • apps/tester-federation-v2/src/host/assets/pic_3.jpg: no text diff (a binary, empty or mode-only change)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

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

@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 b2772fe. The verdict and the full list are in the summary comment.

@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: 5 new findings on 4db27ce. The verdict and the full list are in the summary comment.

@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 ff52ef6. The verdict and the full list are in the summary comment.

@dannyhw dannyhw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ran this locally at ff52ef66: 8/8 on Android (API 35 emulator) and iOS (26.4 simulator), on Rspack and on webpack. I also broke a few things on purpose (inline gate 90 → 80 KB, skipping the afterLoad hook in ScriptManager, NativeWind inlineRem 16 → 14) and each time only the matching spec went red, at its own assert. That's exactly what the design doc promises, nice work.

A few things before this goes in, none of them big:

1. The webpack command in the test plan doesn't run webpack. USE_WEBPACK=1 pnpm start:hostapp picks the webpack config, but webpack-start chooses the engine from the config filename, and config.host-app.mts doesn't start with webpack, so it falls back to Rspack. The result is the webpack config running inside Rspack: the mini app throws in webpack/lib/IgnorePlugin.js, the host hangs at 9%, and all 8 specs fail at the boot anchor. With --bundler webpack on both servers I get 8/8 on both platforms. This gap is older than this PR, but since the test plan and design doc point people at it, could you either document USE_WEBPACK=1 pnpm start:hostapp --bundler webpack (same for start:miniapp) or add start:hostapp:webpack / start:miniapp:webpack scripts?

2. CI at the head. The last green run on your fork is 66a9047e, and 6578bebb and ff52ef66 changed app code after it. I'll approve the workflow run here; once it's green, please replace the <link the e2e run here> placeholder in the description. That run is also the only evidence for the 30 s / 45 s timeout overrides: locally Home shows in under 2 s and the gallery in under 1 s.

3. Small description fix. The reason given for anchoring the extraChunks pattern ("an unanchored pattern also matches numeric chunk ids") isn't quite right: /host-async-local/ can't match a number. The real risk is another chunk name containing that string, which is what design.md already says.

The rest is inline.

Comment thread agent_context/e2e-oct2026/design.md Resolved
Comment thread agent_context/e2e-oct2026/design.md Resolved
@MrMuzyk

MrMuzyk commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

@dannyhw Fixed and corrected everything. I did trigger one more run on fork and both android and ios passed - linked it in the PR description.

@MrMuzyk
MrMuzyk requested a review from dannyhw November 13, 2026 11:33

@dannyhw dannyhw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks!

@dannyhw
dannyhw merged commit ef8b801 into callstack:main Nov 16, 2026
6 of 7 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.

2 participants