Repository navigation
fix(share-links): the share page names the object by its label and leaves off hidden fields - #36460
Conversation
…est locale and each field's hidden flag Claude-Session: https://claude.ai/code/session_01QsR2jTyyBmoPBsURQjeJGq Co-authored-by: Claude <noreply@anthropic.com>
… on both mounts and the share page Claude-Session: https://claude.ai/code/session_01QsR2jTyyBmoPBsURQjeJGq Co-authored-by: Claude <noreply@anthropic.com>
…and hidden flags Claude-Session: https://claude.ai/code/session_01QsR2jTyyBmoPBsURQjeJGq Co-authored-by: Claude <noreply@anthropic.com>
…projection harness Claude-Session: https://claude.ai/code/session_01QsR2jTyyBmoPBsURQjeJGq Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 8 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 45 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 85317fe739013ac70771688d0abafebf6e9cb6e1 && git checkout 85317fe739013ac70771688d0abafebf6e9cb6e1
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 39e9a820fc57b5febd990a184194503b5687ad99 27453659084258c8465f91f74b05b30022f471f4 && git checkout -B drift-repro 39e9a820fc57b5febd990a184194503b5687ad99 && git merge --no-ff 27453659084258c8465f91f74b05b30022f471f4
node scripts/docs-audit/affected-docs.mjs --json 39e9a820fc57b5febd990a184194503b5687ad99
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTyyBmoPBsURQjeJGq Final green head · 2026-11-22T13:11Z |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) on head Owed:
Read and accepted
A delta ACCEPT follows on a head that makes one of (a) or (b) true, with its pin or card. |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Read: card #33552 body and its four comments (triage 6886911138, regrade 6984990301, claim 7077759641, dev report 7079233796); PR #36460 body and its two comments; the net diff of 12 files against merge base 4e55e4e; the check-runs on this head. Every check-run on this head is success or skipped. None failed and none is pending. ① Derived judgments
② Semver level
③ Boundary flags
S1 (should-fix) — The resolve answer now varies on No must-fix. Implemented-by: VERDICT: PASS |
…rves it, and the public answers vary on Accept-Language Claude-Session: https://claude.ai/code/session_01QsR2jTyyBmoPBsURQjeJGq Co-authored-by: Claude <noreply@anthropic.com>
…ink header harnesses Claude-Session: https://claude.ai/code/session_01QsR2jTyyBmoPBsURQjeJGq Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTyyBmoPBsURQjeJGq Final green head (rework 1) · 2026-11-22T14:13Z
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) delta on head The owed item: closed, by option (a).
Also in the delta (the L2's S1).
Gates at this head: 60 success, 12 expected skip, 0 failed, mergeable |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review: Read: card #33552 and every comment on it, the dev delta 7079994565 included; PR #36460 body and its comments, with the L1-e REWORK 7079684282 and the final-green note 7080388304; the compare ① Derived judgments
② Semver level
③ Boundary flags
S1: closed S2 (should-fix): The PR body's Acceptance notes still say "The object label is translated without the No must-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTyyBmoPBsURQjeJGq Landing · 2026-11-22T14:25Z · head
Ready + auto-merge in this stroke; |
…and activity-summary labels read as /meta serves them in a declared sourceLocale (objectstack-ai#36464) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9Ubb3T2gwH6MWTYde4qF8edEDN)_ Part of objectstack-ai#35384 — this PR moves three of the card's readers onto the `/meta` resolve path. The approval NOTIFICATION subject param stays open: it is resolved per recipient at delivery by service-messaging's general keyed-param path, so it is left for the area to file (see Acceptance notes). Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:应用以英文编写、默认面向中文用户时,英文用户在审批收件箱、审批页、活动记录摘要和自定义校验规则的报错里看到英文原文,不再夹杂默认语言的中文;中文用户看到的不变。 - 为什么做:这是多语言标签统一的后续:让这三处和对象元数据接口用同一种方式取标签。 - 出错会怎样:最坏情况是某处标签显示成原文而不是译文,不影响数据和权限,合并后可直接回退。 - 要你做什么:无 ## What changes The objectstack-ai#34030 rule, quoted from the card: "resolve the label through `translateObject` with the same resolve options `/meta` builds, so `t()` carries messages only." - **objectql** (`validation/rule-validator.ts`, `authoredRuleMessage`): an author-written rule message (`objects.OBJECT._validations.RULE.message`) now resolves through `translatedLabels` over `ValidationMessageContext.labelTranslation`. That is the bundle plus `ResolveOptions` that the same refusal's field, option and object labels already read (objectstack-ai#34030), so this half adds no copy of the options. The ADR-0029 D9.2a tenant-rewrite check is unchanged. `translate` (that is, `t()`) now carries only the built-in messages. - **plugin-approvals** (`reader-locale-labels.ts`, `readerLabelsFor().objectLabel`): the object label resolves through `translateObject` over every locale the service holds, with the metadata route's options: the negotiated reader locale, the declared fallback chain, and `sourceLocale` else `defaultLocale`. This one change covers the inbox row, the request page, the generic data door's request rows and the two lifecycle refusals that name an object. Flow, step and position labels and the catalog sentences stay on `t()`. - **plugin-audit** (`activity-summary-message.ts`): `readerSummaryLocale` hands the composer the object definition that `translateObject` put in the reader's language. The object, field and select-option labels are read off that definition and no longer come from `t()` keys. The writer's stored sentence is unchanged, because its locale already reads only authored labels. - A service that cannot hand its translations over (no `getLocales()` / `getTranslations()`) no longer gets these labels translated through `t()`: the authored text stands. Every service the platform ships implements both. ## Tests - objectql `engine-label-source-locale.test.ts`: new top-level describe for the authored rule message under `sourceLocale: 'en'` / `defaultLocale: 'zh-CN'`. An `en` write reads the authored sentence. Controls: a `zh-CN` write reads the zh-CN row, and with no `sourceLocale` an `en` write walks to the zh-CN row. - objectql `validation/rule-validator.test.ts` (objectstack-ai#14253 and D9.2a describes) moved from `translate` doubles to `labelTranslation`. The first case wires a `t()` decoy beside it, so a regression back to `t()` turns it red. - objectql `engine-validation-locale-negotiation.test.ts` and `engine-validation-tenant-rewrite.test.ts`: the served-adapter doubles gain `getTranslations` / `getFallbackLocale`, which `FileI18nAdapter` has. The three `t()`-locale probes in the negotiation suite now trip a built-in `max_length` message, the sentence the `t()` bridge still carries. - plugin-approvals `reader-locale-labels.test.ts` and plugin-audit `activity-summary-message.test.ts`: a new `[objectstack-ai#35384]` describe in each. Each covers the real in-memory service and the served-adapter shape, and asserts that `t()` itself answers the zh-CN row at the same service, so the defect's precondition is measured and not assumed. Also covered: the two controls, a `t()`-only service, and a throwing `getTranslations`. - `/meta`'s half of the same scenario is pinned in `packages/rest/src/meta-i18n-declared-fallback-chain.test.ts` §6. ## Acceptance notes - **Not fixed here, left for the area to file:** the approval notification subject param (`approval-notification-text.ts` `subjectParams`, `{ key: objects.OBJECT.label, fallback }`). It is resolved at delivery by `packages/services/service-messaging/src/notification-text.ts` (`renderWith`: `lookup(i18n, param.key, locale) ?? param.fallback`, through `t()`). The producer holds no recipient locale at emit, so it cannot hand over a resolved label. The only messaging fix would parse the key shape inside the per-delivery param resolver that every producer's keyed params share, which goes past the narrow widening the area allowed. **Routed (seat):** this is the objectstack-ai#35384 remainder, released back to `pm:queue` on merge as a typed object-label param in `NotificationTextKeys` that service-messaging resolves through `translateObject` (`domain:server`), together with `readerLabelsFor`'s flow, step and position labels. - **Folded into the same objectstack-ai#35384 remainder (L1 7081082388):** the two readers this PR moves hand `translateObject` the metadata route's resolve options but not its packaged base. plugin-approvals `objectLabel` passes `{ name }` alone, and plugin-audit `translatedObjectDef` passes no `packagedBase`. So for a renamed object (a served label that diverged from the packaged one) they read the translation of the old label, where `/meta` serves the rename. This is not a regression: `t('objects.<o>.label')` did the same. The fix is the `getPackagedObjectBase` read objectstack-ai#36460 threads for the share-link label. Until then, the docblocks' "as `/meta` resolves it" holds for the resolve options only. - **Measured: `en-US` under `sourceLocale: 'en'`.** `/meta` hands `translateObject` the request tag as written. objectql (objectstack-ai#34030) and now these readers hand it the tag negotiated against the service's locales. When the service holds an `en` locale (any `en` catalog), an `en-US` request gets `客户` (the defaultLocale row) from `/meta` and `Account` from objectql. With no `en` locale held, both give `客户`. Reading taken with `translateObject` from this branch's `@objectstack/spec` dist at c0111e2. Raised as a decision; not changed here. **Filed:** objectstack-ai#36466 (`/meta` negotiates the request locale first; no spec change). - No resolve-options builder is reachable from plugin-approvals or plugin-audit: rest's `metaTranslateOptions` is not a dependency, and objectql's `labelTranslationOf` is private. So each plugin carries the same few lines that plugin-security and objectql inlined in objectstack-ai#34030, with a docblock naming `metaTranslateOptions`. **Filed:** objectstack-ai#36467 (one exported spec builder, contract tier). ## Verification Two-minute check: `pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2 src/reader-locale-labels.test.ts`. Expect every case to pass, including `[objectstack-ai#35384] … an en reader picks no defaultLocale row`. Read first: 1. `packages/plugins/plugin-audit/src/activity-summary-message.ts`, the `readerSummaryLocale` / `translatedObjectDef` hunk (the reader's definitions are now the translated ones). 2. `packages/objectql/src/validation/rule-validator.ts`, the `authoredRuleMessage` hunk. 3. `packages/plugins/plugin-approvals/src/reader-locale-labels.ts`, the `objectLabel` hunk. <details><summary>Test readings (b815112 unless stated; fix round at final head 67d23af first)</summary> - Fix round at 67d23af (CI Test Core 6/10 red on b815112: 4 cases in `packages/services/service-automation/src/flow-write-refusal-locale.integration.test.ts`, whose i18n double held the rule message only as a `t()` key, so the bundle read now returned the authored English). The double's zh-CN bundle gains `objects.crm_deal._validations.amount_not_negative.message`. It is a fixture change of spelling only: no assertion changed and nothing was skipped. In that file, Tests 8 passed (8). `@objectstack/service-automation` 290/290 files, 4222/4222 tests. `@objectstack/plugin-approvals` 126/126 files, 1853/1853. `@objectstack/plugin-audit` 109/109 files, 1800/1800. Lock VERDICT command-exit 0. overlap-check at 67d23af is clean. A sweep of the other tests that combine validations, an i18n service and a non-en locale found no further consumer. - objectql `pnpm --filter @objectstack/objectql test` at 8be4929 (objectql is unchanged after it): Test Files 628 passed (628), Tests 14286 passed (14286); lock VERDICT command-exit 0. - plugin-audit `pnpm --filter @objectstack/plugin-audit test` at b61713e: 107/109 files, 1798/1800 tests. Two failures: the new pin's expected list wording, and the bare-string option case (triaged below). After the fix, those two files at b815112: Tests 31 passed (31). - plugin-approvals `pnpm --filter @objectstack/plugin-approvals test` at b61713e: 125/126 files, 1846/1853 tests. Seven failures, all in `record-lock-user-facing-message.test.ts`, whose doubles answered labels through `t()` only. After those doubles gained `getTranslations`, that file and `reader-locale-labels.test.ts` at b815112: Tests 41 passed (41). - typecheck at b815112: objectql exit 0, plugin-audit exit 0, plugin-approvals exit 0. At b61713e approvals failed with TS2339 on the label-only doc literal; fixed with an `ObjectLike` annotation. - Fixture triage: the bare-string option `options: ['p1', 'p2']` is not a `SelectOptionSchema` (strict object with `label`). `translateObject`, and so `/meta`, serves it as written. The objectstack-ai#7289 case now pins `p1` as `/meta` serves it, where it used to pin the `t()` row. </details> <details><summary>Reverse verification (each fixed source file put back to origin/main, its pins run, then restored)</summary> At b61713e, under one lock call, the scratch script used `git restore --source=BASE` (tree only), checked the BASE blob hash on disk, then `git checkout HEAD --` and checked the HEAD blob hash. Pins resolve `src/` directly, so no dist step is involved. - `rule-validator.ts` at BASE: `engine-label-source-locale.test.ts` 1 failed / 8 (`an en write reads the authored English sentence`). - `reader-locale-labels.ts` at BASE: `reader-locale-labels.test.ts` 4 failed / 22 (both `en reader picks no defaultLocale row` cases, the inbox-row case, and the `t()`-only case). - `activity-summary-message.ts` at BASE: `activity-summary-message.test.ts` 4 failed / 18 (both `en reader` cases, the `t()`-only case, and the throwing-translations case). - Controls stayed green on every leg. After restore, `git diff HEAD` was empty. </details> <details><summary>Gates</summary> `node scripts/pm/dispatch-gates.mjs --commands` derived 74 families; reconciliation with `--ran` reported 74 derived, 74 run. - 70 exit 0 at b61713e. Re-run at b815112, exit 0: `check:type-check-debt` (a PREREQUISITE exit 3 on the first pass, while a sibling build held dist), `check:type-check-coverage`, `check:cross-package-test-inputs`, `check:test-source-alias`, `check:undeclared-dep-imports`, `check:nul-bytes`, `check:engine-double-contract`, `check:doc-authoring`, `check:issue-citations`. - NOT MEASURED locally, left to CI: `check:i18n` (needs the built CLI closure), `check:dual-build-cjs-loads` (needs a full build), and `check-plugin-teardown-shape --self-test` (needs a commit this shallow clone does not have). - `overlap-check --branch=HEAD`: clean against origin/main and objectstack-ai#36399. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jTyyBmoPBsURQjeJGq)_ <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jTyyBmoPBsURQjeJGq --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…s label, read as the metadata translators serve them (objectstack-ai#36598) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi91tYCagMT6JaQ6YA5YqnWwi)_ Part of objectstack-ai#35384 Clause-②: no Metadata-protocol: none ## 维护者速读 - 应用以英文编写、默认给用户中文的部署里,英文读者在审批收件箱、审批详情和时间线上看到的流程名与岗位名,从中文改回作者写的英文;被代码扩展改过名的对象,在审批和动态摘要里也显示新名字,与元数据接口一致。 - 属于「标签按读者语言显示」的收尾工作,替英文读者和改过对象名的应用解决「看到默认语言或旧名字」的问题。 - 出错时读者看到的是改动前的标签(中文或旧对象名),不影响数据,可直接撤回本改动。 - 请决定审批步骤名是否另开一张卡:它暂时仍走旧的查词方式,需要规范包新增一个读取函数。 ## What changes This is stage 2 of objectstack-ai#35384: items 2 and 3 of the remainder in release comment 7082136476. Item 1 (the approval notification subject param in service-messaging) is not in this PR, and neither is the approval STEP label (see Acceptance notes). That is why this PR says `Part of`. - **Item 2: flow and position labels in the approvals door** (`plugin-approvals/src/reader-locale-labels.ts`). `readerLabelsFor().flowLabel` and `.positionLabel` no longer go through `t()`, which falls back to the `defaultLocale` row. Each now uses the spec translator for its type, over every locale the i18n service holds, with the resolve options the metadata route builds (the reader's negotiated locale, the declared fallback chain, and the authored language: `sourceLocale`, else `defaultLocale`): - position: `translatePosition`, which `GET /meta/position` serves through `translateMetadataDocument`; - flow: `translateFlow`. `/meta` serves a flow document untranslated: `translateFlow` is deliberately not in the dispatch table, and the flow runner applies it on the client. So `translateFlow` is the spec's one reading of `flows.FLOW.label`. - Callers that pick these up with no change: the inbox, the request page, the generic data door's request rows (`reader-locale-labels-middleware.ts`), and timeline position notes. - **Item 3: a renamed packaged object.** `objectLabel` (approvals) and `translatedObjectDef` (audit) now give `translateObject` the object's served definition and its packaged base as `packagedBase`. The base comes from the engine's registry (`registry.getPackagedObjectBase(name)`). That is the same body the metadata protocol's `getPackagedObjectBase` reads (`engine.registry`), and the protocol accessor is how `/meta` and objectstack-ai#36460's share-link label get `packagedBase`. - approvals: `readerLabelsFor` takes an optional third argument, `ReaderObjectSource` (`getSchema`, `registry`). `ApprovalService.readerLabels` and the two lock-refusal sentences in `lifecycle-hooks.ts` pass the engine they already hold. - audit: `installActivitySummaryLocale` reads the base off the engine it is installed on, and `readerSummaryLocale` takes an optional `getPackagedObjectBase`. - No public surface moves. The changed functions and types are internal modules, not exported from either package's index. `ApprovalServiceOptions` and `ApprovalEngine` are unchanged. Nothing under `packages/spec/src/**` or `packages/services/service-messaging/**` is edited. ## Tests - `reader-locale-labels.test.ts` (the shared harness), two new top-level describes: - Flow and position labels in a `sourceLocale: 'en'` / `defaultLocale: 'zh-CN'` deployment with an `en` pack. First the precondition: `t()` gives an `en` reader the zh-CN rows. Then `en` and `en-US` readers pick nothing, so the authored snapshot stands. A pin measures that `en-US` is negotiated to `en`. Controls: a zh-CN reader, an `en` pack entry, no `sourceLocale` declared, a `t()`-only service, and one bundle per read. - A renamed packaged object over a real `SchemaRegistry` (a packaged `Opportunity` that an extension renames `Deal`). `en`, `en-US` and `zh-CN` readers read `Deal`, and so does the oracle `translateMetadataDocument('object', served, bundle, {...options, packagedBase})`. Controls: an unrenamed object, a registry that throws, and a `getSchema` that throws. - Fixture triage (change of spelling): two older `objectstack-ai#24863` cases that used a `t()`-only double for `flowLabel` now ask `stepLabel`, the one label still on `t()`. - `activity-summary-message.test.ts`: a new top-level describe drives the installed `sys_activity` middleware over a real `SchemaRegistry`. `en`, `en-US` and `zh-CN` readers get `Deal`, and the zh-CN field label still translates. Controls: an unrenamed object, and a registry whose base read throws. <details><summary>Readings at head 0e31535</summary> - `pnpm --filter @objectstack/plugin-approvals test`: Test Files 127 passed (127), Tests 1880 passed (1880). - `pnpm --filter @objectstack/plugin-audit test`: Test Files 109 passed (109), Tests 1821 passed (1821). - `pnpm --filter @objectstack/plugin-approvals --filter @objectstack/plugin-audit typecheck` (tsc, scripts tsconfig, `check:test-typecheck`): lock VERDICT command-exit 0. - Ablation. One lock call, `scripts/ablation-replace.mjs` per leg, plus a trap restore. The subject resolves from `src/` (relative import), so there is no dist leg. - leg 1, approvals `objectLabel` without `packagedBase`: 3 failed / 37 (the `en`, `en-US` and `zh-CN` rename cases). - leg 2, `flowLabel` back on `t()`: 3 failed / 37 (the `en` and `en-US` authored cases, and the `t()`-only case). - leg 3, `positionLabel` back on `t()`: 3 failed / 37 (the same three). - leg 4, audit `translatedObjectDef` without `packagedBase`: 3 failed / 24 (the `en`, `en-US` and `zh-CN` rename cases). - Each leg: anchor x1 to x0 on disk, then restored with blob equal to HEAD. Final hashes match HEAD, and `git diff HEAD` is empty. - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` @0e315358fa: 72 families. 70 exit 0. 2 NOT MEASURED (exit 3, PREREQUISITE NOT MET): `check:dual-build-cjs-loads` (needs a full build) and `check:i18n` (needs the built CLI closure); CI runs both. `--ran`: 72 derived, 70 run, 2 NOT-MEASURED, 0 UNRUN. - `node scripts/pm/overlap-check.mjs --branch=HEAD` @0e315358fa: VERDICT clean exit 0. </details> ## Acceptance notes - **The approval step label (`flows.FLOW.approvals.NODE.label`) is still read through `t()`.** No spec translator reads that key: `translateFlow` overlays the flow label, the toasts and screen copy only. Reading the bundle along the locale chain inside plugin-approvals would be a second resolver beside `localeChain`. A spec export would widen `@objectstack/spec`, which this slice may not do. So an `en` reader in such a deployment still sees the zh-CN step label next to the authored flow label. The fork goes to the seat as an open question in the report. - PM mechanism assumption, measured: `/meta` does not translate flows. `GET /meta/flow` serves the authored document, so the flow side uses `translateFlow` (the same translator, with the same resolve options), not a `/meta` read. - The packaged base comes from the engine's registry, not from the `protocol` service. It is the same body, the engine is already in hand at every caller, and `ApprovalServiceOptions` stays unchanged. - File surface: `approval-service.ts` (one argument) and `lifecycle-hooks.ts` (two arguments) are beyond the claim's listed files. They are the callers that hand `objectLabel` its engine. ## Verification Read first, by risk: 1. `packages/plugins/plugin-approvals/src/reader-locale-labels.ts`: the `readerLabelsFor` body (`translated`, `flowLabel`, `positionLabel`, `objectLabel`). 2. `packages/plugins/plugin-audit/src/activity-summary-message.ts`: `translatedObjectDef` and `packagedObjectBaseReader`. 3. `packages/plugins/plugin-approvals/src/lifecycle-hooks.ts`: the two `readerLabelsFor(service, locale, engine)` calls. Two-minute check: `pnpm --filter @objectstack/plugin-approvals exec vitest run src/reader-locale-labels.test.ts` should report 37 passed. The `[objectstack-ai#35384]` describes cover `en` and `en-US` readers with authored flow and position labels, and the rename `Deal` in every locale. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmPTDM2MxHR8cvoMVUX <!-- signed: repo:objectstack#2 · os-steve · session_01ADHkmPTDM2MxHR8cvoMVUX --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Steedos · project thread
Fixes #33552
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
@objectstack/typesbuildShareLinkResolveAnswer(the one builder both mounts ofGET /api/v1/share-links/{token}/resolveserve) now answers:link.object_label: the shared object's label in the request's locale. The locale is theAccept-Languagetop tag, else the i18n service's default locale, as the meta door reads it.translateObjectover the served label, with the inputs the meta door hands it for an object: the resolve optionsmetaTranslateOptionsbuilds (locale, declared fallback, andsourceLocalebeforedefaultLocaleas the authored language), andpackagedBase, the object's packaged declaration, read through the request's metadata protocol (getPackagedObjectBase, the accessor the meta door'spackagedObjectBaseOfreads for an object).pairBundleis passed. Anobjectis extend-only (ADR-0146 D10;servedOverrideBaseOfanswers none for it), so the meta door hands the object translator no pair catalog either, and a.custompair's translation of the label reaches both through the deployment bundle.fields[NAME].hidden: truefor a field the object declares hidden, including the injectedorganization_id/owning_business_unit_id/queuecolumns, which are hidden at their source. No other field carries the key.Accept-Language, the i18n service and the metadata protocol:plugin-sharing:registerShareLinkRoutesgains optionali18nandprotocolresolvers, whichSharingServicePluginwires to the kernel'si18nandprotocolservices, resolved per request.packages/runtime/src/domains/share-links.ts:deps.resolveService(context, 'i18n')anddeps.resolveService(context, 'protocol')./resolveand/messages) on both mounts answerVary: X-Share-Password, X-Share-Password-Encoding, Accept-Language, from the newSHARE_LINK_PUBLIC_VARYconstant (@objectstack/types). Before, they sent only the two password headers. The two routes' docblocks name the third header.ui/apps/console):Shared LABEL, falling back toobject_name.SharedRecordFieldsleaves off a field the projection marks hidden. That is the record panel's rule (RecordDetailPanelfiltersschemaFields[name].hidden).shareRequestHeadersstates thehtmlelement'slangattribute asAccept-Language, the same sourcecreateAuthenticatedFetchuses, so the label matches the page's UI language.packages/runtime/src/domains/share-links.ts(cloud's designed primary surface) and its both-mounts harnesspackages/runtime/src/domains/share-links-field-projection.test.tsare part of this change. Both mounts build the answer through the one builder.link.object_label, besidelink.object_name.packages/spec/src/**edit: the HTTP answer shape is declared in@objectstack/typesonly.ResolveShareLinkResultin spec contracts is the service result, and this PR does not change it.Tests
packages/types/src/share-link-resolve-answer.test.tsadds a top-level describe with five cases:hidden: trueand a shown one carries no key;object_label.packages/runtime/src/domains/share-links-field-projection.test.tsruns on both mounts over real ObjectQL, SQLite and ShareLinkService:en-USand no header give the declared label;queuecolumn report hidden;packages/types/src/share-link-resolve-answer.test.tsalso pins the rename againstpackagedBase, the translated unrenamed label, and a throwing protocol read as no baseline.Varypins per mount now read the three headers: the dispatcher twin inshare-links-public-cache-headers.test.tsandshare-links-password-encoding.test.ts, the plugin route inshare-link-password.test.ts. The two runtime harnesses import@objectstack/metadataat module top, ascheck:test-source-aliasprescribes.SharedRecordPage.systemFields-33346.test.tsx: a hidden non-system field is not listed; the header shows the label; an absent label falls back to the name.shared-record-shape.test.ts: theAccept-Languageheader follows thehtmlelement'slangattribute.Acceptance notes
GET /meta/object/NAME: the packaged base, read through the protocol'sgetPackagedObjectBase, so a rename stands. No pair bundle is passed, because an object is extend-only and takes no declared override (ADR-0146 D10).@objectstack/typesrestates the object row of rest'spackagedObjectBaseOf. That reader is not exported, and plugin-sharing does not depend on rest. The docblock names the reader it follows.Accept-Languageonly. It does not add a?locale=read, so the route's query surface is unchanged.Accept-Language, andVarysays so (L2 S1, above).Cache-Control: no-storeis unchanged.Verification
Read first:
packages/types/src/share-link-resolve-answer.ts,sharedObjectLabel: the locale and resolve-option rule.packages/runtime/src/domains/share-links.ts, the resolve arm: the twin's i18n resolution.ui/apps/console/src/pages/SharedRecordFields.tsx, the key filter.Two-minute check:
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/share-links-field-projection.test.ts. Expect every test to pass, including the[#33552]describes on both mounts (the rename case among them).Readings, rework round 1, at head 2745365
set -e:share-link-resolve-answer.test.tsandshare-password-header.test.ts: 50/50;share-links-field-projection,share-links-public-cache-headersandshare-links-password-encoding: 51/51;share-link-passwordandshare-link-redact-fields: 55/55;share-link-password.test.ts44/44.packagedBaseoption line insharedObjectLabel. The types test read the source directly: 1 failed (the rename pin), 16 passed. Restored to the HEAD blob f28a2bdd1f37;git diff HEADempty.Accept-LanguagefromSHARE_LINK_PUBLIC_VARY. Types was rebuilt andablation-dist-preflight --absentconfirmed the marker gone from dist.share-links-public-cache-headerspins went red: 3 failed, 2 passed.never cachedpins went red: 2 failed.git diff HEADwas 0 lines.check:test-source-alias(fixes the CI red at ec70ad9),check:nul-bytes,check:cross-package-test-inputs,check-changeset-no-major,check-empty-changeset,check-adr-0087-registration,check:route-envelope,check:undeclared-dep-imports,check:doc-authoring,check:issue-citations.overlap-check --branch=HEAD: clean.Readings at head 75f97ca (round 0; local subset; CI runs the full farm)
pnpm --filter @objectstack/types test: Test Files 39 passed (39), Tests 921 passed (921). Typecheck passed on@objectstack/types,@objectstack/plugin-sharingand@objectstack/runtime; the test-typecheck ledgers held. These ran at head 9a0a2b2, and only a test-file import and the changeset have changed since.share-links-field-projection.test.ts19/19,share-link-resolve-answer.test.ts14/14.ui/, under the lock (VERDICT command-exit 0): six share-page files, Test Files 6 passed (6), Tests 51 passed (51).scripts/ablation-replace.mjs, which confirmed the anchor went from 1 to 0, and was restored to the HEAD blob a2ae3fcb6b25.hiddenprojection line: 1 failed, 13 passed.dispatch-gates --ran): 78 derived, 74 run, 4 not measured.check:dual-build-cjs-loadsandcheck:i18n(workspace not fully built), andcheck:type-check-debt(closure build got no turn on the lock).pnpm --dir ui exec vitest run scripts/exited 1. Six tests timed out at 15 s with the box at load average 15, and the registry census could not import packages that were not built yet. The call-site-keys gate those timed-out tests drive was run directly (node ui/scripts/check-i18n-call-site-keys.mjs, exit 0).check:test-source-aliasfirst flagged the edited harness; it was fixed with a module-top@objectstack/metadataimport and is now exit 0.overlap-check --branch=HEAD: merges cleanly, exit 0.Generated by Claude Code