Repository navigation
Conversation
The component inspector sends paths relative to the workspace root, but openInEditor only joined them with the package cwd. Files outside that package were reported missing. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
🔗 Linked issue
resolves #1097
📚 Description
Relative inspector paths were only joined with
process.cwd(). In a workspace package that directory is the package itself, sosrc/components/button/Button.demo.vuebecomes<repo>/docs/src/components/button/Button.demo.vueand the file is reported missing.openInEditornow triesprocess.cwd(),rootDir, andworkspaceDir, and opens the first path that exists. The:line:colsuffix is stripped before the join. Auth andlaunch-editorare unchanged.#1098 already did this on main. Nuxt 4.6 still depends on 3.4.4, so this brings the same lookup to v3.
In
packages/devtools,pnpm exec vitest run test/open-in-editor.test.ts test/server-rpc-auth.test.ts. The caseopens a file that lives at the workspace root, outside the Nuxt packagesendssrc/components/button/Button.demo.vue:27:2with cwd atdocs/and expects the file under the workspace root. That case passes on this branch. I did not run the repo lint or typecheck, and I did not boot this build in a running Nuxt app.