Skip to content

feat: Update tester-expo app and cover it with e2e tests - #1519

Open
MrMuzyk wants to merge 34 commits into
callstack:mainfrom
MrMuzyk:tester-expo-app-e2e
Open

MrMuzyk wants to merge 34 commits into
callstack:mainfrom
MrMuzyk:tester-expo-app-e2e

Conversation

@MrMuzyk

@MrMuzyk MrMuzyk commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Covers apps/tester-expo with e2e tests, so an Expo change no longer means booting the Expo apps by hand. Until now PRs only typechecked it. A second lane, e2e-expo.yml, runs it on the same tooling and rules as the MF2 lane: a FEATURES.ts registry driving Home, one screen and one spec per feature, every spec owning one distinct way to fail. Nine specs: Expo native module, image, density image, font, local async chunk, Expo-built remote (ExpoWidget), plain Re.Pack remote (OrdinaryWidget), Fast Refresh, symbolication.

  • The app loads JS from three dev servers: the host (8081), tester-expo-widget (8082) and MF2's start:expo-host-widget (8083). The workflow starts and warms all three; adb reverse gets a third port.
  • Android runs on every PR, iOS on main and dispatch — same as the MF2 lane. expo prebuild generates the native folders first, since they are not in git.
  • fast-refresh edits components/FastRefreshLeaf.tsx on disk and checks that the new text shows up while the counter keeps its value (no full reload). The file is restored in finally.
  • symbolication sends its own error through RN's parseErrorStack + symbolicateStackTrace and checks that the first frame maps back to SymbolicationProbe.tsx:<line>; the line is read from the file, never hardcoded.
  • babel.config.cjs sets disableDeepImportWarnings: true. RN 0.88 turns the first warning into a toast that steals e2e taps, and babel-preset-expo's deep-import lint fires on the linked packages/repack and on the probe's RN imports. No LogBox filter, so a new warning still shows.
  • e2e.yml triggers change from a paths allow-list to paths-ignore: website/**, **/*.md, same as the new workflow. Root files like pnpm-workspace.yaml change what the apps run, and the allow-list skipped them.

agent_context/e2e-oct2026/design.md is split into shared rules, the MF2 lane and the Expo lane; the Expo part has the coverage table, the break-once record and the traps.

Test plan

Demo video:

tester-expo.mp4

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

Locally (boot an emulator/simulator and install the app first — pnpm repack:android / pnpm repack:ios in apps/tester-expo; Node ≥ 24.8):

pnpm --filter tester-expo repack:start                       # 8081
pnpm --filter tester-expo-widget repack:start:remote         # 8082
pnpm --filter tester-federation-v2 start:expo-host-widget    # 8083
E2E_DEVICE=<name> pnpm exec e2e run --target ios             # in apps/tester-expo, or --target android

The Debug build loads JS from all three servers, so they must stay up. Warm them on a fresh start (the index.bundle and mf-manifest.json URLs the workflow uses), otherwise the cold compile eats the boot anchor. After a pnpm install that changes the lockfile, restart them — a running server keeps the old package paths.

9/9 green locally on Android (API 35 emulator) and iOS (iPhone 17 Pro simulator). Each spec was broken once on purpose and went red at its own assert — the break-once table in design.md lists what was broken.

@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 46a6035

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

@vercel

vercel Bot commented Nov 3, 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.

@MrMuzyk

MrMuzyk commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Still in draft. Waits for #1514

@MrMuzyk
MrMuzyk marked this pull request as ready for review November 16, 2026 15:29
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve

2 finding(s): 2 minor.

🟡 Minor (2)

Where Finding
apps/tester-expo/app/symbolication.tsx:10 Failed symbolication leaves the button reading "Symbolicated" and disabled
.github/workflows/e2e-expo.yml:200 e2e-expo iOS job boots a simulator before prebuild; simctl create can die on a stale e2e device
Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

