Repository navigation
fix: exclude packages in Upgrade panel - #943
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A critical exclusion-source collision can misclassify Instances-tab exclusions and apply them incorrectly across instances.
1 open issue
What changed in this PR
This pull request fixes package exclusions in the legacy Upgrades form by resolving Packages-tab upgrade candidate IDs to installed package IDs before submission.
Changes:
- Tracks package names loaded by the Packages tab across tab changes.
- Resolves excluded package names through
packages:searchand submits installed IDs. - Preserves Instances-tab exclusions and removes internal fields from the API request.
- Adds test coverage and a patch changeset.
Review finding: Exclusion origin is inferred from numeric IDs, so an Instances-tab exclusion can be misclassified when the same ID appears in the Packages-tab mapping. This may resolve and apply the exclusion incorrectly across instances.
| File | Description |
|---|---|
src/features/upgrades/components/Upgrades/Upgrades.tsx |
Stores package ID-to-name mappings and prepares exclusions for submission. |
src/features/upgrades/components/Upgrades/Upgrades.test.tsx |
Tests Packages-tab ID resolution and Instances-tab passthrough behavior. |
src/features/upgrades/components/Upgrades/helpers.ts |
Converts mapped package IDs into package-name exclusions. |
src/features/upgrades/components/tabPanels/packages/PackagesPanel/PackagesPanel.tsx |
Reports loaded package data to the parent form. |
src/features/packages/hooks/usePackages.ts |
Resolves package names to installed IDs and builds the final upgrade request. |
.changeset/upgrades-exclude-installed-packages.md |
Records the patch release change. |
Review effort: Lite
marqode
enabled auto-merge
October 22, 2026 13:51
This branch was previously deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
Fixes packages excluded in the Packages tab of the legacy Upgrades form still being upgraded.
The form submits to
POST /computers/upgrade-packages-exclude_packagesmatches installed package IDs. The Packages tab sent the IDs of the newer versions frompackages:search-upgrades, which the server silently ignores, so those packages were upgraded anyway.Changes:
PackagesPanelreports loaded packages through a new optionalonPackagesLoadprop, andUpgradeskeeps a map from those IDs to package names. The map survives switching tabs.getExcludedPackagesWithNamesreplaces Packages-tab IDs with package names (excludePackageNames). IDs excluded in the Instances tab pass through unchanged.upgradeInstancesPackagesQuerymutation looks up the installed IDs for those names withpackages:search. It merges them into each instance'sexclude_packagesand removesexcludePackageNamesbefore posting.Behavior:
Release Impact
Pick the target branch (see RELEASES.md for the full model):
dev— internal testing → publishes toppa-build-devmain— next beta → publishes toppa-buildrelease/YY.MM— point release on a maintained cycle → publishes toppa-build-YY.MM(and toppa-build-stableif this is the currently-promoted branch). Specify cycle:release/____Change type (tick one):
Checklist
pnpm changeset(orpnpm changeset --emptyif no CHANGELOG line is warranted) and committed the resulting.mdfile. Required for PRs targetingmainandrelease/*; enforced by theChangeset checkworkflow.scripts/).Docs
Changes that affect a documented workflow need a companion PR against landscape-documentation (see docs/DOCUMENTATION.md for when it's required and how to target branches). Tick one:
____________Reviewer Setup
This section is intended to help reviewers find which pages of the UI were changed, and whether any special conditions are required to run the code.
MSW (Mock Service Worker)
VITE_MSW_ENABLED=truein.env.local)Backend
______Feature flags:
package-search-rest-apion (for the Packages tab) andpackage-change-plansoff (otherwise the newer upgrade form is shown instead).Where to Find the UI Changes (if applicable)
Testing Instructions (optional)
packages:searchrequest: it should havenamesset to the unticked packages andinstalled: "true".computers/upgrade-packagesrequest: everyexclude_packagesshould contain only installed package IDs (they should match thepackages:searchresponse, not thepackages:search-upgradesIDs).packages:searchrequest should be sent, and the unticked installed IDs should go through unchanged.Automated tests in
src/features/upgrades/components/Upgrades/Upgrades.test.tsx:excludePackageNamesfield.packages:searchcall is made.Versioning Reminder
Important
Landscape UI uses CalVer (
YY.MM.Point.Build). Version derivation by branch:main/point/*→YY.MM.0.<run>-betadev→YY.MM.0.<run>-devrelease/YY.MM→YY.MM.1.<run>(cycle pinned by branch name)