fix(search): exclude Configure from devtools source injection#841
fix(search): exclude Configure from devtools source injection#841tannerlinsley merged 1 commit intomainfrom
Conversation
react-instantsearch's <Configure> widget forwards all of its JSX props
to Algolia's search parameters. The @tanstack/devtools-vite plugin
injects `data-tsd-source="file:line:col"` onto every JSX element in dev,
and Configure's pass-through meant the attribute ended up in the request
body. Algolia responded with:
{"message":"Unknown parameter: data-tsd-source","status":400}
and InstantSearch silently circuit-broke — typing in the docsearch
modal produced no results.
Pass `injectSource.ignore.components: ['Configure']` so the devtools
plugin leaves <Configure> alone. Dev-only change; prod builds already
strip the attribute.
✅ Deploy Preview for tanstack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Picks up: - fix(react-dom): alias event.nativeEvent on dispatched handlers — fixes react-instantsearch site search (onChange throws on event.nativeEvent.isComposing without the alias, silently swallowing every keystroke). - fix(react-dom): fire onChange on every keystroke for text inputs (onChange → native input event for text-like inputs). - perf(react-dom): renderFiber pointer-table dispatch. - feat(react): dev-mode hint pointing at "use client" when a hooks error fires during RSC render. Combined with the Configure source-injection fix from #841, this restores in-dev site search.

Summary
react-instantsearch's<Configure>widget forwards all JSX props to Algolia's search parameters.@tanstack/devtools-viteplugin injectsdata-tsd-source="file:line:col"onto every JSX element in dev.{"message":"Unknown parameter: data-tsd-source","status":400}, and InstantSearch silently circuit-broke — typing in the site search produced no results in dev.Pass
injectSource.ignore.components: ['Configure']so the devtools plugin leaves<Configure>alone. Dev-only change; prod builds already strip the attribute (so prod search was unaffected).Test plan
NO_SHIM=1) — both now return 20 hits for "useQuery"pnpm huskypasses (format + tsc + lint + smoke: 4/4)Isolated from the site-search symptom: the shim also had a latent bug where
event.nativeEventwasundefinedon dispatched handlers (react-instantsearch readsevent.nativeEvent.isComposing). That was fixed upstream in the shim repo: TanStack/react@1c71ed6.Summary by CodeRabbit