Skip to content

feat(app-shell): Studio says a customizable package saves edits as a customization, links an installed app to design mode, and shows translated labels - #39961

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-39472-studio-installed-pkg-copy
Dec 6, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-39472-studio-installed-pkg-copy

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Part of #39472
Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:管理员在应用搭建里打开已安装的软件包时,只读提示改为"修改会保存为本环境的定制";已安装应用的条目页多了一个"在设计模式中打开"的链接;对象标题和字段分组在原文旁边显示读者看到的译文。
  • 为什么做:新公司试用定制已安装的 CRM 时,提示让人"切换软件包"、应用页说"已锁定"却标着可定制、中文界面里只看到英文原文,管理员会误以为改不了。
  • 出错会怎样:只影响提示文字、一个跳转链接和译文显示,不改保存逻辑;有问题直接撤回本次改动即可。
  • 要你做什么:无。

What changes

Items 1, 2 and 3 of #39472 (items 4 and 5 landed in PR #39683; item 6 is not in this claim and stays on the card).

Item 1 — the read-only reason says where an edit goes. A read-only package that Studio customizes (listed, not a kernel package, the customization door open to this caller) now carries a new reason, engine.studio.pkg.customizableHint: changes are saved as this environment's customization, and the package stays as installed. It replaces the old "switch to or create a writable package" text in:

  • the package switcher's lock (its title, accessible name and the trigger's description);
  • the package Overview's access chip and its Pending tab line; on such a package with no customization yet, the greyed revert says there is nothing to revert;
  • the Data pillar's item-header chip, on an object that takes a customization (the extension is open and not walled).

A kernel package, and any package while the customization door is walled off for the caller, keep engine.studio.pkg.readonlyHint. The generic item page keeps the read-only package banner for every type but an app (item 2): that page saves nothing on a read-only package. PageShell needed no change: its badge only shows the read-only reason for a type Studio does not customize.

Item 2 — an installed app links to its design mode. Under Studio's All metadata, an app of a read-only package now shows a banner (engine.edit.appDesignModeHint) with a link (engine.edit.appDesignModeOpen) in place of the read-only package banner. The link opens the app at its console address with the design-mode select arrival (designModeSelectArrival, type app), so the app opens with the mode on, and the address carries ?studio= back to the Studio page for the bar's close button. No link on a phone, for an app the console does not serve, or behind a walled customization door; those keep the read-only package banner. The lock banner (engine.edit.lockNoOverlay) is unchanged: the item itself is still not editable on this page. New module metadata-admin/AppDesignModeLink.tsx, because ResourceEditPage.tsx is over 1,000 lines.

Item 3 — translated labels beside the source text (partial). New module studio-design/translatedLabel.tsx reads the console's own resolver (useObjectLabel) with an empty fallback, the language from i18n.language, as the display-name hint does:

  • the Data pillar's object header draws the translated object label after the source label, its tooltip naming the language;
  • the field inspector says what readers see for the field's group (objects.OBJECT._sections.GROUP.label), under the Group select.

Not done in this PR, see Acceptance notes: picklist names, picklist option labels and picklist descriptions.

Shared files. DataPillar.tsx is also claimed by #39743 and the studio namespace en.ts / zh.ts by #39837; neither had merged when this opened. Edits there are local (one hook line and the header label in DataPillar, one ternary on the chip title; appended keys in en/zh). The later lander resolves any conflict.

