Skip to content

Commit bbc9dc3

Browse files
os-teslaclaude
andauthored
feat(types): name InputShorthandSchema and UiCalendarSchema on the root barrel (objectui#9406) (#9525)
Fixes #9406 Implements decision batch #133 item 2, letter (a) (maintainer 2026-09-14, recorded on the card). Nothing here is a judgement call of this branch's: the ruling names the file, the act, the bump level and the pin. ## The exact published delta Two names join **one** list: the root barrel `packages/types/src/index.ts`, on its existing `export type { ... } from './form.js';` clause, from the module `packages/types/src/form.ts`. | name | declared in | was on `@object-ui/types/form` | was on `@object-ui/types/zod` | root `@object-ui/types` | |---|---|---|---|---| | `InputShorthandSchema` | `form.ts` | yes | yes (objectui#9067 / PR #9405) | **added here** | | `UiCalendarSchema` | `form.ts` | yes | yes (objectui#9067 / PR #9405) | **added here** | **No other export moves.** Measured on the published artifact rather than asserted: `packages/types` was built at the branch point and at this head, and `dist/index.d.ts` differs by exactly one line, which differs by exactly these two names inserted between `CalendarSchema,` and `FieldValidationRules,`. Nothing else in that file changed, in either direction. The dispatch cautioned that this package's emit is not byte-reproducible (measured on PR objectui#9517), so the comparison carries a **same-source control**: two consecutive clean builds of byte-identical source, compared before any normalisation. For `dist/index.d.ts` on this tree they came back **byte-identical** (raw differing lines 0, sorted differing lines 0), so the delta above is a reading and not emit noise. Reported as measured: the instability that card saw on another emitted file did not appear on this one, which the control establishes rather than assumes. The source diff is **one additive hunk**, 16 insertions and 0 deletions on `index.ts` — two names and the comment that says why they are there. The comment does not reach the published artifact (the emitted clause is one comma-joined line), so the published surface change is exactly the two names. ## Why it mattered more than a missing name From the root entry point the compiler did not merely fail, it **suggested a different component**. Reproduced live on this branch by removing the two lines again and running the package's own `tsc -p tsconfig.test.json`: ``` error TS2724: '"../index"' has no exported member named 'InputShorthandSchema'. Did you mean 'InputOTPSchema'? error TS2724: '"../index"' has no exported member named 'UiCalendarSchema'. Did you mean 'CalendarSchema'? ``` `ui:calendar` and `calendar` resolve to different renderers, and `InputOTPSchema` is not an input at all. An author who accepts the suggestion writes an import that compiles and means something else. ## The pin derives the gap; it does not assert a pair `packages/types/src/__tests__/form-barrel-mirror-9406.test.ts`. On every run it reads `form.ts`'s own export list and the root barrel's `./form.js` re-export list, and the verdict is the **set difference** — so the declaration that lands in `form.ts` next month and is forgotten fails it. A pin asserting "these two names are present" would have passed that day, which is this class reopening a third time. - Names deliberately left off carry a **ledger row with the reason** (`ABSENT_BY_DECISION`), names nobody has ruled on carry one saying so (`ABSENT_PENDING_DECISION`) — the two-ledger shape `arm-named-export-8784.test.ts` settled for the zod barrel. - **Rows cannot rot:** a row whose name `form.ts` no longer declares, or which has since reached the barrel, fails the file and asks to be deleted. - Both populations carry controls, so a dark instrument fails instead of passing: exactly one `./form.js` clause, the barrel list is a subset of what the module declares, the four names the card measured all read non-zero, and a star re-export from either module under the pin fails rather than silently shortening the denominator. - `SemanticElementSchema` / `HtmlElementSchema` are recorded as the ruling asked, with the reason and the ruling that made them so (objectui#9067, decision batch #121 item 5), and **checked** — they are declared in `layout.ts`, not `form.ts`, so they sit outside this pin's population by construction, and the block fails the day either reaches the root barrel. They are not added here. ## One finding, ledgered and reported rather than repaired Running the derived pin over this list surfaced two more names in the same state: **`CommandItem` and `CommandGroup`** (the element types of `CommandSchema.groups` and of its `items`), reachable only through the `/form` subpath while `CommandSchema` sits on the root list. That is objectui#7697's shape exactly. The ruling authorises exactly two names and says "additive, no other line moves", so they are ledgered as **undecided** with the reason and handed to the dispatching seat for their own card. This PR does not move them. ⚠️ A related correction to the filing card's framing, from the disk at this branch point: the card reads "re-exports 28 of the 30 interfaces `src/form.ts` exports", which conflates two populations. `form.ts` exports 30 interfaces plus 2 type aliases; the barrel's list carried 28 names, of which 26 are interfaces. So the gap was **four** names, not two — the two this ruling names, plus the pair above. The card's own two-zero reading is confirmed unchanged: both names read 0 on the barrel while `CalendarSchema` and `InputSchema` read non-zero in the same pass. ## Checks run before pushing | check | how | result | |---|---|---| | the new pin | `pnpm exec vitest run packages/types/src/__tests__/form-barrel-mirror-9406.test.ts` | 16 passed | | the pin, with the change removed | same command, `index.ts` taken back to the branch point | 1 failed, naming both missing names | | the type-level leg, with the change removed | `tsc -p tsconfig.test.json` | exit 2, the two TS2724 lines quoted above | | package type-check | `pnpm --filter @object-ui/types run type-check` (all three `tsc` legs) | exit 0 | | package suite | `pnpm exec vitest run packages/types/` | 190 files, 4345 tests passed | | package lint | `pnpm --filter @object-ui/types run lint` | exit 0, 0 errors | | changeset declaration | `check-changeset-presence.mjs`, `pnpm changeset:check`, `pnpm check:changeset-claims` | exit 0 | | line citations | `pnpm check:new-line-citations` | exit 0 | | control bytes | `pnpm check:control-bytes` and a direct sweep of the diff | exit 0, no hits | Both ablation legs restored from `HEAD` and verified by blob hash against the `HEAD` blob, with `git diff HEAD` empty afterwards. Repository-scale runs (`Lint`, `Type Check`, the test shards, `Build & E2E`, `Build Docs`) are CI's. ## Changeset `.changeset/9406-types-root-barrel-two-names.md`, **`minor`** on `@object-ui/types` — the level the ruling sets, on the ground that this is a published surface gaining two names, not on the size of the diff. ## For the Clause-2 contract review The reviewed surface is one clause in one file. The published delta is the two names in the table above and nothing else, established against the built `dist/index.d.ts` with a same-source control. Both names were already published on two other entry points of this same package, so the third is aligned rather than widened; both subpaths are untouched and every previously published name is still published. Draft, not enqueued, no auto-merge, no labels written by this branch. --- _Generated by [Claude Code](https://claude.ai/code/session_011QreXiyMEqKLN4U5daMPVa)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5b673b8 commit bbc9dc3

3 files changed

Lines changed: 459 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
"@object-ui/types": minor
3+
---
4+
5+
`InputShorthandSchema` and `UiCalendarSchema` are now named exports of `@object-ui/types`
6+
itself, not only of `@object-ui/types/form` and `@object-ui/types/zod` (objectui#9406).
7+
8+
Before this release, `import type { UiCalendarSchema } from '@object-ui/types'` read
9+
`TS2724` while `CalendarSchema` — its neighbour on the very same re-export list — resolved
10+
in the same compilation pass. The failure was not merely "the name is not there": the
11+
compiler answered with a suggestion naming a DIFFERENT component (`CalendarSchema` for
12+
`UiCalendarSchema`, `InputOTPSchema` for `InputShorthandSchema`), and `ui:calendar` and
13+
`calendar` resolve to different renderers. An author who takes the suggestion writes an
14+
import that compiles and means something else, which is worse than one that fails.
15+
16+
The change is purely additive — two names join the root barrel's existing named re-export
17+
list from `./form.js`, nothing is removed, renamed or narrowed, and both subpaths keep
18+
working. Both names were already published on two other entry points of this same package,
19+
so this aligns the third rather than widening the surface; it is the route objectui#7697
20+
took for `ComboboxOption`, on the same list, for the same shape.
21+
22+
`form-barrel-mirror-9406.test.ts` keeps it closed, and it is DERIVED rather than a pair of
23+
presence assertions: it reads `form.ts`'s export list and the root barrel's `./form.js`
24+
re-export list on every run and names whatever is in the first and not the second. A pin
25+
asserting "these two names are present" would pass on the day the next declaration lands in
26+
`form.ts` and is forgotten, which is this class reopening a third time. Names deliberately
27+
left off the list get a ledger row carrying the reason instead, and a row goes red once its
28+
name reaches the barrel or stops being declared.
29+
30+
Running that pin against this list surfaced two more names in the same state,
31+
`CommandItem` and `CommandGroup` — the element types of `CommandSchema.groups` and of its
32+
`items`, reachable only through the `/form` subpath while `CommandSchema` sits on the root
33+
list. objectui#9406's ruling authorises exactly two names, so they are ledgered as
34+
undecided rather than moved, and reported for their own card.

0 commit comments

Comments
 (0)