Skip to content

CmdPal: Add setting to hide app descriptions in All Apps - #47128

Merged
Michael Jolley (michaeljolley) merged 2 commits into
mainfrom
agents/review-plan-prompt-for-issue-46634
May 15, 2026
Merged

Michael Jolley (michaeljolley) merged 2 commits into
mainfrom
agents/review-plan-prompt-for-issue-46634

Conversation

@michaeljolley

Copy link
Copy Markdown
Contributor

Summary

Adds a Hide app descriptions toggle setting to the Command Palette All Apps extension. When enabled, the descriptive subtitle text next to app results is hidden for a cleaner look.

Changes

File Change
AllAppsSettings.cs New HideAppDescriptions ToggleSetting (default: false), following the existing EnableStartMenuSource pattern
AllAppsPage.cs Conditionally clears Subtitle on each AppListItem in GetPrograms() when setting is enabled
Resources.resx / Resources.Designer.cs Resource strings for the setting label and description
AllAppsPageTests.cs Two new tests verifying subtitle visibility with setting on/off

Validation

  • Build clean (exit code 0)
  • All 14 unit tests pass (including 2 new tests)
  • Setting defaults to false (preserves current behavior)
  • Empty subtitle renders gracefully (no placeholder shown)
  • No ABI breaks — all changes scoped to All Apps extension

Closes #46634

@github-actions

This comment has been minimized.

@michaeljolley Michael Jolley (michaeljolley) added the Product-Command Palette Refers to the Command Palette utility label Apr 21, 2026
Add a new ToggleSetting (default: false) to the All Apps extension that
hides description text (Subtitle) next to app results for a cleaner look.

- AllAppsSettings.cs: Add HideAppDescriptions ToggleSetting following
  existing EnableStartMenuSource pattern
- AllAppsPage.cs: Conditionally clear Subtitle in GetPrograms() when
  setting is enabled
- Resources.resx/Designer.cs: Add resource strings for the setting
- AllAppsPageTests.cs: Add tests verifying subtitle visibility with
  setting on/off

Closes #46634

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@michaeljolley
Michael Jolley (michaeljolley) force-pushed the agents/review-plan-prompt-for-issue-46634 branch from 412eedb to 704e868 Compare April 21, 2026 04:44
@michaeljolley
Michael Jolley (michaeljolley) marked this pull request as ready for review April 21, 2026 04:45
@github-actions

This comment has been minimized.

@michaeljolley

Copy link
Copy Markdown
Contributor Author

CI Note: Unrelated test failure

The failing test QueryWithoutHistoryCommand("curl bing.com","curl.exe") in Microsoft.CmdPal.Ext.Shell.UnitTests is not related to this PR.

This PR only modifies files in Microsoft.CmdPal.Ext.Apps (the All Apps extension). The failing test is in the Shell extension and depends on curl.exe being resolvable via the Windows SearchPath API on the CI agent — an environment-dependent condition.

Files changed in this PR:

  • AllAppsSettings.cs — new HideAppDescriptions toggle setting
  • AllAppsPage.cs — conditional subtitle clearing
  • Resources.resx / Resources.Designer.cs — resource strings
  • AllAppsPageTests.cs — two new unit tests

None of these touch Shell extension code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

check-spelling-bot Report

ðŸ”ī Please review

See the 📂 files view, the 📜action log, 👞 SARIF report, or 📝 job summary for details.

Unrecognized words (1)

DEFAULTTONEAREST

These words are not needed and should be removed defaulttonearest diu IPREVIEW ITHUMBNAIL LPCFHOOKPROC LUMA MAXDWORD MRT suntimes timespan traies udit VSync

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:microsoft/PowerToys.git repository
on the agents/review-plan-prompt-for-issue-46634 branch (â„đïļ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/24728402825/attempts/1' &&
git commit -m 'Update check-spelling metadata'

OR

To have the bot accept them for you, comment in the PR quoting the following line:
check-spelling-bot apply updates.

If the flagged items are ðŸĪŊ false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

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.

Pull request overview

This PR adds a new All Apps extension setting in CmdPal to hide the descriptive subtitle text shown for application results, aiming to provide a cleaner results list.

Changes:

  • Introduces a new HideAppDescriptions toggle setting (default false) for the Apps provider.
  • Updates All Apps item generation to clear AppListItem.Subtitle when the setting is enabled.
  • Adds localized strings and unit tests covering the on/off behavior.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AllAppsSettings.cs Adds the new HideAppDescriptions toggle setting and wires it into the settings manager.
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/AllAppsPage.cs Applies the setting by clearing subtitles on generated AppListItems.
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Properties/Resources.resx Adds label/description strings for the new setting.
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Properties/Resources.Designer.cs Updates the generated resource accessors for the new strings.
src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.Apps.UnitTests/AllAppsPageTests.cs Adds tests validating subtitle visibility when the setting is enabled/disabled.
Files not reviewed (1)
  • src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Apps/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)

src/modules/cmdpal/Tests/Microsoft.CmdPal.Ext.Apps.UnitTests/AllAppsPageTests.cs:94

  • These tests rely on Task.Delay(100) to wait for background initialization. Time-based delays make tests slower and can be flaky on loaded CI machines. Since GetItems() calls BuildListItems() synchronously, consider removing the delay and/or using a deterministic helper (like the existing refresh/initialization pattern in AppsTestBase) to ensure the page is ready.
            AllAppsSettings.Instance.Settings.Update("{\"apps.HideAppDescriptions\": \"true\"}");

            var page = new AllAppsPage(mockCache);
            await Task.Delay(100);

            // Act
            var items = page.GetItems();

Comment on lines +101 to +105
if (AllAppsSettings.Instance.HideAppDescriptions)
{
foreach (var item in items)
{
item.Subtitle = string.Empty;
Comment on lines +101 to +107
if (AllAppsSettings.Instance.HideAppDescriptions)
{
foreach (var item in items)
{
item.Subtitle = string.Empty;
}
}
Comment on lines +86 to +104
try
{
AllAppsSettings.Instance.Settings.Update("{\"apps.HideAppDescriptions\": \"true\"}");

var page = new AllAppsPage(mockCache);
await Task.Delay(100);

// Act
var items = page.GetItems();

// Assert
Assert.AreEqual(1, items.Length);
var appItem = items.OfType<AppListItem>().Single();
Assert.AreEqual(string.Empty, appItem.Subtitle);
}
finally
{
AllAppsSettings.Instance.Settings.Update("{\"apps.HideAppDescriptions\": \"false\"}");
}
Comment on lines +248 to +251
<value>Hide app description in search results</value>
</data>
<data name="hide_app_descriptions_description" xml:space="preserve">
<value>Hide description text next to app results for a cleaner look</value>
@michaeljolley
Michael Jolley (michaeljolley) merged commit b99defb into main May 15, 2026
19 checks passed
@crutkas
Clint Rutkas (crutkas) deleted the agents/review-plan-prompt-for-issue-46634 branch May 25, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.100 Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CmdPal: Hide descriptions for listed applications

4 participants