Declared additions to the claimed file surface: metadata-admin/AppDesignModeLink.tsx and studio-design/translatedLabel.tsx (new modules, required by the 1,000-line rule), metadata-admin/inspectors/ObjectFieldInspector.tsx (item 3: the group hint, one import and one call), and the existing test harnesses StudioTopLeft-37456.test.tsx, StudioPackageOverview-37454.test.tsx and ObjectFieldInspector.labelTranslation-11782.test.tsx (new pins go into a component's existing harness as a top-level describe; the stale readonly-reason pins there are updated to the new reason).

Read first (by risk):

  1. ui/packages/app-shell/src/views/metadata-admin/AppDesignModeLink.tsx — the design-mode arrival for an app item: the mode enters, and no page takes an app selection, so the opening is held unused until the mode ends.
  2. ui/packages/app-shell/src/views/studio-design/StudioPackageSwitcher.tsx — the customizable verdict read from the package list (!p.kernel) and useCustomizeDoorWalled; until the list answers, the read-only reason stands.
  3. ui/packages/app-shell/src/views/studio-design/StudioPackageOverviewPage.tsx — the revert reason on a customizable package with no pair.

Tests

Red on base (b9be2514 source restored with git restore --source, tests from the branch): 16 failed, 77 passed across the five files; every positive pin red, every CONTROL green. Green on the branch: 5 files, 93 passed.

Readings
  • Red: pnpm exec vitest run --maxWorkers=2 on StudioTopLeft-37456, StudioPackageOverview-37454, ResourceEditPage.appDesignMode-39472, ObjectFieldInspector.labelTranslation-11782, DataPillar.translatedLabel-39472 → Test Files 5 failed (5) · Tests 16 failed | 77 passed (93) (os-verify-lock VERDICT command-exit 1).
  • Green, same five files → Test Files 5 passed (5) · Tests 93 passed (93) (VERDICT command-exit 0); the inspector harness again after its collection-time import → Tests 10 passed (10).
  • pnpm --filter @object-ui/app-shell type-check exit 0; pnpm --filter @object-ui/i18n type-check exit 0.
  • Previously-passing neighbours rerun on the change: StudioDesignSurface.readOnlyChipFold-12707, metadataAreaHost.gates-28561, ResourceEditPage.inspectorReadOnlyReason-29079, ResourceEditPage.lockBanner all green.

Acceptance notes

  • Item 3, picklists: not done here. The console resolves no picklist translation on the client: useObjectLabel has no picklists.NAME.label / .options.VALUE reader and its namespace probe does not look for picklists. The server translates a picklist on a /meta read (translatePicklist), which Studio's source reads do not take. Showing the translation beside picklist names and option labels needs a picklist resolver in @object-ui/i18n (outside this claim's file surface) or a translated second read; that choice is left to the seat. Picklist descriptions have no translation key in the spec at all (TranslationData.picklists holds label and options only), so a translated description cannot be shown anywhere yet.
  • The field inspector's display name already had its translation hint (LabelTranslationHint); this PR adds the group.
  • AutomationsPillar.tsx and PermissionMatrixEditor.tsx still show engine.studio.pkg.readonlyHint on a read-only package; they are outside this claim's surface.
  • Carry items from the release comment: L1-c's "installing over it" nit and the 重新安装 label for older installs both live in MarketplacePackagePage.tsx and the marketplace namespace, outside this claim's surface; not done here.
  • ESLint on the changed files: 3 errors, all in ResourceEditPage.tsx and all present on base (react-hooks "Cannot create components during render", same count on the base file); none in new code.

Verification

Two-minute check: open Studio on an installed package (HotCRM in the showcase), hover the lock beside the package name in the top-left switcher. Expected: "Read-only package — your changes are saved as this environment's customization of it, and the package itself stays as installed." Then Studio → All metadata → App → the package's app: expected a blue banner with "Open in design mode", which opens the app with the design-mode bar on.

Local gates at f53d136b (derived by node scripts/pm/dispatch-gates.mjs --commands): 40 families, all exit 0; --ran reconciliation "40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED (a DERIVED zero)". pnpm --dir ui run check:new-line-citations → 0 new citations.


Generated by Claude Code

…ion, links an app to design mode, shows translated labels

Claude-Session: https://claude.ai/code/session_01ADHkmPC9UyxNHfB2SRvzsr
Co-authored-by: Claude <noreply@anthropic.com>
…k and the translated labels

Claude-Session: https://claude.ai/code/session_01ADHkmPC9UyxNHfB2SRvzsr
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N

Contract-review-claim: session_01ADHkmRM92nyNXbcm2LJn1N · head f53d136 · 2026-12-06T18:47Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N

席位核对

ACCEPT · head f53d136b · read 2026-12-06T18:48Z

