Skip to content

fix(studio): one name per group — the directory and a type page's badge say Platform / Access, like the menu - #37121

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-37082-studio-group-names
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-37082-studio-group-names

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #37082

Clause-②: no
Metadata-protocol: none

维护者速读

  • Studio 里「全部元数据」目录页的分组标题、筛选标签和类型页头部的分组徽标,从「系统 / 安全」改成和左侧菜单一样的「平台 / 访问」;系统设置里数据源页面的徽标也随之改为「平台」。
  • 属于 Studio 重构的收尾:同一个 Studio 里同一组不再有两种叫法,组名以修订后的 Studio 信息架构决策为准。
  • 出错只会让分组名称显示不对,不影响数据和权限,直接撤回这个改动即可恢复。
  • 请确认系统设置里数据源页面的徽标显示「平台 / Platform」可以接受(它在决策里就属于「平台」这一组)。

What changes

  • Route (a): the shared dictionary is renamed. DOMAIN_LABELS_EN / DOMAIN_LABELS_ZH in ui/packages/app-shell/src/views/metadata-admin/i18n.ts (read through translateMetadataDomain) now draw system as Platform / 平台 and security as Access / 访问, the group names of ADR-0084 as amended. The dictionary carries exactly two locales (en, zh); both changed.
  • The menu reads the dictionary. studioMenuGroupLabel now returns translateMetadataDomain(group, locale); its two menu-only keys engine.studio.menu.groupSystem / engine.studio.menu.groupSecurity are removed from the studio namespace (en and zh), since nothing reads them any more. The function stays as the menu's named seam, so StudioMenu.tsx is untouched.
  • studioMenuModel.ts: one doc comment that said the dictionary keeps System / Security is corrected (this change made it false).

Route choice and the readers, before and after

Every reader of translateMetadataDomain, measured on origin/main 9d70768 (git grep over the whole monorepo, plus a GitHub code search across the org: no hit outside this repo; @object-ui/app-shell is private, so the re-export at metadata-admin/index.ts has no external consumer):

Reader Surface Before After
DirectoryPage.tsx chips Studio, All metadata System / 系统, Security / 安全 Platform / 平台, Access / 访问
DirectoryPage.tsx group headings Studio, All metadata System / 系统, Security / 安全 Platform / 平台, Access / 访问
PageShell.tsx badge (list header and compact item header) Studio type and item pages System / 系统, Security / 安全 Platform / 平台, Access / 访问
PageShell.tsx badge Setup's datasource pages (the one kept type: SETUP_KEPT_METADATA_TYPE = 'datasource', rendered in place by MetadataResourceEditPage) System / 系统 Platform / 平台
studioMenuGroupLabel Studio left menu Platform / 平台, Access / 访问 (own keys) unchanged words, now from the dictionary

The only non-Studio surface is Setup's datasource badge. It names the same group: the badge shows the type's registered domain, and ADR-0084's amendment says in its type-to-group table and its third reading that a datasource is found under 平台 Platform (its item opens in Setup per ADR-0146 D1, but its group is Platform). So route (a) changes what that surface says to the group name the ADR gives it, not to a different concept; route (b) would keep two words for one group, the inconsistency this card closes. No security-domain type is kept in Setup, so Access appears on Studio surfaces only.

Tests

  • New pin ui/packages/app-shell/src/views/metadata-admin/DirectoryPage.groupNames-37082.test.tsx, over the real directory page and the real PageShell, for en and zh-CN (describe.each): the directory's group headings, the domain chips, the type page badge (list header) and the item page badge (compact header, the one Setup's datasource item page draws). Each word is compared with the menu's own (studioMenuGroupLabel) and with the literal Platform / 平台, Access / 访问; CONTROL: data stays Data / 数据, and System / 系统, Security / 安全 are drawn nowhere.
  • studioMenuModel.test.ts: the old "dictionary keeps System / Security" case is replaced by "the menu draws each group with the dictionary's word, en and zh-CN".
  • Two existing pins read the old words and are updated: PageShell.narrowHeader-12306.test.tsx (badge text Security to Access) and StudioDesignSurface.accessSegment-12452.test.tsx (the Access label now from translateMetadataDomain, since the removed key is gone).
  • Ablation (one-time, through scripts/ablation-replace.mjs, restored to the HEAD blob): the zh system value set back to 系统 turned 6 cases red (the five zh-CN cases of the new pin and the menu case in studioMenuModel.test.ts), en stayed green; restore verified blob == HEAD and git diff HEAD empty.

Acceptance notes

  • DOMAIN_LABELS_* also carry a UI-local platform key that already read Platform / 平台. No producer sets domain: 'platform' (the spec's domain enum is data, ui, automation, system, security, ai; git grep finds no UI registration with it), so the two cannot meet in one directory today. Noted, not changed.
  • File surface: beyond the claim's list, two existing test files that pin the old words (above) and one doc comment in studioMenuModel.ts were edited, because this change made them false.

Verification

Two-minute check: open Studio, All metadata, in zh-CN. The left menu, the chips and the section headings all read 平台 and 访问; open a permission set and its header badge reads 访问 (Access in en).

Read first, by risk:

  1. ui/packages/app-shell/src/views/metadata-admin/i18n.ts, the two renamed values in each DOMAIN_LABELS_* table (the change that reaches Setup's datasource badge).
  2. ui/packages/app-shell/src/views/studio-design/studioMenuGroupLabel.ts, the menu now reading the dictionary.
  3. ui/packages/app-shell/src/views/metadata-admin/DirectoryPage.groupNames-37082.test.tsx, the en and zh-CN pin.
Local readings on head b5fb875
  • Targeted tests (from ui/, under the verify lock): the new pin, PageShell.narrowHeader-12306, DirectoryPage.stateVocabulary-29705 and all of packages/app-shell/src/views/studio-design/: Test Files 303 passed (303), Tests 2299 passed (2299), VERDICT command-exit 0.
  • pnpm --filter @object-ui/app-shell --filter @object-ui/i18n run type-check: both packages echoed type-check, VERDICT command-exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands: 38 derived families, all exit 0; --ran reconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero, every line with its exit code). Among them pnpm --dir ui exec vitest run scripts/: Test Files 172 passed | 2 skipped (174).
  • Also run: pnpm --dir ui run check:i18n-dead-keys, check:i18n-keys, check:i18n-drift: exit 0 each.
  • node scripts/pm/overlap-check.mjs: VERDICT clean exit 0 (merges cleanly with origin/main and with feat(studio): a permission set opens full-screen at its metadata address; the sharing overview gets its own route #37089, which shares three studio-design files).
  • Lint, the full UI suite and the type-check lanes are CI's.

Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 24, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

Finalized head for L1 · 2026-11-24T21:41Z · b5fb87598 · zone a4-S (#37082)

  • CI on b5fb87598: 45 success and 13 skipped. The skips are UI-only path skips and the opt-in and queue jobs; nothing failed.
  • Size: +214 / −36. Clause-②: no · Metadata-protocol: none.
  • os-dev report: Studio 重构后续:左侧菜单分组叫「平台 / 访问」,目录页和类型页的分组标题仍是「系统 / 安全」,统一成同一套名字 #37082 comment 7143618198.
  • Route (a) renames the shared dictionary. Its one non-Studio reader is Setup's datasource item page, whose badge changes from System / 系统 to Platform / 平台. ADR-0084 (amended) puts datasource in 平台, so it stays the same group under a new name.
  • Landing gate: the maintainer's yes on that Setup badge change, asked in the zone session. The zone lands this only after both that yes and an L1 ACCEPT.
  • Edits beyond the claim's file list: two tests that pinned the old words (PageShell.narrowHeader-12306, StudioDesignSurface.accessSegment-12452) and one doc comment in studioMenuModel.ts.
  • L1 reviewer: seat repo:objectstack#4.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head b5fb87598c43a298b4703e7975da4085984d748b · 2026-11-24T21:42Z

Requested by zone a4-S (7145277717) for card #37082.

  • Shape. 10 files (+214/−36) in ui/packages/app-shell and ui/packages/i18n, one changeset (@object-ui/app-shell, @object-ui/i18n patch; Clause-②: no, Metadata-protocol: none). Not governed.
  • Fix, read against the code (route (a)). The shared domain dictionary translateMetadataDomain now names system Platform / 平台 and security Access / 访问 (ADR-0084 as amended); studioMenuGroupLabel reads that one dictionary instead of its two menu-only keys, so the Studio menu, the All metadata directory's headings and chips, and PageShell's domain badge cannot name a group two ways.
  • The two removed keys (engine.studio.menu.groupSystem / groupSecurity) are absent from the released @object-ui/i18n@18.6.0 — they were added after it — so removing them narrows no published key set; Clause-②: no holds.
  • Visible side effect, held for the maintainer: Setup's datasource pages draw the same badge, so a datasource now reads Platform / 平台 instead of System / 系统 there (ADR-0084 puts datasource in 平台). The route's own note makes landing wait for the maintainer's yes on that badge change; this ACCEPT does not stand in for it.
  • Tests. A new directory test pins the group names on headings, chips and the badge; three existing tests are updated to the new names, with no assertion dropped.
  • Gates. Check-runs at this head: 45 success, 13 expected skip, 0 failed. Landing K: 12.
  • No must-fix, no should-fix. The zone lands it after the maintainer's yes on the badge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

Ruling recorded · 2026-11-24T21:57Z · the visible side effect of route (a): Setup's datasource pages draw the shared domain badge, so a datasource reads Platform / 平台 instead of System / 系统.

The maintainer in seat repo:objectstack#4's session, verbatim: 「#37121:数据源标签从「系统」改成「平台」,同意」

The L1 ACCEPT at b5fb87598c (7145301308) stands; the zone lands this PR.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

Landing · 2026-11-24T21:59Z · head b5fb87598 · zone a4-S (#37082)

  • L1 ACCEPT from seat repo:objectstack#4 at b5fb87598, on this PR.
  • The maintainer's yes on Setup's datasource badge (系统 → 平台), verbatim: 「fix(studio): one name per group — the directory and a type page's badge say Platform / Access, like the menu #37121:数据源标签从「系统」改成「平台」,同意」, recorded on this PR.
  • check-governed-merges.mjs --pr 37121: NOT governed; 250 changed lines, under 3,000.
  • Checks on the head: 45 success and 13 expected skips (UI-only path skips plus the opt-in and queue jobs); nothing failed.
  • K: landing-k.mjs cannot answer, because this UI-only head printed no Affected-set diff base. GitHub compare puts the head 14 commits behind main, under 15.
  • Clause-②: no. No L2 is owed: the two removed studio keys are absent from the released @object-ui/i18n@18.6.0, per the L1.
  • Action: ready, then auto-merge through the merge queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants