{{ message }}
Repository navigation
feat(devtools): let the source inspector's open-source URL be configured - #517
Merged
AlemTuzlak merged 1 commit intoSep 23, 2026
Merged
Conversation
"ide-warp" requests __tsd/open-source, which only @tanstack/devtools-vite
serves. Anything else that injects data-tsd-source -- an SWC plugin under
Next.js, for instance -- drives the overlay fine but has no endpoint to answer
the click, and fetch(...).catch(() => {}) hides the 404, so the click looks
like it did nothing.
openSourceUrl takes the clicked element's data-tsd-source value and returns
the URL to request. The whole URL rather than just its base, because another
host generally wants another parameter shape: Next's own editor endpoint takes
the position split into file, line1 and column1.
A function rather than a string: settings are persisted to local storage and
take priority over config on the next load, so a string would keep serving
whatever the app was configured with the first time it ran. JSON.stringify
drops functions, which keeps the key out of storage the way customTrigger
already is.
thedv91
force-pushed
the
feat-configurable-open-source-url
branch
from
August 22, 2026 03:43
d439dea to
f211e18
Compare
AlemTuzlak
approved these changes
Aug 24, 2026
|
View your CI Pipeline Execution ↗ for commit f211e18
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit f211e18
☁️ Nx Cloud last updated this comment at |
3 tasks done
Merged
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.

Implements #514. That discussion hasn't been answered yet, so treat this as the concrete version of the proposal rather than something agreed — happy to reshape it or close it if you'd rather the key looked different.
🎯 Changes
sourceAction: "ide-warp"requests__tsd/open-source?source=…, which only@tanstack/devtools-viteserves. Anything else that injectsdata-tsd-source— an SWC plugin under Next.js, in my case — lights the overlay up correctly but has no endpoint to answer the click, andfetch(...).catch(() => {})hides the 404, so an inspect click is indistinguishable from a click that did nothing.New config key, alongside
sourceAction:Two decisions worth flagging, both arguable:
The whole URL, not just its base. Another host generally wants another parameter shape — Next's own editor endpoint takes the position split into
file,line1,column1, not the packedpath:line:column. A configurable base would still leave that host with no route.A function, not a string. Settings are persisted to local storage and take priority over
configon the next load, so a string would keep serving whatever the app was configured with the first time it ran, ignoring later changes.JSON.stringifydrops functions, so this key stays out of storage the waycustomTriggeralready does. Confirmed in the browser: changed a setting in the panel to force a settings write, andopenSourceUrlis absent from the 14 keys intanstack_devtools_settingswhile the click still routes correctly after a reload.Unset, the Vite endpoint is used exactly as before,
BASE_URLincluded. Ignored undersourceAction: "copy-path", which makes no request.Verification —
pnpm test:prequivalent green (84/84 affected tasks). Four unit tests insource-inspector.test.tsxcover the default URL, a path, an absolute URL, and the copy-path case. Exercised end to end inexamples/react/basicwith the Next-shaped builder above: the inspect click issuedGET /__nextjs_launch-editor?file=%2Fsrc%2Findex.tsx&line1=191&column1=15instead of__tsd/open-source.Independent of #516 — different part of the file. Whichever lands second, I'll rebase.
✅ Checklist
pnpm test:pr.🚀 Release Impact
Summary by CodeRabbit
New Features
openSourceUrlsetting to customize where source-inspector links open files.Documentation
copy-pathbehavior.