CmdPal: Icons (9/n) - Prevent stale recycled icons and reuse image presenters - #50189
Open
Jiří Polášek (jiripolasek) wants to merge 2 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:51
🧭 PR intakeVisual evidence: Required — The pull request changes product UI files, so reviewers need to see the visible result. Visual evidence is currently missing. Author actionJiří Polášek (@jiripolasek), please update the following before review:
See the contribution guide for the full checklist. If there is no author response within 7 days, this PR will be automatically closed. Automated PR intake; PowerToys maintainers make final decisions. |
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 9 of 12 in the CmdPal icon-loading series. Depends on #50188. Next: #50190.
This PR clears previous-item presentation immediately and reduces image-control churn.
Motivation: a recycled row must not show another item's icon while loading, and repeated image updates should reuse presentation where WinUI permits it.
Evidence
Historical adjacent-stage comparison (2026-08-18); shared method and limitations: the diagnostics foundation PR #50181.
The measurable benefit is less control construction and cumulative UI work, alongside the stale-icon correctness fix. A 0.114 ms update saving is not a claim that the app feels 61% faster.
Technical notes
Implementation:
src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/IconBox.cs.PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed