Skip to content

fix(devtools): bundle branding logos instead of loading from nuxt.com and jsDelivr - #1166

Merged
antfu merged 2 commits into
mainfrom
fix/bundle-branding-assets
Nov 24, 2026
Merged

antfu merged 2 commits into
mainfrom
fix/bundle-branding-assets

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Summary

The DevTools UI loaded its branding images from third-party hosts every time it opened:

  • tab logo from https://nuxt.com/assets/design-kit/icon-green.svg
  • wordmarks from cdn.jsdelivr.net/gh/nuxt/devtools@main/... (also unpinned, tracks main)
  • the onboarding panel (@nuxt/devtools-onboard) used the same nuxt.com logo

Offline or on locked-down networks these images break, and opening DevTools sends a request to a third party.

This PR inlines the SVGs from assets/ as data:image/svg+xml URIs (packages/devtools/src/branding.ts). The Devframe hub UI and onboard panel render these values as <img src> / <link href>, so data URIs work as-is. The light and dark wordmarks differ only in text fill, so they share one template.

It also sets branding.favicon to the Nuxt logo. Before, it was not set, so the shallow merge kept the Vite+ favicon from Vite DevTools defaults.

devtools-onboard gets its own copy of the logo constant, because it must work without @nuxt/devtools installed (optional peer).

User prompts

Model: Claude Opus 5.5 in Claude Code (Paseo).

  • After upgrading to Nuxt 4.7 and installing @nuxt/devtools 4.2, the user noticed the tab logo loads from nuxt.com and asked whether it should be bundled instead.
  • Asked to fix it and open a PR.

Verification

  • Decoded each data URI and compared it to assets/nuxt.svg, assets/nuxt-devtools-light.svg, assets/nuxt-devtools-dark.svg (whitespace-normalized): all 4 equal, onboard logo identical to devtools logo.
  • pnpm build in packages/devtools and packages/devtools-onboard: pass. grep -r "nuxt.com/assets\|jsdelivr" dist: no matches.
  • pnpm vitest run: 23 files, 134 tests passed.
  • eslint on changed files: clean.
  • Not verified: rendering in a running dev server (no screenshot taken). Rendering path checked by reading @devframes/hub-ui and @devframes/hub-ui-onboard dist (img.src / link[rel=icon]).

Written with an AI agent. The user reported the issue and approved the fix approach; they have not reviewed the diff yet.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The onboarding and DevTools modules now use embedded SVG data URLs for Nuxt branding. The DevTools branding uses a local logo and favicon, plus wordmarks for light and dark modes. The changes replace remote image URLs in both modules.

Estimated code review effort: 2 (Simple) | ~8 minutes

Merge Risk: Minimal · up to a977c

This change embeds the Nuxt branding images directly in the DevTools and onboarding modules so they work offline and make no third-party requests. No merge-blocking problems were found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: DevTools branding logos are now bundled locally instead of being loaded from nuxt.com and jsDelivr. The raw summary and objectives confirm the change inlines the SVGs …
Description check Passed The description explains the problem (third-party image loads from nuxt.com and jsDelivr), the fix (inlined SVG data URIs in branding.ts), the onboard logo copy, the favicon change, and the verificati…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: DevTools branding logos are now bundled locally instead of being loaded from nuxt.com and jsDelivr. The raw summary and objectives confirm the change inlines the SVGs as data URIs in branding.ts. The title is specific and matches the changeset.

Full details: Description check

Explanation

The description explains the problem (third-party image loads from nuxt.com and jsDelivr), the fix (inlined SVG data URIs in branding.ts), the onboard logo copy, the favicon change, and the verification steps. It relates directly to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c7921e4e-bee7-47a4-b81c-9bf76c40ba0a
Commits

Reviewing files that changed from the base of the PR and between b83b0cd and a977cf1.

Files selected for processing: 1

  • skills-lock.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@antfu
antfu merged commit e7b55b5 into main Nov 24, 2026
9 checks passed
@antfu
antfu deleted the fix/bundle-branding-assets branch November 24, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants