This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 2b10ca0
fix(types): collapse the redundant
* fix(types): collapse the redundant `UserActionsSchema` extension, correct its docblock (objectui#8992)
`objectql.zod.ts`'s `UserActionsSchema` carried
`stripImportedDefaults(Spec).extend({ group, hideFields, rowColor })`, an
extension that existed only because `@objectstack/spec` did not declare those
three keys while `normalizeListViewSchema` folded objectui's legacy `showGroup`
/ `showHideFields` / `showColor` onto them. The protocol adopted all three in
17.3.0, so the extension is now a second local copy of a protocol declaration
and it collapses into the plain by-reference re-export its own note said it
would become.
The urgent half is the docblock, which told its reader that
`UserActionsConfigSchema` "is NOT `.strict()`, so ... an author writing
`userActions: { group: false }` had it silently stripped — valid on parse, no
effect at render". Measured against the published artifacts of 17.0.0, 17.2.0,
17.3.0 and the resolved 17.4.0, every one of them refuses an undeclared key and
names it (`unrecognized_keys`, one issue). A comment promising silent tolerance
in front of a loud-rejection runtime points an author — human or AI — at a
config that will fail the save gate while telling them that outcome is
impossible.
The accept set does not move: extended and collapsed were parsed side by side
over a 33-document corpus with an identical result — same success, same parsed
output, same refusal codes, keys and messages — with a sentinel proving the
comparison can see a difference when one exists. The one published byte that
moves is the loss of three local `.describe()` strings the extension carried,
which the protocol declares those keys without.
`__tests__/user-actions-mirror-8992.test.ts` pins the refusal and the key-set
identity, with firing controls in both directions, so the corrected paragraph
cannot rot back. The `zod-mirror-parity.test.ts` exclusion survives — the TS
name is re-exported from the spec, not restated here — but its reason no longer
names an `.extend(…)` that is gone.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
* fix(types): grade the changeset `minor`, and correct two false claims in it (objectui#8992)
Contract review returned REWORK on the changeset prose and the declared bump. The
code — the docblock, the `.extend()` collapse, the new pin and the parity row — was
re-measured by the reviewer and found correct, and is untouched here. Only
`.changeset/8992-user-actions-collapse-and-docblock.md` moves.
1. `patch` -> `minor`. Re-derived rather than taken on the reviewer's word, and every
anchor found by content: `packages/types/CHANGELOG.md` records the IDENTICAL
operation on this same file — `ListColumnSchema`'s local `.extend()` collapsing into
a plain by-reference re-export — under `## 17.1.0` / `### Minor Changes`;
`.changeset/8317-strip-imported-defaults.md`, the boundary ruling this change
enrolls three more keys into, is `minor`; the sibling PR of this batch (objectui#8990)
declares `minor`; and AGENTS.md states objectui's own breaking changes ship as
`minor` with the break spelled out in the body. My own `tsc` probe, built from the
two declarations side by side, confirms the break is real and producer-side: a value
typed as the OLD output is not assignable to the NEW one (the three keys read as
missing), while the reverse direction compiles. The probe is not vacuous — injecting
a `@ts-expect-error` where nothing is wrong made the same run fail with TS2578, so
the file was genuinely in the program.
2. ⛔ CORRECTING THIS COMMIT'S PARENT. The previous commit message, the changeset and
the PR body all said the three keys lose their descriptions "which the protocol
declares those keys without". THAT IS FALSE, and it is corrected here rather than by
rewriting the parent (a force-push is not available to this branch). The protocol
describes all three — `group` reads "Allow users to change record grouping from the
toolbar. …" in the 17.3.0 and 17.4.0 tarballs. The real mechanism is objectui's own
import boundary: `stripImportedDefaults` unwraps each `ZodDefault` with
`.removeDefault()` and re-optionalises the inner node, and the description sits on
the outer node it discards. Measured on this object: all ten defaulted keys read
`description = undefined` after the strip, on both sides of the change, while
`buttons` — the only member that never carried a default — keeps its description
through it, which is the positive control. The OUTCOME sentence was right; the cause
was invented.
3. "the OTHER EIGHT keys have declared that all along" -> SEVEN of the other eight.
`buttons` is `z.ZodOptional[z.ZodArray[z.ZodString]]` and never declared a default.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
---------
Co-authored-by: Claude <noreply@anthropic.com>UserActionsSchema extension, correct its docblock (objectui#8992) (#9017)1 parent a4b723f commit 2b10ca0
4 files changed
Lines changed: 262 additions & 19 deletions
File tree
- .changeset
- packages/types/src
- __tests__
- zod
| 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 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3021 | 3021 | | |
3022 | 3022 | | |
3023 | 3023 | | |
3024 | | - | |
| 3024 | + | |
3025 | 3025 | | |
3026 | 3026 | | |
3027 | 3027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
594 | | - | |
| 593 | + | |
| 594 | + | |
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
605 | 601 | | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
610 | 628 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 629 | + | |
616 | 630 | | |
617 | 631 | | |
618 | 632 | | |
| |||
0 commit comments