Repository navigation
fix(cli): Point mode on an Expo preview highlights the element under the cursor - #1035
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
runExpoBringUpregisteredinspector: 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 thereadyhandshake the dashboard falls back to the draw-a-box gesture. Confirmed on the owner's live preview: the HTML has nocodeam-inspectorscript.Fix
bringUpInspectorin front of the tunnel port (Metro or the app-server proxy). This is the samepointPickerScriptRemix uses. Expo Go never makes an HTML navigation, so it never gets the script. With no web build (QR only), no inspector.startInspectorProxytakes optionalupstreamHeaders. Expo passesdevRequestHeaders, because Metro 500s a same-originOriginthat is not its own host (the v2.76.52 icon-font fix).devRequestHeadersalso rewrites an Origin equal to this hop's own loopback host, which covers the chain tunnel -> inspector -> app-server proxy -> Metro.killPreview.Verification
__tests__/preview/inspector-proxy.expo.int.test.tsruns 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.tsc --noEmitis clean.“Soy mamá o papá” button). A click sendspick:button.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.