Repository navigation
feat(app-shell): the marketplace package page offers the install modes a package permits, and reads the door's answer (objectui#12288) - #12317
Conversation
…s a package permits, and reads the door's answer The page reads the package's `installModes` from the manifest install-local judges (GET /packages/:id/versions/latest/manifest) and draws the managed / unmanaged choice only where it permits more than one mode. It sends `installMode` only where the manifest declares the key, lists each lock an unmanaged copy dropped with the package's reason, shows each install-mode refusal's own message, and says when a runtime ignored a requested copy. Ten locale packs gain the eight strings. Claude-Session: https://claude.ai/code/session_01RZYixBnXPWvcm2YenWo6eJ Co-authored-by: Claude <noreply@anthropic.com>
…e package they belong to No synchronous reset inside the read effect (react-hooks/set-state-in-effect): the manifest's modes and the operator's pick are stored with their package id, and a page that moves to another package reads them as absent. Claude-Session: https://claude.ai/code/session_01RZYixBnXPWvcm2YenWo6eJ Co-authored-by: Claude <noreply@anthropic.com>
…aged install strings add `marketplace.install.unmanagedSuccess` and `.unmanagedIgnored` each quote the package name with a matched German pair: 85 -> 87 spans, 85 / 85 / 0 -> 87 / 87 / 0. Claude-Session: https://claude.ai/code/session_01RZYixBnXPWvcm2YenWo6eJ Co-authored-by: Claude <noreply@anthropic.com>
… answer A request that names no `installMode` is installed managed by the door and answered with the managed shape, so the catalog page's org-package install keeps reading `hotLoaded` without narrowing. Type-only: overloads, erased at runtime. Claude-Session: https://claude.ai/code/session_01RZYixBnXPWvcm2YenWo6eJ Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
…ll-mode Claude-Session: https://claude.ai/code/session_01RZYixBnXPWvcm2YenWo6eJ Co-authored-by: Claude <noreply@anthropic.com>
…ed Install its reason `check:spec-symbols` refused the local `isPlainRecord` in marketplaceApi.ts: `@objectstack/spec/data` exports a function of that name with the same semantics, so it is imported. The two local install-mode types now describe the install door's answer rather than cite spec symbols. While the install-mode choice is unpicked, the disabled Install carries its reason the console's way: a focusable wrapper that opens it on hover and focus, and an accessible description on the button and the wrapper (`marketplace.install.mode.required`, ten packs). Claude-Session: https://claude.ai/code/session_01RZYixBnXPWvcm2YenWo6eJ Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: Inputs: card objectui#12288 (body and all four comments: triage 6137228499, claim 6139065390, os-dev-report 6140651420, patch-round-1 os-dev-report 6141117364); PR objectui#12317 (body, the 15-file list, the net diff against ① Derived judgmentsPublished surfaces, measured at the head.
The page's reading of the server, against objectstack
Check-runs on ② Semver level
③ Boundary flagsRound 0 report (6140651420):
Round 1 report (6141117364):
Flags this review adds:
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #12288
Clause-②: yes
The marketplace package page offers the install modes a package permits (managed, or an unmanaged copy), sends
installModeon the install, lists the locks an unmanaged copy dropped, and shows each install-mode refusal's own message. This is the objectui stage S4 of objectstack-ai/objectstack#15213 (ADR-0131 D6). The console has no mode rule of its own: what is permitted is the manifest'sinstallModes, and what happened is the door's answer.What the page reads, measured on objectstack
maine540e7ffbinstallModeskey is read from the manifest the install door judges. The PM's hypothesis that it reaches the page "through a payload the page already reads" is false. The page read two payloads: the catalog detail (GET /api/v1/marketplace/packages/:id, the control plane'ssys_packagerow, passed through verbatim byMarketplaceProxyPlugin) and the install-local listing. Neither carries the key in anything this session can measure. The cloud repo is not attached here, and egress to the live catalog is refused by the container proxy, so the detail's projection stays unmeasured. The door itself fetchesGET /api/v1/marketplace/packages/:id/versions/VERSION/manifestand judgesinstallModeson that payload'sdata.manifest(judgeInstallModeinmarketplace-install-local-plugin.ts). The browse proxy forwards every GET under/api/v1/marketplace/exceptinstall-local. So the page now reads that same path, atlatest, the version install-local fetches when it is given noversionId, which is how the page installs. The key is read where the door reads it (declaredPackageManifest): on a compiled artifact's nestedmanifest:, else at the top of a flat body.POST /api/v1/cloud-connection/installtakespackage_idandseed_sample_dataand forwards nothing else. So the read and the choice exist only wherefeatures.installLocalmakes install-local the page's door.unmanagedis refused by the door when no mode is sent (the door's own test: "refusesmanagedfor a copy-only package — 422, namingunmanaged"). The page sends the one mode a manifest declares. That follows from the manifest and the door, not from a console rule. Such a package draws no choice, but the page says before the click that the install is a copy.strippedLocksis{ type, name, lock, reason? }(ImportUnmanagedPackageResponseSchema, feat(metadata-protocol): an unmanaged install copies no protection lock, and names each one it drops objectstack#23075), withlockone of the spec'sMetadataLockvalues exceptnone. The unmanaged install and the lock strip ship in the same pending v18 changesets (15213-install-modes.md,15213-unmanaged-lock-strip.md). No released runtime answersunmanagedwithout the list, so it is typed required and read with no fallback.What changed
marketplaceApi.ts:getDeclaredInstallModes(packageId, versionId = 'latest')reads the key as above. It returnsundefinedfor an absent key and for a declaration the spec refuses. The door refuses such a package whatever mode is sent, so the page shows the door's message. Absence is never resolved to a default here. A mode named twice counts once.installLocaltakes an optionalinstallModeand sends it only when named.LocalInstallResultis now the managed or the unmanaged answer.LocalInstallModeandLocalInstallStrippedLockare the console's reading of the install door'sinstallModeandstrippedLocks; the@objectstack/spec17.7.0 objectui resolves declares neither (onlylockis typed from the spec'sMetadataLock).isPlainRecordis imported from@objectstack/spec/data.MarketplacePackagePage.tsx:PackagesPage's delete-mode choice). The install button waits for a pick. While it waits, the disabled Install says why (marketplace.install.mode.required): a focusable wrapper opens the reason on hover and focus, and it is the button's accessible description.installModes, or no readable manifest: no choice and noinstallModesent, so the door's default stands. One declared mode: no choice, and that mode is sent.unmanagedanswer gets its own sentence naming the base, and itsstrippedLockslist shows each item, its lock and the package's reason verbatim. It mounts no install-time suggestions, since nothing is registered under the package's id. Before this, the answer carried nohotLoadedand would have read as "loads when the runtime next restarts".INSTALL_MODE_NOT_PERMITTED,UNMANAGED_INSTALL_WALLED_POSTURE,RESOURCE_CONFLICT) fall through to the existing branch that shows the envelope'smessage. No console sentence replaces them.installMode: 'unmanaged'comes from a runtime that predates the key and installed the package managed. The page says so, the readingos package install --install-modemakes.packages/i18n/src/locales/*.ts, all ten packs: nine keys undermarketplace.install(mode.label,mode.required,mode.managed,mode.managedHint,mode.unmanaged,mode.unmanagedHint,unmanagedSuccess,unmanagedStrippedLocks,unmanagedIgnored)..changeset/12288-marketplace-install-mode.md:@object-ui/app-shelland@object-ui/i18n,minor.Clause-② yes: the published
@object-ui/i18npacks gain nine keys.installLocal,getDeclaredInstallModesand the new types live inmarketplaceApi.ts, which is not exported from the@object-ui/app-shellentry. The exportedMarketplacePackagePagekeeps its props.Verification
All at
d5441f2unless a line says otherwise. Patch round 1 (head6618b25:isPlainRecordimported from the spec forcheck:spec-symbols, and the disabled Install's reason) has its readings in the os-dev report on objectui#12288. Every heavy run went throughos-verify-lock.sh; each reading is that command's ownVERDICTor summary line.pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' buildgaveVERDICT command-exit 0.d5441f2:pnpm exec vitest run --maxWorkers=2 packages/i18n/ packages/app-shell/src/console/marketplace/passed 115 test files (1534 tests passed, 13 skipped), exit 0.50ec625:pnpm exec vitest run --maxWorkers=2 packages/app-shell/ packages/i18n/gave 1398 files passed, 1 failed, 1 skipped (14023 tests passed, 2 failed).de-quote-pairing-3876.test.ts. It counts the German pack's matched quote pairs, and the two new„{{name}}“spans move it from 85 to 87. The count is updated inadf0131, as each earlier PR adding such a span did, and that file is green in the run above.50ec625, app-shell's source changed only byinstallLocal's overload signatures. esbuild's output formarketplaceApi.tsis identical at50ec625andd5441f2(control: BASE's output differs), so the full-suite reading stands for HEAD's runtime code.pnpm --filter @object-ui/app-shell type-check(echoestsc --noEmit && tsc -p tsconfig.test.json): exit 0.adf0131. The union return type hidhotLoadedfrom the catalog page's org-package install inMarketplacePage.tsx, which sends no mode.marketplaceApi.ts: an overload types a request that names no mode with the managed answer, the door's own rule.MarketplacePage.tsxis not edited.tsc -p tsconfig.test.json --listFileslists the new test file (control: a sibling test file is listed too).pnpm --filter @object-ui/i18n type-check: exit 0.pnpm check:i18n-keys;pnpm check:i18n-drift: 8 keys added, 0envalues changed;pnpm check:i18n-dead-keys: none of the eight keys is a candidate;pnpm check:control-bytes;pnpm check:new-line-citations: 0 new;node scripts/check-changeset-presence.mjs..ts/.tsxfiles: 0 errors and 47 warnings. That is the same per-file count as BASE for the two edited source files (11 and 36), and 0 for the rest.**/*.{ts,tsx}block ofeslint.config.js. File count: read from--format json.tseslint.configs.recommended, noparserOptions.projectorprojectService), and no rule undereslint-rules/reads the filesystem. So this diff cannot move the verdict of a file it does not touch. Repo-widepnpm lintis CI's.Reverse verification, at
50ec625. Each ablation mutated through an anchor that had to hit (objectstack'sablation-replace.mjs, wrap mode), ranMarketplacePackagePage.installMode-12288.test.tsx(17 tests), and restored. Each restore was proven by a blob equal to HEAD and an emptygit diff HEAD. The test imports the page andmarketplaceApi.tsfromsrc, so no build sat between a mutation and its run. The expected directions were declared before the run, and each was observed:installMode: 6 red (the five sent-mode pins and the ignored-copy pin).manifest:is not read: 1 red (the compiled-artifact case).Acceptance notes
content/docs/guide/console.mdnames the marketplace route only), so AGENTS.md Add automated testing infrastructure and CI/CD workflows #2 has no page to update. The authoring page for install modes is objectstack'scontent/docs/deployment/install-modes.mdx. Carrier: none.RESOURCE_CONFLICT, whose message names the base. No served read tells the page a copy exists. Carrier: none.seeded.mode: 'skipped'is not shown. The unmanaged answer says so when the package declares sample data; the page does not repeat it. Carrier: none.LocalInstallMode,LocalInstallStrippedLock) are for replacement byInstallModeSchema/ImportUnmanagedPackageResponseonce objectui resolves an@objectstack/specthat exports them. Carrier: the PR that moves objectui to@objectstack18.marketplaceApi.tspoints at the install door's former framework path; the door lives in objectstackpackages/cloud-connection/src/. Not edited here. Carrier: none.Built for objectui#12288 in session
https://claude.ai/code/session_01RZYixBnXPWvcm2YenWo6eJ(claude/issue-12288-marketplace-install-mode).Generated by Claude Code