Repository navigation
fix(console): an uninstalled cloud package is not drawn as installed - #28620
Merged
Merged
Conversation
The control plane's uninstall keeps the installation row and lists it with status 'disabled' / enabled false. listInstalledPackages() now marks such a row `disabled`; the marketplace's org card offers Reinstall for it (the install door re-enables the row) instead of an Installed badge, and readMarketplaceInstalls() leaves it out of Setup → Packages. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVBzmHX5zVyRfxqBc3
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVBzmHX5zVyRfxqBc3
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVBzmHX5zVyRfxqBc3
Contributor
Author
|
domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y 席位核对 · ACCEPT · 2026-11-01T08:33ZHead-sha:
Generated by Claude Code |
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.
Requested by Steedos · project thread
Fixes #28521
Clause-②: no
Metadata-protocol: none
维护者速读
ui/packages/app-shell/src/console/marketplace/marketplaceApi.ts(listInstalledPackages的停用判定与readMarketplaceInstalls的过滤)、MarketplacePage.tsx(卡片按钮分支)。cd ui && pnpm exec vitest run packages/app-shell/src/console/marketplace/__tests__/MarketplacePage.disabledInstall-28521.test.tsx,预期 6 个用例全绿。What changes
The control plane's uninstall is a soft disable that keeps the installation row;
GET /api/v1/cloud-connection/installedstill lists that row withstatus: 'disabled'andenabled: false(measured by the cloud seat on the card). The Console read every listed row as installed.marketplaceApi.tslistInstalledPackages()readsstatusandenabledand marks a disabled row with a new optionalLocalInstallEntry.disabled: truemember. It is absent on an installed row and never sent by the install-local listing, the same convention asnotLoaded.MarketplacePage.tsx: a disabled cloud row no longer joinsinstalledIds. The org card draws Reinstall (the existingmarketplace.action.reinstallkey) instead of the Installed badge. The button calls the samedoOrgInstall, so on a cloud-managed environment it posts toPOST /api/v1/cloud-connection/install, which answersreinstalledand re-enables the row; the page then re-reads the listing and draws Installed.readMarketplaceInstalls()(the Setup → Packages read) drops disabled rows on the cloud leg, so the page neither lists a soft-uninstalled package as an install nor offers its Details/Uninstall actions.The public catalog grid and the package detail page needed no change: the grid reads the install-local ledger only, and the detail page reads
GET /cloud-connection/installation, which already answersinstalled: falsefor a disabled row.Tests
MarketplacePage.disabledInstall-28521.test.tsx(6 cases) runs the reallistInstalledPackages,readMarketplaceInstallsandinstallPackageagainst a stubbedfetch:status: 'disabled'alone andenabled: falsealone each mark the row;{ package_id, seed_sample_data }to the install door, and the re-enabled row then reads Installed with no button;scripts/ablation-replace.mjs, restored to the HEAD blob withgit diff HEADempty):MarketplacePagecounting every cloud row installed: the Reinstall case goes red (1 failed / 5 passed);readMarketplaceInstallskeeping disabled rows: the Setup → Packages case goes red (1 failed / 5 passed).Acceptance notes
@object-ui/i18nkey, which widens the published catalogue (Clause-② yes); the existing Reinstall key already says the package was installed and is off now.Verification
Local runs
pnpm exec vitest runover the 71 ui test files namingMarketplacePage,marketplaceApi,readMarketplaceInstalls,listInstalledPackagesorPackagesPage(a declared narrowing; CI's Test UI runs the rest): 71 files, 710 tests passed.origin/main(head5f3027f6; the 2 incoming commits touchpackages/cliand the metadata layer, not this diff): the new file plus every test underui/packages/app-shell/src/views/metadata-admin/, 686 files, 7259 tests passed, 1 skipped.pnpm --filter @object-ui/app-shell run type-check: exit 0.dispatch-gates.mjs --commands, 34 families): all 34 exit 0,--ranreconciliation 34 run / 0 NOT-MEASURED. Each command is in the card's os-dev report.Generated by Claude Code