|
20 | 20 | * subpath and invisible from the root, with nothing to say whether that was a |
21 | 21 | * decision or an oversight. |
22 | 22 | * |
23 | | - * It has now been found twice, one name at a time: |
| 23 | + * It has now been found three times, one card at a time: |
24 | 24 | * |
25 | 25 | * - objectui#7697 -- `ComboboxOption`. `import type { ComboboxOption } from |
26 | 26 | * '@object-ui/types'` read `TS2305` while its two siblings on the same list |
|
29 | 29 | * the zod barrel by objectui#9067 and still unnamed on this one. Repaired |
30 | 30 | * the same way, by the director seat's decision batch #133 item 2, letter |
31 | 31 | * (a), maintainer 2026-09-14. |
| 32 | + * - objectui#9526 -- `CommandItem` and `CommandGroup`, the element types of |
| 33 | + * `CommandSchema.groups` and its `items`. THIS pin found them on its first |
| 34 | + * run and ledgered them `ABSENT_PENDING_DECISION`, because objectui#9406 |
| 35 | + * authorised exactly two names; objectui#9526 moved both onto the list by |
| 36 | + * the same additive route and emptied that ledger. |
32 | 37 | * |
33 | 38 | * ⭐ What made the second one worse than "the name is not there" is the |
34 | 39 | * compiler's guess: the root spelling answered `error TS2724: '"@object-ui/ |
@@ -84,6 +89,17 @@ import type { UiCalendarSchema as UiCalendarFromForm } from '../form'; |
84 | 89 | import type { InputSchema as InputFromRoot } from '../index'; |
85 | 90 | import type { CalendarSchema as CalendarFromRoot } from '../index'; |
86 | 91 |
|
| 92 | +// objectui#9526 -- the element types of `CommandSchema.groups` and its `items`. |
| 93 | +// RED on the base that card measured: `TS2305` on each root spelling below, |
| 94 | +// while the `/form` spellings and the control resolve in the same pass. |
| 95 | +import type { CommandItem as CommandItemFromRoot } from '../index'; |
| 96 | +import type { CommandGroup as CommandGroupFromRoot } from '../index'; |
| 97 | +import type { CommandItem as CommandItemFromForm } from '../form'; |
| 98 | +import type { CommandGroup as CommandGroupFromForm } from '../form'; |
| 99 | +// The control: the schema that CONTAINS them, already on the root barrel's |
| 100 | +// list before objectui#9526. If it fails to resolve, the block is dark. |
| 101 | +import type { CommandSchema as CommandFromRoot } from '../index'; |
| 102 | + |
87 | 103 | const require = createRequire(import.meta.url); |
88 | 104 |
|
89 | 105 | const readSource = (relative: string): string => readFileSync(require.resolve(relative), 'utf8'); |
@@ -197,22 +213,10 @@ const ABSENT_BY_DECISION: Readonly<Record<string, string>> = {}; |
197 | 213 | * "nobody has decided yet", and it is the honest answer for a name a card found |
198 | 214 | * but was not authorised to move. |
199 | 215 | */ |
200 | | -const ABSENT_PENDING_DECISION: Readonly<Record<string, string>> = { |
201 | | - CommandItem: |
202 | | - 'An element type of `CommandSchema.groups[].items` (`CommandGroup` is the other). Found by ' |
203 | | - + 'this pin at objectui#9406 and NOT covered by its ruling, which names `InputShorthandSchema` ' |
204 | | - + 'and `UiCalendarSchema` and says "additive, no other line moves" -- so moving these two as ' |
205 | | - + 'well would be widening a published surface past the decision that authorised it. The shape ' |
206 | | - + 'is objectui#7697 exactly (an option/item element type reachable only through the `/form` ' |
207 | | - + 'subpath while its schema `CommandSchema` sits on the root list), and that card ruled the ' |
208 | | - + 'repair sound for `ComboboxOption` -- but it ruled it for that name. Reported for filing ' |
209 | | - + 'with the objectui#9406 report; whoever takes it owns BOTH rows, since one card should ' |
210 | | - + 'settle a pair that is declared and consumed together.', |
211 | | - CommandGroup: |
212 | | - 'The element type of `CommandSchema.groups`, holding `CommandItem[]`. The same finding, the ' |
213 | | - + 'same card, the same reason -- see the `CommandItem` row above. Ledgered rather than ' |
214 | | - + 'repaired because objectui#9406 authorises exactly two names.', |
215 | | -}; |
| 216 | +const ABSENT_PENDING_DECISION: Readonly<Record<string, string>> = {}; |
| 217 | +// Empty since objectui#9526: its two rows, `CommandItem` and `CommandGroup`, |
| 218 | +// were settled by putting both names on the barrel list, so the liveness check |
| 219 | +// below would have failed them as stale. |
216 | 220 |
|
217 | 221 | const LEDGER: Readonly<Record<string, string>> = { ...ABSENT_BY_DECISION, ...ABSENT_PENDING_DECISION }; |
218 | 222 |
|
@@ -295,6 +299,30 @@ describe('objectui#9406 -- the two names resolve from the root barrel', () => { |
295 | 299 | }); |
296 | 300 | }); |
297 | 301 |
|
| 302 | +describe('objectui#9526 -- the element types of `CommandSchema` resolve from the root barrel', () => { |
| 303 | + it('each root spelling is the element type the root `CommandSchema` actually contains', () => { |
| 304 | + // Pinned as the CONTAINMENT, not as a member list: `groups` holds |
| 305 | + // `CommandGroup`, and `CommandGroup.items` holds `CommandItem`. That is the |
| 306 | + // whole reason the card moved the pair together. |
| 307 | + const group: Eq<NonNullable<CommandFromRoot['groups']>[number], CommandGroupFromRoot> = true; |
| 308 | + const item: Eq<CommandGroupFromRoot['items'][number], CommandItemFromRoot> = true; |
| 309 | + expect([group, item]).toEqual([true, true]); |
| 310 | + }); |
| 311 | + |
| 312 | + it('each root spelling is the SAME declaration as its `/form` spelling', () => { |
| 313 | + // The same reason as the objectui#9406 block above: a barrel line naming |
| 314 | + // a different type would satisfy the containment reading only by accident. |
| 315 | + const item: Eq<CommandItemFromRoot, CommandItemFromForm> = true; |
| 316 | + const group: Eq<CommandGroupFromRoot, CommandGroupFromForm> = true; |
| 317 | + expect([item, group]).toEqual([true, true]); |
| 318 | + }); |
| 319 | + |
| 320 | + it('CONTROL -- the schema that contains them already resolved from the root', () => { |
| 321 | + const command: Eq<CommandFromRoot['type'], 'command'> = true; |
| 322 | + expect(command).toBe(true); |
| 323 | + }); |
| 324 | +}); |
| 325 | + |
298 | 326 | /* == (b) the instrument: the barrel list against `form.ts`'s exports ========= */ |
299 | 327 |
|
300 | 328 | describe('objectui#9406 -- the root barrel mirrors `form.ts`, or says why not', () => { |
|
0 commit comments