CmdPal: Icons (8/n) - Add icon protocols and defer app icon extraction - #50188
Open
Jiří Polášek (jiripolasek) wants to merge 3 commits into
Conversation
This was referenced Aug 27, 2026
Jiří Polášek (jiripolasek)
marked this pull request as ready for review
August 28, 2026 16:13
Member
|
gut check:
but otherwise this is a pretty clever solution |
Collaborator
Author
I have to re-order this entire stack to put everything into some sensible order and keep trace measurements somehow consistent between PRs, and I used toaster to rewrite and move the code around.
Given the edge cases, it's the leaser evil. I've run into issues with URLs and encoding, the other reason was packing multiple protocols into one string (fallback icons, different icons per theme, etc...). |
Michael Jolley (michaeljolley)
requested changes
Sep 6, 2026
Jiří Polášek (jiripolasek)
force-pushed
the
dev/jpolasek/f/49940-cmdpal-icon-protocol-app-icons
branch
from
September 8, 2026 19:43
630e723 to
3db9019
Compare
- Passes all fallback candidates to the loader. - Tries candidates in order, skipping failed preparations.
Jiří Polášek (jiripolasek)
force-pushed
the
dev/jpolasek/f/49940-cmdpal-icon-protocol-app-icons
branch
from
September 21, 2026 22:26
3db9019 to
8499c9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Part 8 of 12 in the CmdPal icon-loading series. Depends on #50187. Next: #50189.
This PR introduces protocol processors and makes Installed Apps submit requests instead of eagerly extracting icon streams.
IconInfo/IconDatastrings, preserving opaque icon candidates.Motivation: the host can schedule and share work that previously happened before the icon pipeline, without requiring a new SDK icon object.
Examples
Using
Microsoft.CommandPalette.Extensions.Toolkit:The first two requests serialize as:
These strings can also be passed directly to
IconInfo; the helpers avoid hand-counting payload lengths.Evidence
Historical adjacent-stage comparison (2026-08-18); shared method and limitations: the diagnostics foundation PR #50181.
Cold extraction moves onto the measured request's critical path instead of being prepaid by extension preloading. That explains the direction of the tradeoff—less process work, later cold icons—but does not prove the whole observed penalty is necessary or acceptable.
Technical notes
Implementation:
src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/IconProtocolRegistry.cs.PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed