This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Repository navigation
Commit d21bd08
refactor(app-shell): Studio's object settings panel picks with the shared Select (objectui#11865) (#11995)
Part of #11865
Clause-②: no
The object settings slice of objectui#11865 (claim 6064876007): the five
browser-native select elements on Studio's object Settings tab become
the shared Radix `Select`. The card stays open for the other native
selects. The earlier slices are objectui#11934 (the Group panel),
objectui#11976 (the validation editor) and objectui#11990 (*Explain
access*).
## What changed
- `packages/app-shell/src/views/studio-design/ObjectSettingsPanel.tsx`:
one module-private `SettingsPicker`, drawn with the shared `Select` from
`@object-ui/components`, renders all five pickers: the internal sharing
model, the external sharing model, the name field, the lifecycle field,
and the highlight fields' "+ Add field…". It follows the validation
editor's `RulePicker`. Items carry their option's index, so the options
whose value is `''` ("not set", "auto-derived", "auto-detect", "+ Add
field…") need no empty `SelectItem`. A stored value that none of the
options carries gets an item of its own. Each caller turns the picked
value into the same patch as before: the mapping expressions are the
native `onChange` bodies, with the event's value replaced by the picked
value.
- Each labelled picker stays inside its wrapping label element, which
names the trigger as it named the native control. The "+ Add field…"
picker had no label and still has none. The two OWD triggers keep their
test ids (`owd-internal-select`, `owd-external-select`); the other three
gain `name-field-select`, `stage-field-select` and
`highlight-add-select`.
- Untouched: the Basics inspector, the capability checkboxes, the
highlight chips and their remove buttons, the descriptions under the OWD
dials, the props and the exports. No i18n key is added: the panel's set
of `engine.*` keys is identical to the base's (diffed).
- `ObjectSettingsPanel.sharedSelect-11865.test.tsx` (new), 35 tests.
- `ObjectSettingsPanel.test.tsx`: the five OWD-dial cases that drove the
native control (option list, pick, clear, external default, external
clear) now open and pick through the trigger, and check the same things.
- `StudioDesignSurface.servedDraftTakenAsIs-10765.test.tsx`: its Data
pillar case read the dial's `value`. The trigger is a button, whose
`value` is `''` whatever the dial holds, so that assertion would have
passed vacuously. It now reads the trigger's text: the unset label is
shown and the published `private` label is not.
- `.changeset/11865-object-settings-shared-select.md`:
`@object-ui/app-shell: patch`.
## Hypotheses
- **H1, value parity: held.** A scratch probe (uncommitted, deleted)
fired a `change` event on every option of each native select on base
`0bbb67b9a` and recorded the patch. The new suite's 24-row table pins
every option of every picker against those literals, compared as JSON
text, with the keys that hold `undefined` named:
- each "not set", "auto-derived" and "auto-detect" option writes its key
holding `undefined`;
- "None" writes `stageField: false`;
- a field writes its name, and an added highlight is appended to the
list;
- "+ Add field…" writes nothing.
A table-coverage test pins each picker's listed options in order.
Caveat: the probe's `change` event fired for the current option too, so
the re-pick rows (no write) pin the primitive, not a browser reading of
the native control.
- **H2, labels, keyboard and read-only: held.** The probe read each
native select's accessible name on base. On head each trigger computes
the same name: the four label texts, and `''` for the "+ Add field…"
picker on both. Enter opens a picker, and Enter on an option selects it.
The panel has a read-only state: `disabled`, which `StudioDesignSurface`
passes from its read-only flag. In it, the four triggers are disabled,
wear the primitive's own `disabled:` classes, and do not open. The "+
Add field…" picker is not drawn, as on base.
- **H3, a stored value outside the options: held.** Each of these is
shown in the trigger: a name field naming a missing field, a lifecycle
field naming a field that is not a select field, and sharing models
neither dial offers (`full`, `read_write`). The native control showed
its first option there. The missing name field is listed first, and
re-picking it writes nothing.
- **H4, first-load bytes: byte-neutral locally.** On `e02c4c116`:
`apps/console` `vite build` plus `node
scripts/check-eager-closure-budget.mjs`, on head and on the same tree
with the panel at its base blob (landing and restore proven by hash).
- Both legs print `Console eager closure is 3311.2 KB gzipped across 337
of 2459 chunks (budget: 3312.0 KB, headroom: 0.8 KB).`
- `eagerGzipBytes` is 3390714 on both legs, and `eagerRawBytes` is
equal. The only eager entry that differs is the entry chunk's file-name
hash; its bytes are identical.
- The panel ships in the lazy `studioBuilder` chunk on both legs.
The budget bot's reading on this PR is the authority.
## Reverse leg
With the implementation committed, the panel was written from its base
blob (its hash equals the base blob: 5 native select elements, 0
`SettingsPicker`). Then the new suite, `ObjectSettingsPanel.test.tsx`
and the served-draft suite ran: `Tests 41 failed | 11 passed (52)`.
- Red: all 35 new pins, the five rewritten OWD-dial cases, and the
served-draft Data pillar case.
- Green: the eight untouched cases of `ObjectSettingsPanel.test.tsx` and
the served-draft suite's three other cases.
That is the direction the suite header predicts. The restore, `git
checkout HEAD --` under a trap, is proven: the hash equals the HEAD
blob, and `git diff HEAD` is 0 bytes.
## Gates (on `e02c4c116`)
- The seven suites that mount the real panel, repo-root `pnpm exec
vitest run`: `Test Files 7 passed (7)`, `Tests 61 passed (61)`.
`DataPillar.hiddenSystemFields-11780.test.tsx` stubs the panel and is
not among them.
- `column-identity.ratchet` and `one-authority-per-exported-name-6273`:
`Test Files 2 passed (2)`, `Tests 18 passed (18)`.
- `pnpm --filter @object-ui/app-shell type-check`, after the app-shell
dependency closure build: exit 0. By `--listFilesOnly`, the panel is in
the main program, and the panel and the three touched suites are in the
test program.
- `pnpm exec eslint` on the four touched `.tsx` files: exit 0, 0 errors,
0 warnings.
- `check-changeset-presence`, `check-changeset-no-major`,
`check:new-line-citations` (0 new) and `check:control-bytes`: exit 0.
- Also exit 0: the changeset fixed, overwrite and claims gates,
`pending-changeset-literals`, `test-path-roots`, the three vi-mock
gates, `phantom-deps`, `unreferenced-sources`, `i18n-keys`,
`i18n-designer-parity`, `i18n-drift`, `metadata-write-doors`,
`esm-specifiers`, `self-import`, lint coverage, type-check coverage,
`handler-key-reads` and `designer-field-key-parity`.
`component-surface-parity` and `i18n-dead-keys` also exit 0; both are
report-only.
- Declared to CI: the full `pnpm test` farm and repo-wide `pnpm lint`.
## Acceptance notes
- The "+ Add field…" picker has no accessible name, on base and on head:
it has no label, and this slice keeps each control's name as it was.
Naming it, for example by the "Highlight fields" caption, is not in this
slice. Noted, not filed.
- The name-field and "+ Add field…" lists hold every field of the
object, so they can be long. They use `Select`, as the claim directs and
as the earlier slices measured. `Select` jumps to an option by its typed
leading letters.
- Browser: not measured in this slice. Keyboard and read-only behaviour
are pinned in the test DOM only.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01MgfduSkFrfM3eorB3UGfAU)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1b8388b commit d21bd08
5 files changed
Lines changed: 484 additions & 91 deletions
File tree
- .changeset
- packages/app-shell/src/views/studio-design
| 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 | + | |
| 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 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
28 | | - | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
34 | | - | |
| 44 | + | |
35 | 45 | | |
36 | 46 | | |
37 | 47 | | |
| |||
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
75 | | - | |
| 85 | + | |
76 | 86 | | |
77 | | - | |
78 | | - | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
82 | | - | |
| 91 | + | |
83 | 92 | | |
84 | | - | |
85 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
86 | 97 | | |
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
91 | | - | |
| 102 | + | |
92 | 103 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
96 | 110 | | |
97 | 111 | | |
98 | 112 | | |
99 | | - | |
| 113 | + | |
100 | 114 | | |
101 | | - | |
102 | | - | |
103 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
104 | 119 | | |
105 | 120 | | |
106 | 121 | | |
| |||
0 commit comments