Skip to content

Conversation

@vanzue
Copy link
Contributor

@vanzue vanzue commented Dec 1, 2025

Summary of the Pull Request

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Runtime memory consumption: ~36 M
MSIX package size: 39M
Looks like a bit big for the size...
Trying to use sparse package instead..

@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label Dec 4, 2025
@vanzue vanzue force-pushed the dev/vanzue/cmdpal-pt branch from 0581b89 to 4a79a0c Compare December 8, 2025 08:42
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

I haven't reviewed all of the individual providers, but overall this looks right to me

I've got a couple suggestions, but overall I think this feels like the right direction

private async Task<CommandProviderWrapper?> StartExtensionWithTimeoutAsync(IExtensionWrapper extension)
{
Logger.LogDebug($"Starting {extension.PackageFullName}");
Logger.LogInfo($"StartExtensionWithTimeoutAsync invoked for {extension.ExtensionUniqueId}");
Copy link
Member

Choose a reason for hiding this comment

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

nit: could probably fold this in with the above LogDebug call

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<UseWinRT>true</UseWinRT>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
Copy link
Member

Choose a reason for hiding this comment

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

Why are we adding this? This sounds like a good error message

Copy link
Contributor Author

@vanzue vanzue Dec 9, 2025

Choose a reason for hiding this comment

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

Ahh, it's used to temporary get around the annoying arm64 cmdpal build failure, will rollback before check in

Copy link
Member

Choose a reason for hiding this comment

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

YOU FIXED IT?? 🎉

I CHANGED MY MIND!

Can we scope this so that it's only enabled for Debug or non-CI builds? I've been doing x64 builds on my ARM device for the last 6 months and it is not my favorite

We'll leave it on for CI builds because it is a real issue when a clean build happens, but I'm fine keeping it disabled for the inner loop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK!!

<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
<Content Include="Assets\FileLocksmith.png" />
Copy link
Member

Choose a reason for hiding this comment

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

Is there any way we could use the <ContentInclude> property to include all the various icons from wherever they live in the tree, rather than duplicating them all in our Assets/ directory?

Comment on lines +36 to +38
DisplayName="PowerToys Command Palette Extension"
Description="Expose PowerToys commands to Windows Command Palette"
BackgroundColor="transparent"
Copy link
Member

Choose a reason for hiding this comment

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

these need to be ms-resource's in our resw

[
new CommandItem(new Pages.PowerToysListPage())
{
Title = "PowerToys",
Copy link
Member

Choose a reason for hiding this comment

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

okay I won't go through and add "this needs localization" comments everywhere. I might not even block on that (and we can just do that in a follow-up PR, since this is already so big)

project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
!src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Properties/launchSettings.json
Copy link
Member

Choose a reason for hiding this comment

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

nit: we could probablt just make this

Suggested change
!src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Properties/launchSettings.json
!src/modules/cmdpal/**/Properties/launchSettings.json

or something. All those launchSettings.json's are super load bearing


namespace PowerToysExtension.Commands;

internal sealed partial class NoOpCommand : InvokableCommand
Copy link
Member

Choose a reason for hiding this comment

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

FWIW there is a no-op command in the toolkit already, but it doesn't actually do anything or show up as the command on enter

This here will show No operation (or whatever the title is) in the text on the primary command button

Comment on lines +53 to +74

* Edit src/PackageIdentity/AppxManifest.xml:
```xml
<Applications>
<Application Id="CmdPalExt.YourExtension"
Executable="External\Win32\<yourExe>.exe"
EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="Your CmdPal Extension" Square44x44Logo="Assets\Square44x44Logo.png" Description="..." />
</Application>
<!-- Existing PowerToys entries remain -->
</Applications>
```

* Embed sparse identity in your Win32 binary (RT_MANIFEST):
```xml
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<msix xmlns="urn:schemas-microsoft-com:msix.v1"
packageName="Microsoft.PowerToys.SparseApp"
applicationId="CmdPalExt.YourExtension"
publisher="CN=PowerToys Dev Cert, O=Microsoft Corporation, L=..., C=US"/>
</assembly>
```
Copy link
Member

Choose a reason for hiding this comment

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

uh, is this still accurate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, will delete this file : )

Comment on lines +59 to +69
var matched = new List<Tuple<int, ListItem>>();
foreach (var item in all)
{
var result = StringMatcher.FuzzyMatch(query, item.Title);
if (result.Success)
{
matched.Add(new Tuple<int, ListItem>(result.Score, item));
}
}

matched.Sort((x, y) => y.Item1.CompareTo(x.Item1));
Copy link
Member

Choose a reason for hiding this comment

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

fwiw I'm pretty sure ListHelpers.FilterList* in the toolkit should do this for you 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants