Repository navigation
feat(app-shell): Studio's app, permission and view previews show the authored area descriptions, RLS policy labels and view label (objectui#11027) - #11098
Conversation
…authored area descriptions, RLS policy labels and view label (objectui#11027) - AppPreview lists AppSchema.areas: each area's label, id and, when authored, its description, resolved in the designer locale through the spec's resolveI18nLabel. New designer row engine.appPreview.areas (en, zh). - PermissionPreview lists each rowLevelSecurity policy by name, with its label and description when authored, under the existing perm.rls.title heading. A set whose only grants are policies no longer shows the empty state. - ViewPreview draws the view's own label as the preview heading on the no-object, form and list routes; an unauthored label draws nothing. - One pin per preview: authored, absent and, where the key is I18nLabel, a locale-map case. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
…tui#11027) Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
…view pin's stub adapter (objectui#11027) Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
|
changeset-claim-re-read
|
✅ 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 #11027 (body, triage Binding direction: triage ① Derived judgmentsEvery accept-set and public-surface change the diff implies, each named right or wrong:
② Semver level
Clause-②: no ③ Boundary flags
Check-runs on All 43 runs completed by 2026-09-29T12:54Z (read at 12:44Z with 13 in progress, re-read until none remained): 40
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #11027
Clause-②: no
Four display keys that
@objectstack/specparses and publishes reached no human anywhere in Studio. Each designer preview now renders its key where it was authored, and renders nothing where it was not.What changed
All under
packages/app-shell/src/views/metadata-admin/.app.areas[].descriptionAppPreviewlabelandid, with itsdescriptionbeneath it.labelanddescriptionare the spec'sI18nLabel, so both go through the spec'sresolveI18nLabelin the designerlocale(the resolverDashboardPreviewalready uses).permission.rowLevelSecurity[].labelPermissionPreviewperm.rls.titleheading ("Row-Level Security" / "行级安全"): each policy'sname, with itslabelbeside it. The header pill still counts them.permission.rowLevelSecurity[].descriptionPermissionPreviewviewcontainerlabelViewPreviewI18nLabeland is resolved the same way.idand the policynameare required identifiers and always show, the way the headers already show the app and permission-set names.rowLevelSecurityis empty.engine.appPreview.areas("Areas" / "区域", matching the runtime sidebar'ssidebar.area), in the designer table'senandzhhalves. The policy list reusesperm.rls.title..changeset/11027-preview-display-keys.md,@object-ui/app-shellpatch.Premises, re-measured at origin/main
a5841be35AppPreview.tsx:grep -c areas= 0, with a control ofgrep -c navigation= 8 on the same file.PermissionPreview.tsx:rowLevelSecuritywas read intorlsand used only for the count pill.ViewPreview.tsx: the label was relayed only into the one injected named listView.ObjectView'srenderNamedViewTabsreturns null whenentries.lengthis at most 1. The reverse run below measured it through the realobject-viewstack: with the fix reverted, the authored label is not a heading anywhere on the page.labelanddescriptionand the view itemlabelareI18nLabel. The RLS policylabelanddescriptionare plainz.string()in the installed spec 17.4.0 and in objectstackorigin/mainrls.zod.ts. So the permission pin has no locale-map case, and a non-string value renders nothing instead of being stringified.Evidence
The final head is
335a6c38c. Every reading below is at that sha unless it says otherwise. Heavy runs went through the shared verify lock.pnpm exec turbo run build --filter='@object-ui/app-shell^...' --concurrency=2: exit 0, 28 tasks, 12 of them cached.pnpm --filter @object-ui/app-shell type-check(tsc --noEmit && tsc -p tsconfig.test.json): exit 0.tsc -p tsconfig.test.json --listFilesOnlylists all three new pins.pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/previews/plus the threepackages/i18ntests that read the designer table (appDesigner-fieldDesigner-formula-retired-6310,dashboard-emptyState-keys-retired-7125,perm-home-namespace-3546): Test Files 82 passed (82), Tests 1108 passed (1108). The run also included one uncommitted scratch probe (1 file, 1 test; see Acceptance notes), so the committed tree accounts for 81 files and 1107 tests.previews/AppPreview.areas-11027.test.tsx: authored, absent (per area and per app), a locale map inzh-CNanden-US, the zh heading row, and design mode.previews/PermissionPreview.rlsPolicies-11027.test.tsx: authored, absent (per policy and per set), a policies-only set, and the zh heading row.previews/ViewPreview.containerLabel-11027.test.tsx: through the realobject-viewregistration. Authored, absent (the heading set equals the authored set minus the label, so nothing stands in for it), a locale map inzh-CNanden-US, and the form route.0edb411f1: the three preview sources were checked out at BASEa5841be35and the pins kept at head. The mutation was proven on disk before the run: each file hashed to its BASE blob, and the markersreadAreas/readPolicies/ViewLabelHeadingcounted 0. Result: 11 failed, 2 passed of 13. The 2 green cases are the two per-app and per-set absent cases, which is the expected direction. Every authored, locale-map and heading case went red. Restoration usedgit checkout HEAD --, was proven by HEAD blob hashes and an emptygit diff HEAD, and ran from an EXIT/INT/TERM trap. The one commit after0edb411f1(335a6c38c) changes types only: it readsdraft.areasoff the already-typed draft, and it types the view pin's stub adapter. The reverse run was not repeated for it.pnpm exec eslint --format jsonover the 7 changed.ts/.tsxfiles: 7 files, 0 errors, 29 warnings.main. Per-file warning counts, BASE to head:AppPreview.tsx8 to 8,PermissionPreview.tsx3 to 3,ViewPreview.tsx18 to 18,i18n.ts0 to 0. The three pins have 0.eslint.config.jslints**/*.{ts,tsx}minus its ignores (build output). The changeset.mdis outside that population.parserOptions.projectorprojectService, so linting is not type-aware and this diff cannot change the verdict on any file it does not touch.pnpm lintrun is CI's.node scripts/…), each exit 0, each quoted by its own verdict line:check-i18n-call-site-keys,check-i18n-designer-table-parity("Every en row has a zh row, and every shared row carries the same placeholders."),check-i18n-en-drift(the designer table: 1 key added, 0 en values changed);check-changeset-presence(7 source files of 1 released package, 1 changeset),check-changeset-no-major,check-changeset-claims(report-only; the three pending changesets it names fori18n.tswere read, and all three paragraphs still hold),check-pending-changeset-literals;check-control-bytes,check-new-cross-file-line-citations(0 new),check-designer-field-key-parity,check-test-path-roots.pnpm testandpnpm lintruns (they belong to CI), and a real browser. The previews were read through React Testing Library DOM only.Acceptance notes
AppPreviewmishandles two otherI18nLabelkeys it already reads:[object Object]for a locale-maplabel, because it usesString(label).normalizeNavkeeps a nav item'slabelonly when it is a string. A childless nav item with a map label is dropped from the list, together with its target. A group with a map label reads "(unnamed)".335a6c38c. A plain-string nav label on the same mount rendered, as the control.AppPreview app label object Object·AppPreview navigation label locale map unnamed·app preview I18nLabel resolveI18nLabel nav label.packages/i18nlocale packs. The designer'sengine.*rows live in its own table (metadata-admin/i18n.ts,enandzh), which is the only table the designert()reads (packages/i18n/README.md, "Scope — theengine.*carve-out"). The new row went there, and no pack changed.Implemented by
domain:uiseat 2 in sessionhttps://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec, on branchclaude/issue-11027-preview-display-keys.Generated by Claude Code