Skip to content

Commit 38c4c2b

Browse files
committed
chore(spec): declare KanbanConfigParsed and move the ADR-0122 pin count
The applied default on `KanbanConfigSchema.limit` gives that schema a second shape, which is the event `type-alias-convention.pin.test.ts` exists to catch: its `Iso829` pin leaves, `KanbanConfigParsed` is declared beside the bare alias as ADR-0122 prescribes, and the pin count plus both prose statements of it move 785 -> 784. Also carries the regenerated authorable-surface and authorable-defaults rows the three new keys add. Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent a20fde1 commit 38c4c2b

4 files changed

Lines changed: 28 additions & 4 deletions

File tree

‎packages/spec/authorable-defaults/ui.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"ui/FormView:type = \"simple\"",
4949
"ui/GalleryConfig:cardSize = \"medium\"",
5050
"ui/GalleryConfig:coverFit = \"cover\"",
51+
"ui/GalleryConfig:limit = 100",
5152
"ui/GlobalFilter:scope = \"dashboard\"",
5253
"ui/GroupNavItem:expanded = false",
5354
"ui/GroupingField:collapsed = false",
@@ -56,6 +57,7 @@
5657
"ui/InlineAction:refreshAfter = false",
5758
"ui/InlineAction:type = \"script\"",
5859
"ui/JoinedReportBlock:type = \"tabular\"",
60+
"ui/KanbanConfig:limit = 100",
5961
"ui/ListChartConfig:chartType = \"bar\"",
6062
"ui/ListView:type = \"grid\"",
6163
"ui/NavigationConfig:mode = \"page\"",
@@ -104,6 +106,7 @@
104106
"ui/SelectionConfig:type = \"none\"",
105107
"ui/SharingConfig:allowAnonymous = false",
106108
"ui/SharingConfig:enabled = false",
109+
"ui/TimelineConfig:limit = 100",
107110
"ui/TimelineConfig:scale = \"week\"",
108111
"ui/UrlNavItem:target = \"_self\"",
109112
"ui/UserActionsConfig:addRecordForm = false",

‎packages/spec/authorable-surface/ui.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@
486486
"ui/GalleryConfig:cardSize",
487487
"ui/GalleryConfig:coverField",
488488
"ui/GalleryConfig:coverFit",
489+
"ui/GalleryConfig:limit",
489490
"ui/GalleryConfig:titleField",
490491
"ui/GalleryConfig:visibleFields",
491492
"ui/GanttConfig:assigneeField",
@@ -595,6 +596,7 @@
595596
"ui/JoinedReportBlock:values",
596597
"ui/KanbanConfig:columns",
597598
"ui/KanbanConfig:groupByField",
599+
"ui/KanbanConfig:limit",
598600
"ui/KanbanConfig:summarizeField",
599601
"ui/KanbanConfig:titleField",
600602
"ui/ListChartConfig:chartType",
@@ -1151,6 +1153,7 @@
11511153
"ui/TimelineConfig:colorField",
11521154
"ui/TimelineConfig:endDateField",
11531155
"ui/TimelineConfig:groupByField",
1156+
"ui/TimelineConfig:limit",
11541157
"ui/TimelineConfig:scale",
11551158
"ui/TimelineConfig:startDateField",
11561159
"ui/TimelineConfig:titleField",

‎packages/spec/src/type-alias-convention.pin.test.ts‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ import type * as M187 from './shared/duration.zod.js';
275275
import type * as M188 from './ai/build-progress.zod.js';
276276

277277
// ---------------------------------------------------------------------------
278-
// 785 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
278+
// 784 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
279279
//
280280
// That number is machine-checked, not hand-kept. The runtime companion at the
281281
// bottom of this file recomputes the pin count from the source and asserts that
@@ -1599,7 +1599,12 @@ export type Iso823 = Assert<Eq< z.input< typeof M164.ReportType >, z.infer< type
15991599
export type Iso826 = Assert<Eq< z.input< typeof M167.CalendarConfigSchema >, z.infer< typeof M167.CalendarConfigSchema > >>;
16001600
export type Iso827 = Assert<Eq< z.input< typeof M167.GanttConfigSchema >, z.infer< typeof M167.GanttConfigSchema > >>;
16011601
export type Iso828 = Assert<Eq< z.input< typeof M167.GanttQuickFilterSchema >, z.infer< typeof M167.GanttQuickFilterSchema > >>;
1602-
export type Iso829 = Assert<Eq< z.input< typeof M167.KanbanConfigSchema >, z.infer< typeof M167.KanbanConfigSchema > >>;
1602+
// (Iso829 `KanbanConfigSchema` left this list in #17393: the author-settable
1603+
// row ceiling `limit` APPLIES its default, which is exactly the "a nested field
1604+
// gains a `.default()`" event this file exists to catch — so the schema now has
1605+
// two shapes and `KanbanConfigParsed` is declared beside the bare alias, as
1606+
// ADR-0122 prescribes. Its two page-shaped siblings needed no line moved: both
1607+
// already carried defaults and therefore both halves of the pair.)
16031608
export type Iso851 = Assert<Eq< z.input< typeof M167.ListMapConfigSchema >, z.infer< typeof M167.ListMapConfigSchema > >>;
16041609
export type Iso830 = Assert<Eq< z.input< typeof M167.NavigationModeSchema >, z.infer< typeof M167.NavigationModeSchema > >>;
16051610
export type Iso831 = Assert<Eq< z.input< typeof M167.TreeConfigSchema >, z.infer< typeof M167.TreeConfigSchema > >>;
@@ -1678,7 +1683,7 @@ describe('ADR-0122 type-alias convention', () => {
16781683
// this title and the section header above the pin list — are now asserted
16791684
// against the recomputed count below, so neither can go stale without a red
16801685
// test naming it.
1681-
it('still declares all 785 isomorphic pins', () => {
1686+
it('still declares all 784 isomorphic pins', () => {
16821687
// The truth of each pin is proved by tsc, not here — an `Assert<Eq<...>>`
16831688
// that stops holding is a compile error with the alias named. What tsc
16841689
// cannot notice is a pin that was DELETED: removing the assertion removes
@@ -2252,7 +2257,18 @@ describe('ADR-0122 type-alias convention', () => {
22522257
// Note the number is the same 783 -> 785 the DURATION block above records,
22532258
// arrived at from the same 783 after #16059's retirement took it back down.
22542259
// The two entries are different movements that share a pair of endpoints.
2255-
expect(pins).toHaveLength(785);
2260+
// 785 -> 784 is #17393's author-settable row ceiling on the page-shaped
2261+
// view configs (ui/view.zod.ts, module slot M167): `KanbanConfigSchema`
2262+
// gained a `limit` member whose default is APPLIED, which is the "a nested
2263+
// field gains a `.default()`" event at the top of this file, one level in.
2264+
// Author state and parsed state part company, so the pin left and
2265+
// `KanbanConfigParsed` is declared beside the bare alias. Its two siblings
2266+
// in that card moved no line: `GalleryConfig` and `TimelineConfig` already
2267+
// carried defaults (`coverFit` / `cardSize`, `scale`) and therefore already
2268+
// carried both halves of the pair — which is also why only ONE of the three
2269+
// was ever on this list. -1 converted to an `XParsed` pair; the Iso number
2270+
// stays vacant (ids are claims about pins, not positions).
2271+
expect(pins).toHaveLength(784);
22562272

22572273
// The count is stated in PROSE twice as well — this case's title and the
22582274
// section header above the pin list — and until #6605 nothing read either

‎packages/spec/src/ui/view.zod.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5933,6 +5933,8 @@ export type CalendarConfig = z.input<typeof CalendarConfigSchema>;
59335933
export type GanttConfig = z.input<typeof GanttConfigSchema>;
59345934
export type GanttQuickFilter = z.input<typeof GanttQuickFilterSchema>;
59355935
export type KanbanConfig = z.input<typeof KanbanConfigSchema>;
5936+
/** Post-parse shape of {@link KanbanConfig} — defaults applied, transforms run (ADR-0122). */
5937+
export type KanbanConfigParsed = z.infer<typeof KanbanConfigSchema>;
59365938
export type ListMapConfig = z.input<typeof ListMapConfigSchema>;
59375939
export type NavigationMode = z.input<typeof NavigationModeSchema>;
59385940
export type TreeConfig = z.input<typeof TreeConfigSchema>;

0 commit comments

Comments
 (0)