L1 of PR #39961 (Part of #39472, items 1–2 and the object/group half of item 3), read on the full diff at f53d136b54031ef97eba7ab367d1373d420ddc57. The TIER_DEFAULT declaration-face record for this head follows as its own comment.

  • Shape: item 1, the read-only reason says where an edit goes. The switcher reads the verdict from the package list (!p.kernel, door not walled), Overview from manifest.scope, the Data pillar chip from the open, unwalled extension; kernel packages and a walled door keep readonlyHint, and until the list answers the read-only reason stands. Item 2: an app of a read-only package gets the design-mode banner and link in place of the read-only banner (new AppDesignModeLink.tsx). Item 3: translatedLabel.tsx reads the console's own resolver with an empty fallback; the object header and the field group hint show the translation. New modules keep ResourceEditPage.tsx from growing.
  • Premise measured: the five pinned files 5/5, 93/93 green on this head (run from ui/). Own ablation, three cuts in one run (switcher openCustomizable forced false; useAppDesignModeTarget forced off; useTranslatedObjectLabel dropped) ⇒ 8 red | 85 green: the 5 switcher reason rows, both design-mode rows, the translated-header row. Restored, tree clean.
  • Rewritten pins (accepted): three #37687 rows in StudioTopLeft-37456.test.tsx now expect customizableHint. Their fixture is a listed, non-kernel package with the door open, which is exactly the case this card changes; the read-only reason stays pinned by the two new CONTROL rows (kernel package, walled door).
  • Gates: check-runs at this head 45 success · 0 failed · 0 pending.
  • Declaration: Clause-②: yes (widening), Metadata-protocol: none; four added keys in the published @object-ui/i18n studio namespace (en + zh), nothing removed or renamed. Changeset @object-ui/app-shell + @object-ui/i18n patch, matching AGENTS.md's non-protocol widening level.
  • Out of scope: picklist translations, AutomationsPillar / PermissionMatrixEditor still showing readonlyHint, and the marketplace carry items stay on Installed-package customization polish: Studio says "read-only" while it saves edits, English source labels in a zh-CN Studio, and reinstall wording #39472 (Part of; item 6 is also still open there). The zone records them on the card before landing. DataPillar.tsx: fix(plugin-view): Studio Records grid create names the record in a toast #39954 landed its fix in plugin-view and does not touch this file, so there is no conflict there; the studio en.ts / zh.ts overlap with Report type summary has two zh names: 汇总 in Studio, 现状分析 in the report builder #39837 goes to whichever PR lands later.
  • Nits (non-blocking): (1) engine.studio.shownTranslated fills {language} with the raw i18n.language code, so it reads Shown in zh-CN as “…”; a display name (Intl.DisplayNames) would read better, follow-up at the zone's choice. (2) The kernel test is written twice: the switcher reads p.kernel from packages-io and Overview re-reads manifest.scope === 'system' || 'cloud'. Same rule today; one shared predicate would keep them from drifting.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N

Contract review

Served-tier: TIER_DEFAULT
Head-sha: f53d136b54031ef97eba7ab367d1373d420ddc57
Local-runs: probe — the L1's run of the five pinned test files and the three-cut ablation at this head (same session)

① Derived judgments

  • The face is the Clause-②: yes (widening) declaration alone. There is no published spec schema in the diff and no governed path (all 15 files sit under ui/packages/app-shell/src/**, ui/packages/i18n/src/namespaces/studio/** and .changeset/**).
  • Published surface widened: four new keys in @object-ui/i18n's studio namespace (engine.studio.pkg.customizableHint, engine.studio.shownTranslated, engine.edit.appDesignModeHint, engine.edit.appDesignModeOpen), present in both en.ts and zh.ts. The catalogue type is Readonly<Record<string, string>>, so no typed key union or exported symbol changes. Nothing is removed, renamed or reworded among existing keys, so the change is additive only.
  • Metadata-protocol: none holds: nothing a metadata author writes changes; the new texts are console copy.

② Semver level

  • patch on @object-ui/i18n and @object-ui/app-shell. This is right for a non-protocol widening under AGENTS.md's Post-Task Checklist step 3 ("a non-protocol change, widening or breaking, ships patch"). There is no breaking arm, so no migration or ADR-0087 disposition is owed.

③ Boundary flags

Implemented-by: claude/issue-39472-studio-installed-pkg-copy
Reviewed-by: session_01ADHkmRM92nyNXbcm2LJn1N

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-steve · os-steve · session_01ADHkmPC9UyxNHfB2SRvzsr

Landing · 2026-12-06T18:54Z · zone ost-T · L1-a ACCEPT 7462824349 at f53d136b

Reading Result
check-governed-merges.mjs --pr 39961 NOT governed; 738 changed lines, under 3000
landing-k.mjs --pr 39961 can't answer: ui-only diff, no Test Core shard ran on the last green run, so no Affected-set diff base; the merge queue builds on current main
check runs at f53d136b all success or skipped; mergeable_state clean

Ready + auto-merge in this stroke. On MERGED: #39472 stays open (Part of); the zone keeps the claim for the remaining items listed on the card, and the item-3 picklist half waits on the maintainer.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 6, 2026 18:54
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge December 6, 2026 18:54
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 6, 2026
Merged via the queue into main with commit e15e96e Dec 6, 2026
61 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39472-studio-installed-pkg-copy branch December 6, 2026 19:17
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/l tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants