Skip to content

Import preview with selection (#24, part 3) - #27

Merged
FedeB2160 merged 5 commits into
feat/repair-queuefrom
feat/import-preview
Oct 14, 2026
Merged

FedeB2160 merged 5 commits into
feat/repair-queuefrom
feat/import-preview

Conversation

@FedeB2160

Copy link
Copy Markdown
Owner

Third of three PRs for #24. It is built on #26 and retargets to main after #25 and #26.

Import preview

  • The import confirmation shows the packages in the file in a grid (SEL., ID, SOURCE, VERSION), all ticked. Untick what you do not want. The confirmation is still Yes/No with No as the default, and a file that is not valid or is empty is still refused before it.
  • Everything ticked: winget import runs on the file as it is, unchanged.
  • Something unticked: the app writes a reduced copy to %TEMP%\wgt_import_<guid>.json, which Clear-WinGetTempFiles sweeps at the next start, and runs the same winget import --ignore-unavailable on it.
    • The kept package objects are written back verbatim. winget 1.29 saves --custom and --override in the export, so they survive without the app knowing their field names.
    • Sources left with no packages are dropped.
    • Root properties such as $schema are kept.
    • The file that was read is not changed.
  • If a package carries properties beyond PackageIdentifier, Version, Channel and Scope, the confirmation says that winget will apply its saved installer arguments again.
  • New-AppDialog / Show-AppDialog take an optional -Content, shown under the text.
  • The grid columns have fixed widths: the dialog sizes itself to its content, and * columns collapse to zero there. I found this in a render.

Tests

  • Get-ImportPackages:
    • rows in file order, with their source and pinned version;
    • everything starts ticked;
    • packages with stored arguments are counted;
    • a missing file returns $null.
  • New-ImportSubset:
    • keeps exactly the chosen package, with its unknown Custom property and its Version;
    • drops the source left empty;
    • keeps $schema;
    • does not modify the file that was read.
  • Start-Import passes the grid as -Content and goes through a reduced wgt_import_ file. The existing checks still hold: confirmation before import, default No, invalid file refused first.
  • New-AppDialog -Content places the element under the text, which is kept.
  • New-ImportPreviewGrid has a checkbox column.

Both suites pass offline. I checked the dialog in renders, light and dark.

🤖 Generated with Claude Code

FedeB2160 and others added 5 commits October 14, 2026 09:42
The import confirmation now lists the packages of the file in a grid,
all ticked. With something unticked, winget imports a reduced copy in
%TEMP% (wgt_import_*.json, swept at the next start): the kept package
objects are written back verbatim, so --custom/--override saved by
winget 1.29 survive without the app knowing their names, and sources
left empty are dropped. New-AppDialog takes an optional -Content shown
under the text.

Part of #24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	CHANGELOG.md
#	README.md
#	src/modules/App.Ui.ps1
@FedeB2160
FedeB2160 merged commit 385387b into feat/repair-queue Oct 14, 2026
2 checks passed
FedeB2160 added a commit that referenced this pull request Oct 14, 2026
@FedeB2160
FedeB2160 deleted the feat/import-preview branch October 14, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant