Repository navigation
feat(console): a marketplace app's Install confirms what it adds before it installs - #30545
Draft
objectstack-fleet[bot] wants to merge 4 commits into
Draft
objectstack-fleet[bot] wants to merge 4 commits into
objectstack-fleet[bot] wants to merge 4 commits into
Conversation
…re it installs The package page's local Install now opens a confirm in the console's own dialog: how many objects, permission sets and sample records the package adds, and which permission sets it will suggest granting to Everyone. The counts are read from the version manifest the page already reads for the install modes (the body install-local installs), so one read serves both. The confirm's Install runs the install exactly as the button did. Claude-Session: https://claude.ai/code/session_01L6bhgTyZzKhzBatM6ZuVbs Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTyZzKhzBatM6ZuVbs Co-authored-by: Claude <noreply@anthropic.com>
Keeps both import lines in MarketplacePackagePage.tsx (the install confirm and the sample-data notice), and the sample-data notice test clicks the confirm. Claude-Session: https://claude.ai/code/session_01L6bhgTyZzKhzBatM6ZuVbs Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgTyZzKhzBatM6ZuVbs Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Nov 5, 2026
This branch has not been 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.
Requested by Sales · project thread
domain:ui#6 · os-sales · session_01L6bhgTyZzKhzBatM6ZuVbs
Fixes #30325
Clause-②: no
Metadata-protocol: none
维护者速读
ui/packages/app-shell/src/console/marketplace/installPreview.ts(计数口径)、MarketplacePackagePage.tsx的doInstallLocal/runInstallLocal与新AlertDialog、marketplaceApi.ts的getServedPackageBody。pnpm --dir ui exec vitest run packages/app-shell/src/console/marketplace/__tests__/MarketplacePackagePage.installPreview-30325.test.tsx packages/app-shell/src/console/marketplace/__tests__/installPreview-30325.test.ts,预期 12 个用例全绿。What changes
doInstallLocal) now opens anAlertDialoginstead of posting at once. It names the package, then lists Objects / Permission sets / Sample records as label and number, a note that sample records load with the app and can be cleared from this page afterwards, and one line per permission set the install will suggest granting to Everyone (nothing is granted until an administrator accepts). Its Install callsrunInstallLocal, the unchanged install body (modes, result notes, refusals all as before); Cancel installs nothing. Reinstall gets the same confirm with a reinstall title. One click on the confirm's Install continues as today.installPreview.ts, a pure reader). The page already readGET /api/v1/marketplace/packages/:id/versions/latest/manifestforinstallModes; that body is what install-local fetches and installs.marketplaceApi.tsnow exposes the body read (getServedPackageBody) and the mode reader as a pure function (declaredInstallModesOf), and the page derives both the modes and the preview from the ONE read. The counts follow the door's own reading of that body:manifest:flattened beside the collections, plus eachpackages[]entry's body;objectsas a list or a name-keyed map;permissionsonly when it is a LIST of named sets (the manifest-stage capability grant is an object and is not counted);data[]entries with anobjectand arecordslist, summed (the server'sseedDatasetsOffilter, the datasets the install's seed step loads). A dataset scoped byenv(not all three) orlocalemay not load here, so the value then reads "up to N";isDefault: true(ADR-0090 D5).sampleRecordsLoadedreads the install answer'sseeded. Agreed with that card's thread; this PR does not touch its files.marketplace.install.preview.*(11 keys) in all 10 packs; no existing key changes.atMostis named on the count-neutral list ofcount-families-11445.test.ts(the number stands after "up to", the noun is the row label). The de pack uses no „…“ span, sode-quote-pairing-3876.test.tsis unchanged..changeset/30325-install-confirm-what-it-adds.md,@object-ui/app-shelland@object-ui/i18npatch.Branch: the harness-assigned
claude/project-thread-o1qmt2, notclaude/issue-30325-*; the card is #30325.Tests
MarketplacePackagePage.installPreview-30325.test.tsx(6 cases, realmarketplaceApiover a stubbedfetch): Install opens the confirm with 3 objects / 2 sets / 9 records and thecrm_usersuggestion, with zero install POSTs and ONE manifest GET; its Install posts once and the success note is drawn; Cancel posts nothing; a locale-scoped dataset reads "up to 6"; no records and no default set draw no note and no suggestion line; a 404 manifest says unreadable and Install still posts.installPreview-30325.test.ts(6 cases): flattened bundle, capability-grantpermissionsnot counted, multi-package artifact, env/locale upper bound, skipped seed entries, non-body null.credentialStep-27238,dependencyMissing-25792,installMode-12288,protocolCheckSkipped-30326,servedTruth-12098,walledCatalogPackageRefusal-7611. No assertion changed.MarketplacePackagePage.tsxrestored to the base (fa9c0aa2) with the new tests kept: 6 failed / 6; restored withgit checkout HEAD --, blob hash matches HEAD,git diff HEADempty.Acceptance notes
objectstack dev --seed-admin --freshwithOS_CLOUD_URLpointed at a local stand-in control plane serving one catalog package and its flattened bundle (3 objects, 2 permission sets with oneisDefault, 3 datasets of 8 + 3 + 2 records), console via vite. On the base: clicking 安装 went straight to 处理中…, no dialog, POST at once. On this head: the confirm read 对象 3 / 权限集 2 / 示例记录 13 and theacme_deals_usersuggestion with zero POSTs; after its 安装, the install answer'sseededwasinline,inserted: 13. The manifest GET count was the same on both runs (2, the dev build's double effect), so the confirm adds no request. Screenshots and network logs: project filesissue-30325/.publish-marketplace.mjs(flattenArtifact), the shape covered by the first case.MarketplacePage.tsxdoOrgInstall) also posts install-local on one click with no confirm (read in code, not run). Reported to the seat.Verification
All on head
b94b041eunless noted.pnpm --dir ui exec vitest run packages/app-shell/src/console/marketplace/__tests__/: 52 files, 442 tests passed (head afbb486; the later commit only touches an i18n test).pnpm --dir ui exec vitest run packages/i18n/: 95 files, 1443 passed, 13 skipped.pnpm --filter @object-ui/app-shell run type-checkandpnpm --filter @object-ui/i18n run type-check: exit 0 (head afbb486; the i18n suite above ran the later test edit).pnpm --dir ui runcheck:spec-symbols,check:i18n-keys,check:i18n-drift,check:i18n-dead-keys,check:control-bytes,check:new-line-citations: exit 0 each.dispatch-gates --commandsderived 35 families; all 35 exit 0 on b94b041 (also on afbb486),--ran: 35 derived, 35 run, 0 NOT-MEASURED.Generated by Claude Code