Repository navigation
feat(app-shell,i18n): the Console draws the DEPENDENCY_MISSING install refusal in the author's terms - #26123
Conversation
…the author's terms ADR-0141 D2 refuses an install whose declared dependencies the environment does not satisfy (422 DEPENDENCY_MISSING, details.unmet[]). The Console showed the envelope's English sentence. The package page's Install, the catalog page's organization install on a self-hosted runtime and Setup -> Packages -> Import now draw a heading plus one line per unmet entry from the refusal's own facts (dependency, range, found, installed version), in all ten locale packs. installLocal() and the Packages page's request helper carry the envelope's details (and code) on the error they throw. A refusal whose facts cannot be read in full keeps the server's message. Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
…ck keys The ten @object-ui/i18n locale packs are registry sources, so the new marketplace.install.dependencyMissing keys move the digest that check-sdui-manifest compares. Regenerated with `node scripts/gen-sdui-manifest-node.mjs`: sdui.manifest.json is byte-identical; only the recorded digest changes. Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
scripts/sdui-manifest.record.json conflicted on the registry source digest; resolved by regenerating with `node scripts/gen-sdui-manifest-node.mjs` over the merged tree (sdui.manifest.json unchanged). Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
Under `Metadata-protocol: none` the entry is graded `patch` (Check Changeset). Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
The locale packs auto-merged with both sides' keys kept. scripts/sdui-manifest.record.json conflicted on the registry source digest; resolved by regenerating with `node scripts/gen-sdui-manifest-node.mjs` over the merged tree (sdui.manifest.json unchanged). Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | draft, base main, Part of #25792 (item 3), patch changeset, mergeable clean after a main merge. |
| Files | ui/packages/app-shell/src/console/marketplace/dependencyMissing.ts (new reader), marketplaceApi.ts, MarketplacePackagePage.tsx, MarketplacePage.tsx, views/metadata-admin/PackagesPage.tsx, four new test files, 10 locale packs, and one changeset. |
| Fix | The three install-local surfaces (the package page, the catalog org install, and Setup → Packages → Import) draw 422 DEPENDENCY_MISSING from details.unmet[]. Each shows one heading plus one line per unmet entry, keyed by found (absent, out-of-range, unreadable range, unreadable version, unreadable declaration). The reader is all-or-nothing: an unknown found or a malformed entry leaves the server's message standing. Other errors are unchanged; apiJson only adds code/details to the thrown error. |
| Departures (accepted) | (1) scripts/sdui-manifest.record.json was re-recorded with gen-sdui-manifest-node.mjs, because the locale packs are registry sources. The digest changed; sdui.manifest.json did not. (2) The changeset is patch, since Check Changeset refuses minor under Metadata-protocol: none. |
| Evidence | 54 check runs success and 7 expected skips on this head, 0 failed. check-sdui-manifest and the i18n checks (call-site keys, en drift, dead keys, designer-table parity) exit 0. New tests plus packages/i18n: 1,365 passed. |
| Carried | The line names the dependency by package id (「请先安装 app.objectstack.hotcrm 6.x」), not by display name, because the refusal's facts carry no name. A display name needs a server field and would be a follow-up. The open locale-key PRs will conflict on the sdui record line; whichever lands second re-records it with the same tool. |
| Landing | 「按照 pm-dispatch 规则复核过的都授权」 (Leehom, 2026-10-25T11:35Z): ready and auto-merge through the relay. |
Generated by Claude Code
The locale packs auto-merged with both sides' keys kept. #26120 split the sdui record into one file per registry package, so scripts/sdui-manifest.record.json takes main's version and `node scripts/gen-sdui-manifest-node.mjs` re-records only scripts/sdui-manifest.sources/i18n.json for the new locale keys (sdui.manifest.json unchanged). Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
The locale packs auto-merged with both sides' keys kept. scripts/sdui-manifest.sources/i18n.json conflicted on the i18n digest; resolved by regenerating with `node scripts/gen-sdui-manifest-node.mjs` over the merged tree (only the i18n record moves; sdui.manifest.json unchanged). Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
The locale packs auto-merged with both sides' keys kept (main deleted unread keys in #26158; the dependencyMissing block is untouched). scripts/sdui-manifest.sources/i18n.json conflicted on the i18n digest; resolved by regenerating with `node scripts/gen-sdui-manifest-node.mjs` over the merged tree (sdui.manifest.json unchanged). Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
Brings in #26231, which re-points the ObjectSchema corpus guards to 48 (main's own red on Test UI). Clean merge. Claude-Session: https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA Co-authored-by: Claude <noreply@anthropic.com>
|
Re-armed · ACCEPT Generated by Claude Code |
Requested by Leehom · project thread
Part of #25792
Clause-②: no
Metadata-protocol: none
What
ADR-0141 D2 refuses an install whose declared
dependenciesthe environment does not satisfy:422 DEPENDENCY_MISSING, withdetails.unmet[]naming each entry'spackageId,dependency,range, what wasfoundand theinstalledVersion. Until now the Console showed only the envelope's English sentence, the same in every locale and without the ranges.This is item 3 of #25792 (claim amendment 6415110715). The Console now draws the refusal in the author's terms at every install surface that goes through
install-local: a heading saying nothing was installed, then one line per unmet entry, built from the refusal's own facts.安装被拒绝:…then• 请先安装 app.objectstack.hotcrm 6.x。installLocal)<sentence> (DEPENDENCY_MISSING)An out-of-range entry reads
• 请先安装 com.acme.billing ^2.1.0(当前安装的是 1.4.0)。/• Install com.acme.billing ^2.1.0 first. Version 1.4.0 is installed.Theunreadable-range,unreadable-versionandunreadable-declarationentries each get their own line.How
console/marketplace/dependencyMissing.ts(new):readDependencyMissing(details)readsdetails.unmet[]all or nothing. An unknownfound, an empty list, or an entry missing itsdependency/rangereturnsnull, so the Console never shows fewer things to install than the server refused for.dependencyMissingText(facts, t)builds the heading plus one bullet per fact.useDependencyMissingText()returns the text for a caught error whose code isDEPENDENCY_MISSINGand whose facts it can read, elsenull, and the caller keeps its own message.marketplaceApi.installLocal()now also carries the envelope'sdetailson the error it throws, next tocodeandstatus.PackagesPage'sapiJsonnow carriescodeanddetailson its thrownError. No existing caller reads either one; the message is unchanged.MarketplacePackagePage.doInstallLocal,MarketplacePage.doOrgInstallandPackagesPage.onImportFiletry the refusal text first. The org strip and the import note gainwhitespace-pre-wrapso the lines stay lines; the package page note already had it.@object-ui/i18n:marketplace.install.dependencyMissing.{heading,absent,outOfRange,unreadableRange,unreadableVersion,unreadableDeclaration}in all ten locale packs. Setup → Packages uses the packs through the hook because theengine.*table is en/zh only.scripts/sdui-manifest.record.json: the locale packs are registry sources, so the recorded source digest moves. It was regenerated withnode scripts/gen-sdui-manifest-node.mjs;sdui.manifest.jsonis byte-identical.The dependency shows as its package ID (
app.objectstack.hotcrm), not a display name: the refusal's facts carry no display name, and this PR adds no server change.Tests
dependencyMissing-25792.test.ts: the reader (all or nothing, everyfound), the text, andinstallLocalrejecting withcode,statusanddetailsover a stubbed wire.MarketplacePackagePage.dependencyMissing-25792.test.tsx: the realmarketplaceApiover a stubbedfetch. The note equals the heading plus two lines carrying each entry's id, range and version, and the server sentence is gone. A control case (nounmet) keeps the server message.MarketplacePage.orgInstallDependencyMissing-25792.test.tsx: the org install's realinstallLocal, the same lines, thewhitespace-pre-wrapclass, and aMANIFEST_CONFLICTcontrol.PackagesPage.importDependencyMissing-25792.test.tsx: the realI18nProvider. It checks the exact zh-CN lines (• 请先安装 app.objectstack.hotcrm 6.x。) and en lines, plus a control case.Evidence:
detailsininstallLocaldetailsinapiJsonwhitespace-pre-wrapon the org stripmarketplace/,views/metadata-admin/andpackages/i18nran 727 files and 8276 tests, all passing. After merging main, the new tests andpackages/i18nran 1365 tests, all passing.tsc --noEmitpassed. Scoped eslint shows 0 errors; its first run was red on an unused import in one new test.check-i18n-call-site-keys, en-drift, dead-keys and designer-parity all pass.What to do: nothing.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NndsH9Qm7k6AS2i2fWbjNA
Generated by Claude Code