Skip to content

fix(cli): Point mode on an Expo preview highlights the element under the cursor - #1035

Merged
edgar-durand merged 1 commit into
mainfrom
fix/expo-preview-inspector
Nov 24, 2026
Merged

edgar-durand merged 1 commit into
mainfrom
fix/expo-preview-inspector

Conversation

@edgar-durand

@edgar-durand edgar-durand commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

In the web dashboard's session Preview, Point mode on an Expo app showed only "Tap or drag to mark" with no hover highlight. Remix's player highlights the element under the cursor.

Root cause

runExpoBringUp registered inspector: null ("a DOM inspector means nothing against a native app"). Since v2.76.42 the frame shows Expo's WEB build (react-native-web DOM), so the picker applies, but no proxy injected it. Without the ready handshake the dashboard falls back to the draw-a-box gesture. Confirmed on the owner's live preview: the HTML has no codeam-inspector script.

Fix

  • Expo with a web build: bringUpInspector in front of the tunnel port (Metro or the app-server proxy). This is the same pointPickerScript Remix uses. Expo Go never makes an HTML navigation, so it never gets the script. With no web build (QR only), no inspector.
  • startInspectorProxy takes optional upstreamHeaders. Expo passes devRequestHeaders, because Metro 500s a same-origin Origin that is not its own host (the v2.76.52 icon-font fix).
  • devRequestHeaders also rewrites an Origin equal to this hop's own loopback host, which covers the chain tunnel -> inspector -> app-server proxy -> Metro.
  • The inspector closes on every failure path and is registered for killPreview.

Verification

  • __tests__/preview/inspector-proxy.expo.int.test.ts runs the real chain (with and without the app-server proxy) against a Metro stand-in that refuses foreign Origins. The page gets the script and same-origin fonts return 200. Without the rewrite they return 500.
  • CLI preview suite: 534 tests pass. tsc --noEmit is clean.
  • Browser harness: the owner's live Pasito Expo preview, with this exact inspector script injected and driven by the dashboard protocol. Hover draws the Remix ring and the serif label (“Soy mamá o papá” button). A click sends pick:button.

🤖 Generated with Claude Code


Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…the cursor

The Expo bring-up never put the inspector proxy in front of Metro ("a DOM
inspector means nothing against a native app"), but since v2.76.42 the
frame shows Expo's WEB build: react-native-web DOM. With no injected
picker the dashboard fell back to drawing boxes, so Point showed only
"Tap or drag to mark" and no hover highlight.

When the web build is served, the inspector (the same Remix picker every
Vite preview gets) now sits first: tunnel -> inspector -> [app-server
proxy] -> Metro. Expo Go only requests manifests and bundles, never an
HTML navigation, so it never sees the script. The proxy takes its
upstream headers from `devRequestHeaders` here, because Metro 500s a
same-origin Origin that is not its own host; that rule now also accepts
the loopback Origin a proxy in front already rewrote for this hop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@edgar-durand
edgar-durand merged commit f05bb23 into main Nov 24, 2026
10 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