Repository navigation
Commit a29ae2d
fix(plugin-form,types): resolve
* feat(plugin-form,types): resolve `form.sections[].group` through the single field-group assembler
The view-level half of objectstack#13855 (objectui#7051); the `record:details`
half shipped as objectui#8497.
`@objectstack/spec` 17.3.0 declares two ways for a `form.sections[]` entry to
give itself members: enumerate `fields`, or point `group` at one of the object's
declared `fieldGroups`. No form-section renderer read `group`, and the omission
was not a no-op — measured on `origin/main`:
simple threw `Cannot read properties of undefined
(reading 'map')` out of SimpleObjectForm's own
body, ABOVE the JSX it returns, and blanked the
whole form (siblings included)
tabbed/split/drawer/modal silently rendered nothing, no diagnostic
wizard an empty step
`ObjectForm` now resolves the reference once, above its routing fork, so all six
layouts inherit it. Resolution runs through `deriveFieldGroupLayout` (ADR-0085
§5) via this package's existing single adapter — the same code path the
no-sections field-group fallback uses — so a group authored by reference and one
derived by the fallback are the same section by construction. No assembly rule
is re-implemented on this side.
The object definition is fetched only when a section actually authors `group`.
Unresolvable references render nothing and are reported once; a group-owned key
restated beside `group` is ignored (no override semantics) and reported; `group`
on a wizard step is refused and reported. All three are shapes the spec door
refuses at parse, so they reach the renderer only from programmatic SDUI
callers — the door itself is pinned rather than assumed.
`ObjectFormSection` gains `group` and makes `fields` optional, so the spec-legal
shape compiles for a TypeScript author; the shared adapter now carries the
group's `description` and `visibleWhen` onto the derived section.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
* test(plugin-form): pin the memberless-section containment layer separately (objectui#7051)
With `group` resolved above the section loop, every group leg stays green with
the tolerant `?? []` read reverted — the guard was unpinned by anything else.
This leg is the only one that fails then.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
* test(plugin-form): reference the SECOND declared group in the layout rows (objectui#7051)
Measured, not predicted: with the first group these rows stayed GREEN under the
constant-resolution caricature, because the first group is exactly what that
caricature returns. A leg a caricature satisfies by accident tests nothing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
* fix(scripts): re-key two doc-example ledger rows this branch shifted
`UNGATED_EXAMPLES` in `scripts/check-doc-example-types.mjs` is keyed by
`path:line symbol`, where the line is the position of the `@example` JSDoc
tag. Two rows on this branch named lines that no longer hold their tag, so
`scripts/__tests__/check-doc-example-types.test.ts` reddened on
"every row names a block that is actually in the compiled tier".
Both blocks still exist and are still in the compiled tier; only their
position moved, and both example bodies are byte-identical to the
merge-base, so each row's recorded diagnostic codes and written reason
stay accurate:
ObjectForm.tsx 122 -> 123 (one added import above the JSDoc)
objectql.ts 1572 -> 1604 (schema additions above the JSDoc)
`origin/main` carries both tags at their original lines, so this branch is
the sole cause; no merge from `main` is required. The line-number keying
that makes an unrelated PR edit a CI gate script is objectui#8614.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
---------
Co-authored-by: Claude <noreply@anthropic.com>form.sections[].group through the single field-group assembler, and bound the section loop that blanked the form (#8644)1 parent de1af55 commit a29ae2d
10 files changed
Lines changed: 984 additions & 20 deletions
File tree
- .changeset
- apps/console/src/__tests__
- packages
- plugin-form/src
- __tests__
- types/src
- __tests__
- scripts
| 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 | + | |
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
304 | 303 | | |
305 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
306 | 316 | | |
307 | 317 | | |
308 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
137 | 138 | | |
138 | 139 | | |
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 | + | |
140 | 178 | | |
141 | 179 | | |
142 | 180 | | |
| |||
168 | 206 | | |
169 | 207 | | |
170 | 208 | | |
171 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
172 | 225 | | |
173 | 226 | | |
174 | 227 | | |
| |||
181 | 234 | | |
182 | 235 | | |
183 | 236 | | |
184 | | - | |
| 237 | + | |
185 | 238 | | |
186 | 239 | | |
187 | 240 | | |
188 | 241 | | |
189 | 242 | | |
190 | 243 | | |
191 | | - | |
192 | | - | |
| 244 | + | |
| 245 | + | |
193 | 246 | | |
194 | 247 | | |
195 | 248 | | |
| |||
277 | 330 | | |
278 | 331 | | |
279 | 332 | | |
280 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
281 | 343 | | |
282 | 344 | | |
283 | 345 | | |
| |||
348 | 410 | | |
349 | 411 | | |
350 | 412 | | |
351 | | - | |
| 413 | + | |
| 414 | + | |
352 | 415 | | |
353 | 416 | | |
354 | 417 | | |
| |||
375 | 438 | | |
376 | 439 | | |
377 | 440 | | |
378 | | - | |
| 441 | + | |
| 442 | + | |
379 | 443 | | |
380 | 444 | | |
381 | 445 | | |
| |||
410 | 474 | | |
411 | 475 | | |
412 | 476 | | |
413 | | - | |
| 477 | + | |
| 478 | + | |
414 | 479 | | |
415 | 480 | | |
416 | 481 | | |
| |||
445 | 510 | | |
446 | 511 | | |
447 | 512 | | |
448 | | - | |
| 513 | + | |
| 514 | + | |
449 | 515 | | |
450 | 516 | | |
451 | 517 | | |
| |||
1269 | 1335 | | |
1270 | 1336 | | |
1271 | 1337 | | |
1272 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1273 | 1350 | | |
1274 | 1351 | | |
1275 | 1352 | | |
| |||
0 commit comments