Repository navigation
feat(console): a marketplace app's Install confirms what it adds before it installs - #30840
Merged
Merged
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>
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwKGwfa8bd6GQV8vHC
…amespace The confirm in front of a local Install is drawn only on the package page, which renders under the marketplace namespace frame, so its eleven marketplace.install.preview keys move out of the eager packs into namespaces/marketplace/<lang>.ts in all ten languages, text unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwKGwfa8bd6GQV8vHC
…namespace Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwKGwfa8bd6GQV8vHC
Contributor
Author
|
domain:ui#2 · os-tesla · session_01L9qibw7DekEe3wx5f3zphf 席位核对 · ACCEPT · 2026-11-06T06:54Z · head
|
This was referenced Nov 6, 2026
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 Tesla · project thread
domain:ui#2 · os-tesla · session_01L9qibwKGwfa8bd6GQV8vHC
Fixes #30325
Supersedes #30545 (same reviewed diff, resumed from
claude/project-thread-o1qmt2@816df8503fon this thread's own branch; its strings now live in the lazymarketplacenamespace).Clause-②: no
Metadata-protocol: none
维护者速读
marketplacenamespace #30640 把市场文案搬进按需加载的marketplace文案包后,本 PR 把确认框的 11 条文案也放进那里,首屏语言包一个字节都不增加。i18n-locale-en57,003 / 60,000 gz,与 main 相同,上限未动。回滚即还原本 PR。ui/packages/app-shell/src/console/marketplace/installPreview.ts(计数口径)、MarketplacePackagePage.tsx的doInstallLocal/runInstallLocal与新AlertDialog、ui/packages/i18n/src/namespaces/marketplace/en.ts的install.preview段。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 个用例全绿。5d7d5c34复核:确认框行为与 feat(console): a marketplace app's Install confirms what it adds before it installs #30545 已复核版本相同,计数只读页面原有的同一份 manifest,不新增请求;11 条文案进按需加载的marketplace文案包,首屏英文包 57,003 / 60,000 gz、上限未动。marketplaceApi.ts与installPreview.ts不在@object-ui/app-shell入口导出,marketplace命名空间只导出无键类型的目录,故 Clause-② no 成立,不欠契约复审。同意落地。What changes
The behaviour is the one PR #30545 carried and the seat reviewed on its diff; this PR resumes that branch at
816df8503f, mergesorigin/main(which now holds PR #30640, the lazymarketplacenamespace), and moves the confirm's strings into that namespace. Nothing else in the reviewed diff changed.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.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.tsexposes 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. Objects (list or name-keyed map), permission sets (only a LIST of named sets), sample records (top-leveldata[]seed datasets, "up to N" when a dataset is env- or locale-scoped), suggested grants (sets declaringisDefault: true, ADR-0090 D5), across every package body the artifact carries.sampleRecordsLoadedreads the install answer'sseeded.marketplace.install.preview.*(11 keys) sit inui/packages/i18n/src/namespaces/marketplace/LANG.tsfor all ten languages, inside each catalogue'sinstallgroup right afterunmanagedIgnored, text byte-identical to feat(console): a marketplace app's Install confirms what it adds before it installs #30545's. The eager packs (src/locales/LANG.ts) are exactlyorigin/main's. Studio's packages page does not read these keys (the confirm is drawn only byMarketplacePackagePage, which renders underMarketplaceNamespaceGate), so none belongs in the resident set;marketplaceNamespaceBoundary.test.tsholds that.atMoststays on the count-neutral list ofcount-families-11445.test.ts.MarketplacePackagePage.tsxis the import block: main's multi-linesampleDataNotice.jsimport kept, theinstallPreview.jsimport added above it..changeset/30325-install-confirm-what-it-adds.md,@object-ui/app-shelland@object-ui/i18npatch; its Strings line now names the namespace.Branch: the harness-assigned
claude/project-thread-7yy8nl, notclaude/issue-30325-*; the card is #30325 (claim 6677784267).Tests
MarketplacePackagePage.installPreview-30325.test.tsx(6 cases, realmarketplaceApiover a stubbedfetch) andinstallPreview-30325.test.ts(6 cases), as in feat(console): a marketplace app's Install confirms what it adds before it installs #30545, now resolving their strings through the namespace frame.credentialStep-27238,dependencyMissing-25792,installMode-12288,protocolCheckSkipped-30326,sampleDataNotice-30323,servedTruth-12098,walledCatalogPackageRefusal-7611). No assertion changed. The wholeconsole/marketplace/directory, including the tests main added since feat(console): a marketplace app's Install confirms what it adds before it installs #30545's base, passes on this head.Acceptance notes
CI=true vite buildonff5d4116cf:i18n-locale-enreads 57,003 gzip bytes against the 60,000 ceiling (headroom 2,997), the same reading perf(i18n, app-shell)!: the marketplace pages' strings leave the eager language packs for a lazymarketplacenamespace #30640 recorded for main;PER_CHUNK_GZIP_CEILINGSuntouched. The confirm's strings ship in the lazyi18n-ns-marketplace-LANGchunks (theenone contains "Reading what this package adds"; the eageri18n-locale-enchunk does not).MarketplacePage.tsxdoOrgInstall) also posts install-local on one click with no confirm (read in code, not run).Verification
All on head
5d7d5c349aunless noted (ff5d4116cfdiffers from it only in the changeset text).Readings
pnpm --dir ui exec vitest run packages/app-shell/src/console/marketplace/ packages/i18n/(onff5d4116cf, under the verify lock): 152 files passed, 1992 tests passed, 13 skipped; VERDICT command-exit 0.pnpm --dir ui check:eager-closure(onff5d4116cf): exit 0,i18n-locale-en57,003 gz / 60,000.pnpm --dir ui run check:i18n-keys,check:i18n-dead-keys,check:eager-locale-catalogues,check:spec-symbols,check:control-bytes,check:new-line-citations;node scripts/check-i18n-en-drift.mjs --base origin/main(fromui/): exit 0 each.pnpm --filter @object-ui/i18n run type-check,pnpm --filter @object-ui/app-shell run type-check(after a declaration build of@object-ui/app-shell^...): exit 0 each.--no-inline-configon the 23 changed ui source and test files: 0 errors.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 35 derived families, each exit 0 (pnpm --dir ui exec vitest run scripts/: 170 files, 4979 tests passed);--ran: 35 derived, 35 run, 0 NOT-MEASURED, 0 UNRUN.