Skip to content

fix(icon): register hyphenated collection prefixes - #295

Merged
harlan-zw merged 2 commits into
mainfrom
fix/icon-hyphenated-collections
Sep 29, 2026
Merged

harlan-zw merged 2 commits into
mainfrom
fix/icon-hyphenated-collections

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

❓ Type of change

  • 🐞 Bug fix

📚 Description

Production Workers Logs show about 900k warnings a day like these, roughly 87% of our log volume:

[Icon] failed to load icon `vscode-icons-file-type-markdown`
[Icon] loading icon `vscode-icons-file-type-markdown` timed out after 1500ms

With serverBundle: false and fallbackToApi: false, @nuxt/icon puts an empty collections list in app config. useResolvedName then cannot split vscode-icons-file-type-markdown into prefix and name, so Iconify reads the prefix as vscode and misses the client bundle. simple-icons fails the same way; lucide works only because it has no hyphen. The SSR HTML shipped a bare class with no CSS, and every skill page waited on the fetch timeout.

The config now lists every installed @iconify-json/* collection, so a new collection gets the same fix without an edit. Upstream could derive this list from the client bundle; I have not opened an issue there yet.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

With serverBundle off and no API fallback, @nuxt/icon knows no collection names, so i-vscode-icons-* and i-simple-icons-* split at the first hyphen and never resolve. Each miss logged a warning and stalled SSR up to the 1500ms fetch timeout.
@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Checked by hand in nuxi dev, since CI cannot cover it:

  • Before: /gh/obra/superpowers/systematic-debugging SSR shipped class="iconify i-vscode-icons-file-type-markdown" with no CSS rule. The server log had Collection vscode is not found locally, Collection simple is not found locally, and 23 [Icon] warnings over 3 pages.
  • After: the same page ships class="iconify i-vscode-icons:file-type-markdown" plus an inlined :where(.i-vscode-icons\:file-type-markdown) rule. The homepage inlines all 12 :where(.i-simple-icons\:...) rules.
  • After: a clean restart and the same 4 pages logged zero [Icon] lines.

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 29, 2026
@harlan-github-agent

harlan-github-agent Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-09-29 05:12 UTC.

GitHub merged this pull request.

No material findings were recorded.

The pull request closed.

@harlan-github-agent harlan-github-agent Bot added harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. harlan-agent-blocked The automated Review found a material defect in this head commit. labels Sep 29, 2026
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-running An Agent holds a Task on this issue or pull request right now. label Sep 29, 2026
@harlan-zw
harlan-zw merged commit 1fb6760 into main Sep 29, 2026
5 checks passed
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.

1 participant