3 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: 2 new findings on 46a6035. The verdict and the full list are in the summary comment.

Comment on lines +10 to +23
<Screen testID="symbolication-screen">
<ActionButton
testID="symbolication-probe-button"
label={frame ? 'Symbolicated' : 'Symbolicate a stack trace'}
disabled={frame !== undefined}
onPress={probe}
/>
{frame && (
<Report
testID="symbolication-frame-report"
name="frame"
value={frame}
/>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Minor · Failed symbolication leaves the button reading "Symbolicated" and disabled

When symbolicateStackTrace rejects, the screen reports frame: failed: <message> but the button still reads "Symbolicated" and is disabled — no retry, and the state claims success. frame is a single string holding either a symbolicated frame or an error message, and app/symbolication.tsx derives both the label and disabled from frame !== undefined.

Suggested change
<Screen testID="symbolication-screen">
<ActionButton
testID="symbolication-probe-button"
label={frame ? 'Symbolicated' : 'Symbolicate a stack trace'}
disabled={frame !== undefined}
onPress={probe}
/>
{frame && (
<Report
testID="symbolication-frame-report"
name="frame"
value={frame}
/>
)}
<ActionButton
testID="symbolication-probe-button"
label={frame ? (frame.startsWith('failed:') ? 'Retry' : 'Symbolicated') : 'Symbolicate a stack trace'}
disabled={frame !== undefined && !frame.startsWith('failed:')}
onPress={probe}
/>

Suggested change

Have the hook return a status (idle | symbolicated | failed) alongside the frame — or separate frame and error — and drive the label and disabled from that, so a failed probe stays tappable and never says "Symbolicated".

Details

persona: maintainability, javascript, senior-developer

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

Comment on lines +200 to +218
run: |
curl -sf --max-time 300 -o /dev/null 'http://localhost:8081/index.bundle?platform=ios&dev=true&lazy=true&minify=false&app=com.callstack.repackexpo&modulesOnly=false&runModule=true'
curl -sf --max-time 300 -o /dev/null 'http://localhost:8082/ios/mf-manifest.json'
curl -sf --max-time 300 -o /dev/null 'http://localhost:8083/ios/mf-manifest.json'
echo 'All three served; compilers are warm.'

- name: Check shared versions are real semver
run: |
for p in 8081 8082; do
M=$(curl -sf --retry 3 --retry-delay 2 "http://localhost:$p/ios/mf-manifest.json") || { echo "::error::port $p: mf-manifest.json not served"; exit 1; }
[ "$(jq '.shared | length' <<<"$M")" -gt 0 ] || { echo "::error::port $p: manifest has no shared entries"; exit 1; }
BAD=$(jq -r '.shared[] | select((.version // "") | test("^[0-9]+\\.[0-9]+\\.[0-9]+") | not) | "\(.name): \(.version)"' <<<"$M")
[ -z "$BAD" ] || { echo "::error::port $p has non-semver shared versions: $BAD"; exit 1; }
done

# SIM_RUNTIME_PREFIX is tied to the Xcode picked in DEVELOPER_DIR
- name: Boot simulator
env:
SIM_RUNTIME_PREFIX: com.apple.CoreSimulator.SimRuntime.iOS-26-

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Minor · e2e-expo iOS job boots a simulator before prebuild; simctl create can die on a stale e2e device

xcrun simctl create e2e exits 1 with "device already exists" on any re-run or stateful macOS runner where the e2e device persists in ~/Library/Developer/CoreSimulator/Devices from a prior boot. simctl create is not idempotent, so the step kills the job before any test runs.

Suggested change

Add xcrun simctl delete e2e >/dev/null 2>&1 || true before xcrun simctl create e2e to remove any pre-existing device. Also resolve the runtime via simctl list runtimes -j | jq filtering on $SIM_RUNTIME_PREFIX and assert it is non-null before passing it to create.

Details

persona: senior-developer

Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.

Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.

This branch has not been deployed

No deployments
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.

1 participant