Repository navigation
fix(app-shell): the translation preview draws the positions and permissions groups, at an objectstack pin that declares them (objectui#13478) - #13485
Conversation
…ssions groups, at an objectstack pin that declares them
objectstack 47af3dde42 added `positions` and `permissions` to the per-app
TranslationDataSchema. TranslationPreview's CATEGORY_DEFS is exhaustive by
`satisfies Record<TranslationGroup, ...>` over that schema's shape, so at that
spec app-shell no longer type-checked (TS1360, missing positions, permissions),
which is what turned objectstack's Console Pin Gate red.
- CATEGORY_DEFS gains the two rows in the schema's order (after flows, before
metadataForms): Users for positions, ShieldCheck for permissions, the icons
PositionPreview and PermissionPreview already use.
- The designer table gains engine.translationPreview.category.positions and
.permissions in en ("Positions", "Permission Sets") and zh ("岗位", "权限集",
the table's existing words for the two metadata types).
- .objectstack-sha moves e649c2d91e -> 47af3dde42 (on objectstack main, 51
commits ahead, 0 behind). The bump repacked three manifests in
.objectstack-pin (core, lint, spec), whose only change is zod ^4.6.5 ->
^4.6.6; pnpm-lock.yaml is unchanged and a frozen install passes.
- The two rows and the pin move land together: at the old pin the rows are
excess properties under the same `satisfies`, and at the new pin the old
table is missing two.
- Tests: the objectui#11765 fixture table gets a spec-valid entry for each new
group, and the objectui#10862 locale sites list the two headings and read
coverage over 13 groups.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Usjyy1hT9FNxZHea9u7drp
✅ 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
|
…nd permissions groups The pin move to objectstack 47af3dde42 adds `positions` and `permissions` to the served document's shape (GetTranslationsResponseSchema). The console's loadLanguage pin walks that shape and requires a payload carrying any one group, alone, to take the transform branch; SPEC_TRANSLATION_GROUPS lacked the two, so Test shard 16/16 went red with "positions: expected [ 'positions' ] to deeply equal [ 'app' ]". Both groups join the list, and the transform copies them through onto `app` like the others. The changeset gains an @object-ui/i18n patch. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Usjyy1hT9FNxZHea9u7drp
✅ 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
|
席位核对 — ACCEPT · PR #13485 @
|
Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
Requested by Elon · project thread
Fixes #13478
Clause-②: yes
Metadata-protocol: none
objectstack's
Console Pin Gateis red on main because app-shell no longer type-checks against objectstack47af3dde42(objectstack-ai/objectstack#25701). That change added thepositionsandpermissionsgroups to the per-appTranslationDataSchema, andTranslationPreview'sCATEGORY_DEFSis exhaustive over that schema's shape bysatisfies. This PR adds the two rows and moves objectui's own pin to47af3dde42, so objectui type-checks against the same spec. Once it merges, objectstack can move its.objectui-shapast the merge commit (objectstack's own card names this one as its blocker).What changed
TranslationPreview.tsx: twoCATEGORY_DEFSrows, in the schema's order (afterflows, beforemetadataForms):positionswithUsersandpermissionswithShieldCheck, the iconsPositionPreviewandPermissionPreviewalready draw. Both are nested groups (flat: false), so each card counts the group's top-level keys and samples them with their inner key count, asobjectsandflowsdo.metadata-admin/i18n.ts(the designer table, the only pack these keys live in,enandzh):engine.translationPreview.category.positions= "Positions" / "岗位" andengine.translationPreview.category.permissions= "Permission Sets" / "权限集", the words the same table already uses for the two metadata types.TranslationPreview.categories-11765.test.tsxgets a spec-valid fixture for each new group (its first case requires one per schema group).adminPreviews.i18n-10862-s2.test.tsxlists the two headings among the rendered locale sites and reads coverage over 13 groups (2/13 (15%), was2/11 (18%))..changeset/13478-translation-preview-positions-permissions.md:@object-ui/app-shellpatch.The pin
.objectstack-shamoves frome649c2d91e(the 18.1.0 release commit) to47af3dde42bb4e77fd92025605b89b4a473295a4. REST comparee649c2d91e...47af3dde42:status: ahead,ahead_by: 51,behind_by: 0; the bump script also reported "(on origin/main)". It is pinned at the card's floor, not at objectstack main's head: the four commits after it on objectstack main are left for the next bump.scripts/bump-objectstack.sh 47af3dde42bb4e77fd92025605b89b4a473295a4 --no-commit(built and packed the 7 packages), thenpnpm install..objectstack-pin/(core,lint,spec), each onlyzod^4.6.5to^4.6.6(fix(deps): move zod to ^4.6.6 and clear the lockfile's high and critical advisories objectstack#25657). The lockfile already resolveszod@4.6.7, sopnpm-lock.yamlis unchanged andpnpm install --frozen-lockfileexits 0.e649c2d91ethe schema declares neither group:grep -c '^ positions: z.record'over that commit'spackages/spec/src/system/translation.zod.tsreads 0, and 1 at47af3dde42; the same forpermissions. Undersatisfies, an extra key in an object literal is TS2353 "Object literal may only specify known properties" (probed with this repo's tsc 6.0.3 on a two-keyRecord). So the rows alone fail at the old pin, and the pin alone fails as the gate does.Clause-② reading (the claim asked for it)
The claim declares
yesbecause the seat could not tell whethermetadata-admin/i18n.tsreaches app-shell's published entry, and the two lines above are copied from the claim. Measured on the built declaration closure (packages/app-shell/dist, walking the relative imports fromindex.d.ts, the onlyexportsentry with types):.d.tsfiles.views/metadata-admin/i18n.d.tsis one of them (the positive control), but its face ist(key: string, …),tFormat(key: string, …)and the other helpers: the key table is not exported, and no key is a type.translationPreview: 0.previews/TranslationPreview.d.tsis not in the closure at all.So the diff widens no published accept set and no public face of app-shell, and the reading is
no. The declaration is the seat's, so the lines stay as claimed.Verification (local, this worktree, at the new pin)
pnpm exec turbo run build --filter=@object-ui/console... --concurrency=2(under the verify lock, 6144 MB heap): 35 of 35 tasks, including@object-ui/app-shell'stscand the console's vite build, SDUI manifest and plugin tsc. That is the build the Console Pin Gate runs, here at objectui's own pin.pnpm exec vitest run packages/app-shell/src/views/metadata-admin/ packages/types/(under the lock): 980 files passed; 17091 tests passed, 1 skipped.TranslationPreview.tsx(on-disk count 0, back to 2 after the restore), thecategories-11765file goes red on its order-and-coverage case and on every per-group case, the two new groups included.check:i18n-keys,check:i18n-designer-parity,check:i18n-dead-keys,check:i18n-drift,check:installed-pin-claims,check:spec-symbols,check:icon-record-names,check:control-bytes,check:new-line-citations(0 new),check-changeset-presence,check-changeset-no-major, andeslinton the four changed source files.check:spec-floors: exit 1 with the same twofloor-too-lowfindings (@object-ui/authMEMBERSHIP_ROLE_EXTERNAL,@object-ui/typesnavItemVisibleDataNeedsDataSource) that tooling(objectui-readiness): make the objectui tree merge-ready in its own repo before cutover (objectstack#25685) #13472 recorded as pre-existing on main. This diff touches neither package. The gate runs on push and schedule with--cross-check, which is its measurement, and that run is green on maincd70b78.NOT MEASURED locally (left to CI): the rest of the workspace
vitestshards,lintandtype-checkacross all packages, and e2e.Acceptance notes
objectui#13477 (the label render of the same objectstack change) is a different defect; it remains open and nothing here touches it.
Adds no product-specific widget, dialog, hook or string (see AGENTS.md › Product-neutral renderer)
Implemented by the ui lane card thread, session
https://claude.ai/code/session_01Usjyy1hT9FNxZHea9u7drp; claim on the card, comment 6391374949.🤖 Generated with Claude Code
https://claude.ai/code/session_01Usjyy1hT9FNxZHea9u7drp
Generated by Claude Code