Repository navigation
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
Conversation
…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>
Claude-Session: https://claude.ai/code/session_01ADHkmPC9UyxNHfB2SRvzsr Co-authored-by: Claude <noreply@anthropic.com>
…udio-installed-pkg-copy
…nslation pins Claude-Session: https://claude.ai/code/session_01ADHkmPC9UyxNHfB2SRvzsr Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N Contract-review-claim: session_01ADHkmRM92nyNXbcm2LJn1N · head f53d136 · 2026-12-06T18:47Z |
|
repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N 席位核对ACCEPT · head L1 of PR #39961 (Part of #39472, items 1–2 and the object/group half of item 3), read on the full diff at
|
|
repo:objectstack@os-steve · os-steve · session_01ADHkmRM92nyNXbcm2LJn1N Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-steve · os-steve · session_01ADHkmPC9UyxNHfB2SRvzsr Landing · 2026-12-06T18:54Z · zone ost-T · L1-a ACCEPT 7462824349 at
Ready + auto-merge in this stroke. On MERGED: #39472 stays open ( |
Part of #39472
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
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: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, typeapp), 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 modulemetadata-admin/AppDesignModeLink.tsx, becauseResourceEditPage.tsxis over 1,000 lines.Item 3 — translated labels beside the source text (partial). New module
studio-design/translatedLabel.tsxreads the console's own resolver (useObjectLabel) with an empty fallback, the language fromi18n.language, as the display-name hint does: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.tsxis also claimed by #39743 and the studio namespaceen.ts/zh.tsby #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.tsxandstudio-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 harnessesStudioTopLeft-37456.test.tsx,StudioPackageOverview-37454.test.tsxandObjectFieldInspector.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):
ui/packages/app-shell/src/views/metadata-admin/AppDesignModeLink.tsx— the design-mode arrival for anappitem: the mode enters, and no page takes anappselection, so the opening is held unused until the mode ends.ui/packages/app-shell/src/views/studio-design/StudioPackageSwitcher.tsx— the customizable verdict read from the package list (!p.kernel) anduseCustomizeDoorWalled; until the list answers, the read-only reason stands.ui/packages/app-shell/src/views/studio-design/StudioPackageOverviewPage.tsx— the revert reason on a customizable package with no pair.Tests
Red on base (
b9be2514source restored withgit 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
pnpm exec vitest run --maxWorkers=2onStudioTopLeft-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).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-checkexit 0;pnpm --filter @object-ui/i18n type-checkexit 0.StudioDesignSurface.readOnlyChipFold-12707,metadataAreaHost.gates-28561,ResourceEditPage.inspectorReadOnlyReason-29079,ResourceEditPage.lockBannerall green.Acceptance notes
useObjectLabelhas nopicklists.NAME.label/.options.VALUEreader and its namespace probe does not look forpicklists. The server translates a picklist on a/metaread (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.picklistsholdslabelandoptionsonly), so a translated description cannot be shown anywhere yet.LabelTranslationHint); this PR adds the group.AutomationsPillar.tsxandPermissionMatrixEditor.tsxstill showengine.studio.pkg.readonlyHinton a read-only package; they are outside this claim's surface.MarketplacePackagePage.tsxand themarketplacenamespace, outside this claim's surface; not done here.ResourceEditPage.tsxand 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 bynode scripts/pm/dispatch-gates.mjs --commands): 40 families, all exit 0;--ranreconciliation "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