You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow an empty Discover search to list every WinGet package - #5536
Pressing Enter on an empty Discover search now lists the packages available from each configured WinGet source, mirroring winget search --query "". Users of a private WinGet repository can browse everything it offers without guessing a search term.
Normal searches are unchanged
Every manager and every WinGet backend runs exactly the same code for a non-empty query as before, so search speed for everyone else is unaffected.
Scope
New ManagerCapabilities.SupportsEmptySearchQuery, true only for WinGet. An empty search never calls any other manager's FindPackages, because an empty query is slow, unbounded or an error on most of them. A query that only sanitizes to empty (e.g. ;|&) still queries nothing.
Results are capped per source, not per manager, so a private source listed after the community winget source is not crowded out of the first 100:
COM: one unfiltered FindPackages per catalog with ResultLimit, instead of three Contains "" filters that would each scan the whole catalog.
WinGet CLI / Pinget: one search "" --source <name> --count 100 per source. With --source, winget omits the Source column, so the parser now falls back to the queried source instead of labelling every row as the default source.
All three backends cover the same set of sources (explicit ones included), and share the SearchLimits constant.
Loader state
"No search submitted" (null) is now separate from "searched for nothing" (""), so the bare ReloadPackages() callers (IPC, maintenance, manager re-init) still do nothing before a search.
Clearing the Discover box resets the query, so background reloads no longer re-run a cleared search.
The query is read once per manager task, so a search submitted mid-load cannot hand an empty query to a manager that does not support it.
UI
An empty search that finds nothing shows the no-results message instead of a blank page.
The TUI Discover page gets the same empty-query browse.
Verification
Real COM probe (same interop calls as the new branch): empty query returns 100 winget rows in ~450 ms, 0 from msstore without error, 2 from winget-font; a vscode query still runs the three filters.
winget search "" --source <s> --count 100 and pinget search "" --source <s> --count 100 --output json verified for each source.
New tests: empty query only reaches capable managers, per-source cap, no query before a search or after a reset, CLI parser source fallback (fixture captured from real winget output), and a TUI E2E test.
UniGetUI.PackageEngine.Tests (both TFMs) and UniGetUI.Tui.Tests pass; dotnet format whitespace and style are clean.
An empty submitted search leaves GlobalQueryText as "", so ClearSearchQuery() returns at line 640 without reaching this reset callback. Closing to the tray calls ClearAllSearchQueries(), but the browse results and loader query remain active; later background reloads can repeat the browse. Handle the already-empty case in ClearSearchQuery() by resetting the Discover loader and restoring the initial search view.
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
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.
Pressing Enter on an empty Discover search now lists the packages available from each configured WinGet source, mirroring
winget search --query "". Users of a private WinGet repository can browse everything it offers without guessing a search term.Normal searches are unchanged
Every manager and every WinGet backend runs exactly the same code for a non-empty query as before, so search speed for everyone else is unaffected.
Scope
ManagerCapabilities.SupportsEmptySearchQuery,trueonly for WinGet. An empty search never calls any other manager'sFindPackages, because an empty query is slow, unbounded or an error on most of them. A query that only sanitizes to empty (e.g.;|&) still queries nothing.wingetsource is not crowded out of the first 100:FindPackagesper catalog withResultLimit, instead of threeContains ""filters that would each scan the whole catalog.search "" --source <name> --count 100per source. With--source, winget omits the Source column, so the parser now falls back to the queried source instead of labelling every row as the default source.SearchLimitsconstant.Loader state
null) is now separate from "searched for nothing" (""), so the bareReloadPackages()callers (IPC, maintenance, manager re-init) still do nothing before a search.UI
Verification
wingetrows in ~450 ms, 0 frommsstorewithout error, 2 fromwinget-font; avscodequery still runs the three filters.winget search "" --source <s> --count 100andpinget search "" --source <s> --count 100 --output jsonverified for each source.UniGetUI.PackageEngine.Tests(both TFMs) andUniGetUI.Tui.Testspass;dotnet format whitespaceandstyleare clean.Closes #5481