-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: add deep linking support for Chrome DevTools performance marks #33514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add deep linking support for Chrome DevTools performance marks #33514
Conversation
- Add navigation property to performance marks with deep linking data - Enables clickable links from Chrome DevTools to Nuxt DevTools - Implements feature requested in issue nuxt#33015 Tested and verified: - Performance marks now include navigation: {name, url, params} - Works with all Nuxt events: dev:ssr-logs, app:created, app:beforeMount, vue:setup, app:suspense:resolve, app:mounted - Deep link format: nuxt-devtools://performance/trace/{event-name}
|
|
WalkthroughAdds deep-linking navigation support to Nuxt DevTools timing tracks by extending the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts (2)
22-30: Consider removing redundant parameter.The
params.eventduplicatesevent.name, which is already encoded in the URL path. If the DevTools consumer can parse the URL, this parameter may be unnecessary.Additionally,
Date.now()provides wall-clock time rather than performance timing. If precise correlation with the performance measure is needed, consider using the performance timing instead (e.g.,event.__startTimeor the measure's actual timestamp).If redundancy removal is desired, apply this diff:
navigation: { name: 'Open in Nuxt DevTools', url: `nuxt-devtools://performance/trace/${event.name}`, - params: { - event: event.name, - timestamp: Date.now().toString(), - }, },Or retain params but remove the duplicate:
navigation: { name: 'Open in Nuxt DevTools', url: `nuxt-devtools://performance/trace/${event.name}`, params: { - event: event.name, timestamp: Date.now().toString(), }, },
51-56: Consider adding JSDoc documentation.The new
navigationproperty enables deep linking to Nuxt DevTools from Chrome DevTools. Adding JSDoc comments would help future maintainers understand its purpose and usage.Apply this diff to add documentation:
+ /** Deep linking support for Chrome DevTools - enables clickable links to Nuxt DevTools */ navigation?: { + /** Display text for the link */ name: string + /** Deep link URL (e.g., nuxt-devtools://...) */ url: string + /** Optional parameters to pass with the link */ params?: Record<string, string> }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Follow standard TypeScript conventions and best practices
Files:
packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: code
- GitHub Check: build
@nuxt/kit
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
- Remove redundant event parameter from navigation params - Add JSDoc documentation for navigation property - Keep timestamp for correlation purposes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Follow standard TypeScript conventions and best practices
Files:
packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: code
🔇 Additional comments (1)
packages/nuxt/src/app/plugins/browser-devtools-timing.client.ts (1)
50-58: LGTM! Well-documented interface extension.The optional
navigationfield is properly typed and documented. The structure correctly supports the deep linking feature whilst maintaining backward compatibility.
- Remove redundant event parameter from navigation params - Add JSDoc documentation for navigation property - Keep timestamp for correlation purposes
CodSpeed Performance ReportMerging #33514 will not alter performanceComparing Summary
|
|
@danielroe Please have a look :) |
|
@DipakHalkude how are you testing this? |
|
I tested it: I ran the dev server and checked the browser console with these commands: |
|
Output is: |
|
I don't believe clicking those links will do anything, though? or am I misunderstanding? |
|
You're correct - these links aren't clickable in console. The feature provides the data structure for Chrome DevTools Performance panel to create clickable links, as specified in the original issue. The actual click handling is implemented by Chrome DevTools when they read these navigation properties from performance marks. 🚀 The links become clickable |
|
@danielroe Is this ok? Like just asking for your feedback :) |
|
thank you very much ❤️ this looks great but I'd like to land it as a working feature. and the |




Tested and verified:
🔗 Linked issue
Result