CmdPal: entirely redo the Run page (#39955)

This entirely rewrites the shell page. It feels a lot more like the old
run dialog now.

* It's got icons for files & exes
* it can handle network paths
* it can handle `commands /with args...`
* it'll suggest files in that path as you type
* it handles `%environmentVariables%`
* it handles `"Paths with\spaces in them"`
* it shows you the path as a suggestion, in the text box, as you move
the selection


References:
Closes #39044
Closes #39419
Closes #38298
Closes #40311


### Remaining todo's
* [x] Remove the `GenerateAppxManifest` change, and file something to
fix that. We are still generating msix's on every build, wtf
* [x] Clean-up code
* [x] Double-check loc
* [x] Remove a bunch of debug printing that we don't need anymore
* [ ] File a separate PR for moving the file (indexer) commands into a
common project, and re-use those here
* [x] Add history support again! I totally tore that out
  * did that in #40427 
* [x] make `shell:` paths and weird URI's just work. Good test is
`x-cmdpal://settings`

### further optimizations that probably aren't blocking
* [x] Our fast up-to-date is clearly broken, but I think that's been
broken since early 0.91
* [x] If the exe doesn't change, we don't need to create a new ListItem
for it. We can just re-use the current one, and just change the args
* [ ] if the directory hasn't changed, but we typed more chars (e.g.
`c:\windows\s` -> `c:\windows\sys`), we should cache the ListItem's from
the first query, and re-use them if possible.
This commit is contained in:
Mike Griese
2025-07-22 14:47:31 -05:00
committed by GitHub
parent 6ff59488eb
commit 6623d0a2ee
24 changed files with 1091 additions and 148 deletions

View File

@@ -265,6 +265,13 @@ public sealed partial class ListPage : Page,
{
ItemsList.SelectedIndex = 0;
}
// Always reset the selected item when the top-level list page changes
// its items
if (!sender.IsNested)
{
ItemsList.SelectedIndex = 0;
}
}
private void ViewModel_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)