Skip to content

Fix 17 missing icons in the SVG sprite and the validation logic - #482

Merged
Lee Murray (mrleemurray) merged 7 commits into
microsoft:mainfrom
rstaib:main
Sep 22, 2026
Merged

Lee Murray (mrleemurray) merged 7 commits into
microsoft:mainfrom
rstaib:main

Conversation

@rstaib

Copy link
Copy Markdown
Contributor

Summary

Note: reordering mapping.json flips the canonical name for these 17 in the generated codiconsLibrary.ts (e.g. symbolVariable is now the definition, variable its alias). All existing names still resolve.

17 icons whose SVG file is named after a secondary alias were silently dropped from the generated SVG sprite.

The sprite generator located each icon's file via its primary alias (mapping.json aliases[0]). For these 17 icons, the file on disk is named after a different alias. For example, the file is symbol-variable.svg, but the codepoint's primary alias is variable, and no variable.svg exists. As a result, fs.existsSync failed and the entire codepoint (every one of its aliases) was excluded from the sprite.

The same primary-vs-filename mismatch meant metadata.json was keyed by names that don't match any SVG file, while the preview looks metadata up by filename.

check-metadata.js reported 100% coverage throughout, because it only validated the primary alias, so it never caught the gap.

Fixes #480

Affected icons (file name ← previous primary/metadata key)

SVG file was keyed/ordered as
circle circle-outline
desktop-download clone
ellipsis more
github logo-github
go-to-file symbol-reference
lock gist-private
reply mail-reply
repo-forked gist-fork
sign-in log-in
sign-out log-out
star-empty star
symbol-array array
symbol-event zap
symbol-namespace symbol-module
symbol-variable variable
sync repo-sync
warning alert

@rstaib

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@rstaib Rafael Staib (rstaib) changed the title fix: include 17 missing icons in the SVG sprite and correct the validation logic Fix 17 missing icons in the SVG sprite and the validation logic Jun 25, 2026
@MAkbarZ

Copy link
Copy Markdown

"cut" or "scissors" icon is also missing. I had to use "screen-cut" instead, but it doesn't look good.

@rstaib

Copy link
Copy Markdown
Contributor Author

Lee Murray (@mrleemurray) any chance to get this in? Let me know I can help in any way.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The renamed metadata entries violate the repository’s required alphabetical ordering.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Fixes SVG sprite generation and metadata validation for icons whose files use secondary aliases.

Changes:

  • Resolves SVG sources from any mapped alias.
  • Aligns canonical mappings and metadata with SVG filenames.
  • Validates metadata against actual SVG files.
File summaries
File Description
scripts/svg-sprite.js Resolves backing SVGs across aliases.
scripts/check-metadata.js Validates physical SVG filenames.
src/template/mapping.json Promotes SVG filenames to primary aliases.
src/template/metadata.json Rekeys metadata to SVG filenames.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/template/metadata.json Outdated
Rafael Staib (rstaib) pushed a commit to rstaib/vscode-codicons that referenced this pull request Sep 20, 2026
The 17 icons renamed in microsoft#482 kept their old keys' positions in
metadata.json instead of moving to the new key's alphabetical spot.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The 17 icons renamed in microsoft#482 kept their old keys' positions in
metadata.json instead of moving to the new key's alphabetical spot.
Nine icon entries (voice-mode* and a few compact variants) were
appended at the end of the file instead of being inserted in
alphabetical order.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Missing source SVGs still produce a successful but incomplete sprite build.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread scripts/svg-sprite.js
…ints lack backing SVGs'

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The icon mappings, SVG files, and metadata are complete and mutually consistent.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@mrleemurray

Copy link
Copy Markdown
Contributor

Rafael Staib (@rstaib) feel free to merge :)

@mrleemurray
Lee Murray (mrleemurray) merged commit a114bce into microsoft:main Sep 22, 2026
6 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.

Missing icon(s) in SVG dist

6 participants