Repository navigation
Commit 637cfc6
fix(studio): plainer authoring in Studio — option labels first, named rules, labelled fields, honest counts (#27830)
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgJ7T2SaogZw24tZ9auWbCH7)_
Part of #27521
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:Studio 第 24–39 行建议里能在 Studio 内直接改的 9
行落地:选项先填显示名并自动生成存储值、校验规则名随错误消息生成、条件字段按标签列出、流程节点卡显示对象标签、字段数分开计系统字段、“创建”按钮说明为何不可用、只读文本框变灰、发布提示去掉“原子”并引导去“权限”、无
Studio 权限时说明找谁开通(第 38 行,席位放宽文件面到 Console 调用点后补做)。
- 为什么改:浏览器走查发现这些地方要么说开发者术语,要么让作者卡住(例如只填了三个显示名,却提示“至少需要一个选项”)。
- 风险与回滚:只改 Studio 界面与中英文文案,不动元数据协议;已有选项改名时存储值不变,已有规则改消息时规则名不变。回滚即还原本 PR。
-
先看:`ObjectFieldInspector.tsx`(选项编辑器)、`ObjectValidationsPanel.tsx`(规则名生成)、`StudioDesignSurface.tsx`(字段数与发布提示)。
- 两分钟验证:`pnpm --dir ui exec vitest run
packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.optionLabelFirst-27521.test.tsx`,应
9 个用例全绿。
- 需要你做的:无,席位落地。
## What changes
Studio rows 24–39 of #27521, re-measured on `main` at `e5cce096` (code
reading plus jsdom pins; no browser pass in this run). Each row is taken
here with a pin, handed to the seat as a card, or answered as already
done or will not do.
| Row | Bucket | What, or why not |
|---|---|---|
| 24 | Card #27833 | The New Package dialog's English help is
`ManifestSchema`'s own `.describe()` by design (`package-schema.ts`,
"Help text"), and the landing's overlay wording is pinned by
`BuilderLanding.environmentOverlayCopy-12171`. A name-only first step is
a dialog redesign plus a wording producer in `packages/spec`. |
| 25 | Taken | Options read Label first; a new option's value is filled
in from its label until typed, so labelled options are written and the
"needs at least one option" hint clears. An authored option's value
never moves. The kind picker shows only on the field the record path
follows (`detectStatusField`) or where an option already declares a
kind. Pin: `ObjectFieldInspector.optionLabelFirst-27521`. |
| 26 | Taken | The Validations condition builder lists fields by label
with the CEL spelling beside it (opt-in `labelSubjects`, so the flow
mounts keep their spellings), under "Pick a field". A new rule's API
name follows its message until edited; an authored name never moves.
Type, severity, name and guard labels in plain words. Pins:
`ConditionBuilder.subjectLabels-27521`,
`ObjectValidationsPanel.ruleNameFromMessage-27521`. |
| 27 | Card #27834 (suggestion half) | Suggestion half only (defect half
is #27799): a "Triggering record" target, the object pre-filled from the
trigger, field pickers for keys. A feature in the Update Records node
editor. |
| 28 | Taken (wording) + Card #27835 (naming) | "Atomic" is gone from
the publish title, toast and confirm note (`en`, `zh`); the confirm note
still says all go live or none do. Carrier check: #27356 row 17 landed
in #27432 for flow nodes only. Naming other types' changes in words (a
view, a validation rule by its label, keys as words) is a card. |
| 29 | Will not do | Toast placement is console-wide (`ConsoleToaster`:
top-centre by objectui#13340, bottom-right refused by objectui#7482). |
| 30 | Taken (node cards) + will not do (header) | Node cards name the
object by its catalog label (the host's one `useObjectCatalog` read).
Pin: `FlowCanvas.objectLabel-27521`. The flow header's one-row
truncation with the whole text on hover is designed (objectui#13135).
The Interfaces rail row was not measured in a browser (see notes). |
| 31 | Card #27836 | "Add view" with a type choice in the Interfaces
list-view inspector. |
| 32 | Taken | The object header counts the fields the canvas shows and
the platform's columns apart ("2 fields (+8 system)"); "1 field" is
singular there and on each form section. Pin: appended case in
`DataPillar.hiddenSystemFields-11780`. |
| 33 | Taken | Add field's Create stays focusable when it cannot run,
`aria-disabled`, described by the missing step. Pin:
`AddFieldPopover.createReason-27521`. |
| 34 | Taken (text areas) + already done (Publish) | Disabled plain text
areas in the object, field, flow-node and variable inspectors wear the
primitive's disabled look. Pin:
`ObjectDefaultInspector.readOnlyLook-27521`. Publish's reason on a
read-only package is already there (the tooltip wrapper of
objectui#12303). The number inputs read are the shared `Input`
primitive, which already greys out. |
| 35 | Taken | A publish that put an app or object live says members
need a permission set and offers "Open Access". Pin: appended cases in
`StudioDesignSurface.publishCount-11807`. |
| 36 | Card #27837 | Formula editor: a field picker, plain parser
errors, and the error line under the footer (the footer is not overlaid
in `InspectorShell`, so the overlap needs a browser read). |
| 37 | Will not do | Studio declares phones unsupported ("Studio is
built for a desktop screen"); below 1024 px the pillar names ride the
accessible name and tooltip by design (objectui#12725). |
| 38 | Taken | The refusal names who grants Studio access (an
administrator, in Setup → Permission Sets): `en` and `zh` packs, the
Console's inline `defaultValue` in `StudioRoute.tsx` (the call-site gate
ties it to `en`, objectui#3810) and the route test's `NOTICE`, together.
The seat widened the file surface to the Console call site for this row.
Pin: `studioAccessGrantor-27521`. |
| 39 | Card #27838 | Node help is the engine's descriptor text
(`useFlowNodePalette` adopts `description`), so the producer is
`service-automation` / `plugin-approvals`; #27838 carries it with #27356
row 15's words half. |
## Tests
New pins: the seven files named above. Existing tests that read the old
copy or behaviour were moved with it: the rule-type labels, the derived
rule names, the guard group's name, the "N fields" load signal ("1
field" now), the publish toast's Access action, the confirm note's
sentence and its `en` claim marker.
<details><summary>Readings</summary>
- Row 38 on `8170cb82`: `studioAccessGrantor-27521`,
`StudioRoute.test.tsx`, `StudioRoute.accessNotice-12035`: 43/43; `pnpm
--dir ui exec vitest run scripts/`: 169 files passed.
- `pnpm --filter @object-ui/app-shell type-check` on the tree of
`eb92b33e` (under the verify lock, with the object-label pin's test):
VERDICT command-exit 0.
- `vitest run` over `studio-design/`, `metadata-admin/inspectors/`,
`metadata-admin/previews/`, `preview/`, `i18n/src/__tests__/` and
`StudioRoute.accessNotice-12035`: first run 755 files, 38 tests red,
every one a pin of the old copy or behaviour; after moving them, the 25
affected files plus the new pins: 265/265 green; the last two pins 4/4.
</details>
## Acceptance notes
- **Line budget**: 358 changed lines (added plus removed) of source,
copy and changeset, 788 of tests, over the card's ~600 guideline on the
test side. Most of the test lines are the new pins; the rows left out
are listed above, not cut for size.
- **Cards filed from this pass**: #27833 (row 24), #27834 (row 27
suggestion half), #27835 (row 28 naming), #27836 (row 31), #27837 (row
36), #27838 (row 39, with #27356 row 15). Row 29 is answered
will-not-do.
- **Not measured in a browser** this run: the Interfaces rail's
`field_service_work_order....` row (the rail reads the target's label,
else its name; a draft-only object's label may be missing there) and row
36's footer overlap.
- **Other packs**: `preview.changes.confirmNote` and
`console.studio.accessRequired` changed in all ten packs; all ten carry
both sentences (`check:i18n-drift`).
- `docs/qa/platform-checklist/areas/studio-authoring.json` still quotes
the old "(one atomic release)" toast; it is outside this card's file
surface and is left as is.
## Verification
Gates derived by `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`: 34 derived, 34 run, all exit 0 (`--ran`
reconciliation: 0 NOT-MEASURED, 0 UNRUN). The per-gate lines are in the
report comment on #27521.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Utp6CbkBiXQKn2AfkfK8tM)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7f80732 commit 637cfc6
52 files changed
Lines changed: 1065 additions & 185 deletions
File tree
- .changeset
- ui
- apps/console/src/components
- packages
- app-shell/src
- preview
- __tests__
- views
- metadata-admin
- inspectors
- previews
- studio-design
- i18n/src
- __tests__
- locales
- namespaces/studio
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | | - | |
| 1672 | + | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
823 | | - | |
| 823 | + | |
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
| |||
906 | 906 | | |
907 | 907 | | |
908 | 908 | | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
909 | 914 | | |
910 | 915 | | |
911 | 916 | | |
| |||
921 | 926 | | |
922 | 927 | | |
923 | 928 | | |
| 929 | + | |
924 | 930 | | |
925 | 931 | | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
930 | 936 | | |
931 | 937 | | |
932 | 938 | | |
933 | 939 | | |
934 | 940 | | |
935 | | - | |
936 | | - | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
937 | 948 | | |
938 | 949 | | |
939 | | - | |
| 950 | + | |
940 | 951 | | |
941 | | - | |
| 952 | + | |
942 | 953 | | |
943 | 954 | | |
944 | | - | |
945 | 955 | | |
946 | 956 | | |
947 | 957 | | |
| |||
1145 | 1155 | | |
1146 | 1156 | | |
1147 | 1157 | | |
1148 | | - | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
1149 | 1164 | | |
1150 | 1165 | | |
1151 | 1166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
865 | | - | |
| 865 | + | |
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
0 commit comments