Repository navigation
feat(ui): five Studio pillars, the data source pages and the field types move into the studio i18n namespace (#25922 slice S4) - #26900
Merged
Conversation
…pes move into the studio namespace (slice S4)
The engine.studio.{access,if,data,auto,settings} rows, the data source
pages' engine.datasource / engine.externalDatasource /
engine.datasourcePreview rows and the field types' engine.fieldType /
engine.fieldTypeDesc / engine.fieldCategory rows (549 keys in en and in
zh) leave app-shell's designer table for @object-ui/i18n's lazy studio
namespace, text unchanged. lookupString already asks the table first and
the namespace second, so no call site changes.
Claude-Session: https://claude.ai/code/session_01JQwxbX9LnJhjTQPJEmoBYi
Co-authored-by: Claude <noreply@anthropic.com>
…ed, zh preloads The pin gains a floor for each of the eleven S4 families. Seven dom suites and one unit suite that read moved S4 zh rows synchronously make the zh catalogue resident first; the sweep ran every app-shell test naming zh with the zh loader delayed 4000 ms, and each unit-project test alone. AddFieldPopover's lazy-namespace test takes engine.studio.cancel as its table key now that engine.studio.data.addField moved, and block-config-i18n holds its 3,000-key floor over both homes together. Claude-Session: https://claude.ai/code/session_01JQwxbX9LnJhjTQPJEmoBYi Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
维护者速读
席位核对ACCEPT · seat
Generated by Claude Code |
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Warren · project thread
Part of #25922
Clause-②: no
Metadata-protocol: none
维护者速读
engine.studio的 access、if、data、auto、settings 五个支柱,加上数据源三族(engine.datasource/externalDatasource/datasourcePreview)和字段类型三族(engine.fieldType/fieldTypeDesc/fieldCategory),共 en、zh 各 549 键,从 app-shell 私有表搬进@object-ui/i18n的studio命名空间,文案一字未改,调用点不动。engine.studio.rules按席位改单留给 S5。ui/packages/i18n/src/namespaces/studio/en.ts末尾的 S4 段,再看钉测试新增的 11 个家族下限。cd ui && pnpm run check:i18n-designer-parity && pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/inspectorStrings.studioNamespace-25922.test.ts,应全绿。What changes
Slice S4 of the (M) item. These rows leave
ENGINE_STRINGS_EN/ENGINE_STRINGS_ZHinui/packages/app-shell/src/views/metadata-admin/i18n.tsand are appended toSTUDIO_EN/STUDIO_ZHinui/packages/i18n/src/namespaces/studio/{en,zh}.ts, text byte-for-byte unchanged:engine.studio.access.*engine.studio.if.*engine.studio.data.*engine.studio.auto.*engine.studio.settings.*engine.datasource.*engine.externalDatasource.*engine.datasourcePreview.*engine.fieldType.*engine.fieldTypeDesc.*engine.fieldCategory.*enandzh; none zh-only)The five pillars are the seat's amended scope.
engine.studio.rules.*is deferred to S5, because Studio Data › Validations: new state_machine / format / json_schema rules save immediately withfield: created_atand an empty message (an empty transition row persists and publishes); the conditional rule'swhenis captioned as a fail condition #26731 adds arulesrow. The "about 500 key lines of otherengine.*" are the data source pages and the field types: 225 keys per language, 450 key lines. I picked them because, when I read the open PRs' patches to both homes, no open PR touched these families. The open PRs that do touch those two files (feat(spec,ui)!: a record opens one way per object — navigation.mode keeps drawer (the default), page, new_window and none; modal, split and popover are retired; the split pane becomes a reader preference #26804, fix(app-shell): editing an action in Studio no longer stops the object from saving #26827, feat(spec,rest,cli): a doc book's title and section titles are translatable —books.<name>in the translation bundle #26819, feat(spec): a hook declares its refusal catalogue, and its body refuses by code, answered in the caller's language #26831) hold onlyengine.studio.{inspector,held,refusal},engine.inspector.*andengine.translationPreview.*. Stopping at 450 also keeps the PR under the 3,000-line threshold.Same AST pass as S2 and S3; a heading comment marks the S4 section in each catalogue.
No runtime change.
lookupStringalready asks the table first and the namespace second, sot/tFormat/tOptionaland every call site are untouched. No new source file, so the console chunk groups need no change.Readers. Every non-test reader of the moved families is in app-shell under
views/metadata-admin/orviews/studio-design/, so all are Studio surfaces. None callst()at module scope:flowPresets.tsandfield-types.tshold keys, not strings. Dynamic keys (engine.fieldType.${…},engine.fieldTypeDesc.${…},engine.fieldCategory.${…}) all go throught(). No stop-and-report.Changeset:
.changeset/25922-studio-i18n-pillars-datasources.md,@object-ui/i18npatch.⛔ Untouched:
ui/packages/i18n/src/locales/*.ts,ui/.github/**, rootci.yml,engine.studio.{rules,inspector,held,refusal},engine.inspector.*,engine.translationPreview.*.Why
Ruling 6431032267 Q2 = A (upheld by 6431234244): the designer table becomes one lazy
@object-ui/i18nnamespace, moved in slices.Tests
inspectors/inspectorStrings.studioNamespace-25922.test.tsgains a floor for each of the eleven S4 families. For each family,t()must answer every key with the namespace value inen-US,zh-CNandde-DE.zhresident with a top-levelawait loadStudioCatalogue('zh'). No assertion changed:datasource/DatasourceResourcePage.locale-13460,previews/adminPreviews.i18n-10862-s2,previews/externalDatasourcePanel.i18n-10862-s3,previews/federationTabs.i18n-10862-s4,studio-design/ObjectFormDesigner.typeName-13148,studio-design/StudioDesignSurface.emptyPackage,studio-design/StudioDesignSurface.railLabels.metadata-admin/studioAutomationCopy.plainLanguage-11659.test.ts. It runs in theunitproject (isolate: false), so it passed in the full run only because an earlier file had already loadedzh. Run alone, it failed.studio-design/AddFieldPopover.studioNamespace-25922.test.tsx(slice 1) usedengine.studio.data.addFieldas "a key still in the app-shell table". That key moved, so the test now usesengine.studio.cancel, which the same popover renders and which stays in the table.previews/__tests__/block-config-i18n.test.tsfloored the app-shell table at 1,500 keys. The table now holds 1,152, so the 3,000-key floor applies to both homes together, and the table only has to be non-empty.The sweep, and the S3 leftovers
Every app-shell test that names zh was run with
namespaces/studio/index.ts'szhloader delayed 4000 ms, usingscripts/ablation-replace.mjsand restored byte-identical. That is 403 files (the S3 list plus every other app-shell test naming zh). Each of the 52 unit-project files was also run alone under the delay.i18n/src/__tests__/studio-namespace-lazy.test.tsx. It fails by construction, because itsfindByTextwaits 1 s and the delay is 4 s.mainwithout the S4 move, 3 files go red under the delay:PackageFormDialog.validationTiming,ResourceEditPage.discardDraftLabel-12690andResourceEditPage.environmentOverlay-12141. All three are S3 rows. The S3 sweep had no delay, so these racers passed locally. The seat routed their preloads to fix(app-shell): hold a new state_machine / format / json_schema validation rule until it has a field and a message #26855 and fix(app-shell): an edit a Studio pillar holds unsent guards departure like a dirty pillar #26839, so this PR leaves them alone. Until those land, they can show red here.Acceptance notes
e9e344a9.t()andtOptional()on this branch afterzhis resident:en-US,en,de-DEandfragainst the baseenvalue, andzh-CN,zhandzh-TWagainst the basezhvalue.HEAD):?? studioString(key, locale)arm removed fromlookupString, 23 tests go red: the pin'st()case for all 21 families, its zh-only case, and the equivalence check. The equivalence check reports 3,843 of 3,843 lookups differing.engine.datasource.title), the equivalence check reports exactly 3 differing lookups (zh-CN,zh,zh-TW). The pin stays green, as designed.Build & E2E UImeasures it.Verification
All at the tree of
7c7bbb87.Tests and gates
Test Files 11 passed (11),Tests 211 passed (211).pnpm --filter @object-ui/i18n --filter @object-ui/app-shell run type-check: VERDICT command-exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 34 commands, and each exited 0, includingpnpm --dir ui exec vitest run scripts/(Test Files 178 passed | 2 skipped (180)).--ranshows 34 derived, 34 run and 0 NOT-MEASURED. These gates ran with two more test files in the diff than7c7bbb87has: the S3-leftover preloads, which I later handed to fix(app-shell): an edit a Studio pillar holds unsent guards departure like a dirty pillar #26839. Re-deriving on the final diff gives the same 34 commands.check:i18n-designer-parity,check:i18n-dead-keys,check:i18n-drift(0envalues changed) andcheck:i18n-keys: all exit 0.check:new-line-citations: exit 0.node scripts/check-nul-bytes.mjs: exit 0.Human Minimum
packages/specchange.pnpm lintis CI's.main, one pull request.Generated by Claude Code