- Move the slug-to-URL resolver into src/v2/utils/platformIcons so
PlatformIcon no longer pulls in the blob cache, and normalize slugs
through one helper.
- Keep PlatformIcon's tooltip as title or alt, which drops the three
:show-tooltip="false" overrides the slug fallback needed.
- Drop the plugin's unused directory argument, the redundant onError
guards and the doubled fsSlug lookup, and shorten the test helper.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Emit the slug-to-file map from the manifest plugin and reload it when
icons change under the dev server.
- Default the plugin's icon directory so both configs share one path.
- Keep decorative platform icons at an empty alt, and turn off the slug
tooltip where the display name already sits next to the icon.
- Clean up the manifest test's temp dir and cover CachedPlatformIcon.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The v2 platform icon components probed /assets/platforms/<slug>.svg, then
.ico, and let the browser 404 on every miss before settling on default.ico.
A build-time manifest of the shipped filenames (virtual:platform-icons) now
picks the right file up front, so unknown slugs go straight to the default
and the prefetch cache makes at most one request per shipped slug.
The manifest is a Vite virtual module rather than an eager import.meta.glob,
which would emit hashed copies of all ~240 icons and inline the small ones
into the lib chunk just to read their names.
RPlatformIcon moves out of lib/ to components/shared/PlatformIcon, since it
now depends on platform-specific asset knowledge. Its tooltip also falls
back to the slug when no title or alt is given (the empty-string alt default
used to short-circuit the `??` chain).
Based on the approach in #4728 by @andest01.
Fixes#4671
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>