Skip to content

Commit d8a9cc5

Browse files
refactor(plugin-calendar,plugin-gantt)!: retire the flat fallback read; the calendar and gantt renderers read the block only (#27026)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBFijSMgUXzsRVhP3BchJpt1)_ Part of #25923 Clause-②: no (narrowing) Metadata-protocol: none Skills-docs: none — skills/objectstack-ui/rules/list-views.md:290-301 and skills/objectui/guides/page-builder.md:291-305 already teach the block only ## 维护者速读 - 改了什么:日历和甘特图组件只从 `calendar` / `gantt` 配置块读取字段绑定,不再读取写在节点顶层的平铺字段;规范里两条拒收提示同步改掉了“渲染器仍会读取平铺写法”这半句。 - 为什么改:平铺写法早已被规范拒收、类型包也不再声明,两个视图生产者都只写配置块;对全部可达元数据的普查没有找到一行平铺存储,留着这条读取只是第二种方言(#12)。 - 风险与回滚:直接挂载 `ObjectGantt` / `ObjectCalendar` 组件并写平铺字段的宿主会看到“需要配置”提示而不是图表;回滚即还原本 PR,无存储数据迁移。 - 先看:`ui/packages/plugin-gantt/src/ObjectGantt.tsx`(`getGanttConfig` 与 `warnOnFlatGanttKeys`)、`ui/packages/plugin-calendar/src/ObjectCalendar.tsx`(`getCalendarConfig`)、`packages/spec/src/ui/component.zod.ts`(两条拒收提示)。 - 两分钟验证:`cd ui && pnpm exec vitest run packages/plugin-gantt/src/ObjectGantt.blockPrecedence.test.tsx packages/plugin-calendar/src/ObjectCalendar.unconfiguredRefusal-7029.test.tsx`,预期全绿:平铺节点被拒并提示配置块,配置块节点正常绘制。 - 需要你做的:无,席位落地 ## What changes - `@object-ui/plugin-calendar`: `getCalendarConfig` reads the `calendar` block only. A node that writes `startDateField` / `endDateField` / `titleField` / `colorField` / `allDayField` flat with no block reaches the "Calendar configuration required" screen, whose hint names the `calendar` block. The package-local `ObjectCalendarFlatFields` and `ObjectCalendarHandoff` types are removed; `ObjectCalendarProps['schema']` is the published `ObjectCalendarSchema`. - `@object-ui/plugin-gantt`: `getGanttConfig` reads the `gantt` block only. Flat `GanttConfig` keys with no block reach "Gantt configuration required", which now names the `gantt` block. The dev warning `warnOnFlatGanttKeys` names every flat key the chart did not read, with or without a block beside it. The legacy singular `dependencyField` is read nowhere. `ObjectGanttFlatFields` is replaced by `ObjectGanttSearchFields`, which carries only the `search` / `searchableFields` pair that `ListView` writes at runtime. - `@objectstack/spec`: only the false clause of the `object-calendar` and `object-gantt` flat-key refusal texts is rewritten (they said the renderer still reads the flat spelling). The prescription itself, write the keys in the block, is unchanged. - The three comment polishes from 6437594464: the dated #25923 notes in `calendar-flat-color-allday-8466.test.ts` merged and its read-census rows inverted; `objectql.ts` gantt block note; the `objectql.zod.ts` binding bullet and view-level arms note. - Renderer and mirror tests that mounted a flat node now write the block; the tests that pin the refusal keep a flat node on purpose. - READMEs of both plugins and the gantt demo moved to the block. ## Tests - New and inverted pins: a flat calendar node and a flat gantt node are each REFUSED with a hint naming the block (`ObjectCalendar.unconfiguredRefusal-7029`, `ObjectGantt.blockPrecedence`), with a CONTROL that the same keys moved into the block draw. `ganttHandoff-25923.test.ts` (renamed from `ganttHandoffFlatFields-25923`) pins that the hand-off type carries only the search pair and that a flat `startDateField` is a compile error. `ObjectGantt.dependencyAlias` pins the singular alias as not read when written flat and refused by name inside the block. - Census before and after (TS AST + JSON + YAML walk over 19,856 files, 14 parse failures, all JSONC tsconfigs): flat calendar nodes 12 to 7, flat gantt nodes 23 to 9; every remaining site is a test that pins the refusal or a type-level mirror pin. Zero sites in examples, apps, the console's shipped metadata, ui/examples, seeds, platform-objects or fixtures, before and after. ## Acceptance notes - `packages/spec/src/kernel/functional-completeness.ts` and `packages/spec/liveness/view.json` are in the amended surface but were not edited: their calendar/gantt rows are dated readings pinned at objectui `b9814b334`, and no sentence in them becomes false with this change. - No reference doc or refusal-text snapshot carries the old wording; the only other copy is the earlier `.changeset/25923-calendar-gantt-flat-keys-handoff.md`, left as written. - `@object-ui/types`, `@object-ui/plugin-list` and `@object-ui/plugin-view` carry a `patch` entry. Their code changes are only comments and tests (in `@object-ui/types`), or none at all, but the item-1 changeset compiles into their changelogs too. So the Supersedes paragraph has to land beside it there as well. - Both plugin entries are graded `patch`: `Metadata-protocol: none` takes patch under ruling A. The BREAKING banner and the ADR-0087 marker stay. - The item-1 changeset `25923-calendar-gantt-flat-keys-handoff.md` says the renderers still read the flat spelling. This PR does not edit it, because `check-empty-changeset` refuses a change to a changeset the merge base already carries. This PR's own changeset instead names the sentences it supersedes, in the same release. - Unreachable for the census: hotcrm, tenant `sys_metadata` rows, cloud. - Out of this PR, per the order: the `FormField` index signature, the `immutable` render-or-refuse follow-up, work item 2, and the list `options` bag (PR 2 closes the spec door with an ADR-0087 fold; PR 3 deletes the objectui readers). ## Verification <details><summary>ui tests (os-verify-lock)</summary> - calendar + gantt + consumer set: `Test Files 818 passed | 3 skipped (821)` · `Tests 18599 passed | 211 skipped` · VERDICT command-exit 0 - wider registry-reaching set: `Test Files 75 passed (75)` · `Tests 1693 passed | 12 skipped` · VERDICT command-exit 0 - five nodes moved after the after-census: `Test Files 5 passed (5)` · `Tests 111 passed` · exit 0 - plugin-gantt rerun after the `Reflect.get` fix: `Test Files 101 passed | 1 skipped (102)` · `Tests 768 passed | 114 skipped` · exit 0 </details> <details><summary>type-check and spec tests</summary> - `pnpm --filter @object-ui/types --filter @object-ui/plugin-calendar --filter @object-ui/plugin-gantt --filter @object-ui/plugin-list --filter @object-ui/app-shell run type-check` (each runs `tsc --noEmit` and `tsc -p tsconfig.test.json`): VERDICT command-exit 0 - `pnpm --filter @objectstack/spec test`: `Test Files 738 passed (738)` · `Tests 22130 passed | 1 todo` · exit 0 </details> <details><summary>dispatch gates</summary> - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`: 84 commands, each run with its exit code recorded. - `--ran`: 84 derived, 83 run, 1 NOT-MEASURED, 0 UNRUN. All 83 measured exit 0. - NOT-MEASURED: `pnpm check:dual-build-cjs-loads` exit 3 (prerequisite: a full `pnpm build`; no package it judges is in this diff). CI runs it. - `node scripts/check-platform-checklist.mjs --changed-from origin/main`: OK, exit 0. </details> <details><summary>review rounds (heads 25a73f4, 0226b9c)</summary> - Lint UI: `ObjectCalendar.tsx` imported `ObjectCalendarBlockConfig`, which only the removed hand-off types used; the import is dropped. `pnpm --filter` lint over types, plugin-calendar, plugin-gantt, plugin-list, app-shell and console: 0 errors, exit 0. - `check-changeset-no-major.mjs --base origin/main` with this PR body as the event: exit 0 (exit 1 on 6001470, the `minor` grades). `check-adr-0087-registration`, `check-empty-changeset`, `check:changeset-fixed`, `check:changeset-gate-self-tests`, `check:nul-bytes`: exit 0. - 0226b9c adds the three packages at `patch`. The same changeset checks all exit 0 again. - plugin-calendar tests `Test Files 64 passed (64)` · `Tests 458 passed | 95 skipped`, then plugin-calendar type-check: VERDICT command-exit 0. </details> <details><summary>dogfood battery</summary> Head `6001470dc`, closure `pnpm --filter '@objectstack/dogfood^...' build` (exit 0), then `pnpm --filter @objectstack/dogfood test` under the lock: VERDICT command-exit 1 · `Test Files 1 failed | 343 passed | 3 skipped (347)` · `Tests 2 failed | 2782 passed | 20 skipped (2804)`. The two failures are both in `test/packaged-action-disabled-dispatch-live.dogfood.test.ts` (#26572): acceptance[0] read the showcase task's `done` as true before the disabled action ran, and acceptance[5]/[2] found a row id where it expected none. That file passes alone on the same head (`Test Files 1 passed (1)`, `Tests 8 passed (8)`, exit 0). This diff touches no server, action or showcase package. It is the known flake #26952: the test picks an unordered `showcase_task?$top=1` and fails when that seed task is already done, and it is red on main too. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzevL8Q6rTfGz2XHXGT)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 58d4ee6 commit d8a9cc5

44 files changed

Lines changed: 701 additions & 831 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
'@object-ui/plugin-calendar': patch
3+
'@object-ui/plugin-gantt': patch
4+
'@objectstack/spec': patch
5+
'@object-ui/types': patch
6+
'@object-ui/plugin-list': patch
7+
'@object-ui/plugin-view': patch
8+
---
9+
10+
refactor(plugin-calendar,plugin-gantt)!: the calendar and gantt renderers read their binding from the `calendar` / `gantt` block only; the flat fallback read is retired (#25923)
11+
12+
Clause-②: no (narrowing)
13+
Metadata-protocol: none
14+
15+
<!-- adr-0087: not-required (no-migration-prescription) No `@objectstack/spec` key, accepted value, stored row or stored shape moves. The spec's `ComponentPropsMap['object-calendar']` and `['object-gantt']` rows already refuse every flat key this change stops reading, `@object-ui/types` stopped declaring them in the earlier slice of #25923, and both producers in the console (`ListView` and `ObjectView`) already write the block, so no metadata the spec accepts reaches the retired read. A stored-row census over every metadata source this repository reaches (examples, apps, the console's shipped metadata, seeds, fixtures, platform-objects) found no stored view or node that writes the binding flat, so `objectstack migrate meta` has nothing to rewrite. What narrows is the drawing outcome for a host that mounts `ObjectCalendar` or `ObjectGantt` directly with a flat node: it now reaches the refusal screen. The `@objectstack/spec` half is prose only: the two refusals no longer say the renderer still reads the flat spelling. The other categories are closed on facts: the packages publish (not unpublished); no ADR-0087 id covers this change (not registered or already-registered); the narrowed type members are package-local hand-off types that neither package's entry exports (not type-surface-only or runtime-export-retired). -->
16+
17+
`ObjectCalendar` and `ObjectGantt` kept a second, flat reading of their field binding for a host that mounts them directly with the keys written on the node. The spec refuses those keys on the node, `@object-ui/types` no longer declares them, and no producer writes them, so that read was a second dialect nothing should reach. It is retired.
18+
19+
- **`@object-ui/plugin-calendar`**: `getCalendarConfig` reads the `calendar` block only. A node that writes `startDateField`, `endDateField`, `titleField`, `colorField` or `allDayField` flat, with no block, shows the "Calendar configuration required" screen, whose hint names the `calendar` block. The package-local `ObjectCalendarFlatFields` and `ObjectCalendarHandoff` types are gone, and `ObjectCalendarProps['schema']` is the published `ObjectCalendarSchema`.
20+
- **`@object-ui/plugin-gantt`**: `getGanttConfig` reads the `gantt` block only. A node that writes its `GanttConfig` keys flat, with no block, shows the "Gantt configuration required" screen, which now names the `gantt` block, and in development a warning names every flat key the chart did not read, with or without a block beside it. The legacy singular `dependencyField` is read nowhere (the spec spells it `dependenciesField`, inside the block). The package-local `ObjectGanttFlatFields` type is gone; `ObjectGanttProps['schema']` keeps the two search keys `ListView` writes at runtime, now on `ObjectGanttSearchFields`.
21+
- **`@objectstack/spec`**: the `object-calendar` and `object-gantt` flat-key refusals no longer say the renderer still reads the flat spelling. The prescription is unchanged: write the keys in the `calendar` / `gantt` block.
22+
23+
**Supersedes, in the same release:** `25923-calendar-gantt-flat-keys-handoff.md` (the earlier slice of #25923) says the calendar and gantt renderers are unchanged and still read the flat spelling a host hands them, that `ObjectCalendarProps['schema']` and `ObjectGanttProps['schema']` carry the flat keys, and that the spec refusals call the flat spelling a fallback the renderer still reads. This change retires that read, so those sentences no longer hold: the renderers read the block only, the props types carry no flat binding key, and the refusals no longer say it.
24+
25+
**BREAKING** for code that mounts `<ObjectCalendar>` or `<ObjectGantt>` with a flat node.
26+
27+
- **Before.** `<ObjectGantt schema={{ type: 'object-gantt', objectName: 'task', startDateField: 's', endDateField: 'e' }} />` drew a chart, and the flat keys compiled against `ObjectGanttProps['schema']`.
28+
- **Now.** The flat keys are a compile error on the props type, and the node shows the configuration-required screen.
29+
- **Fix.** Write the binding in the block: `{ type: 'object-gantt', objectName: 'task', gantt: { startDateField: 's', endDateField: 'e', titleField: 'name' } }` (the `gantt` block requires `titleField`; the flat branch used to floor it at `'name'`), and `{ type: 'object-calendar', calendar: { startDateField: 'start' } }` for a calendar.

‎packages/spec/src/ui/component.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3290,9 +3290,9 @@ describe('object-* block props schemas — declared, so the props gate has a sch
32903290
});
32913291

32923292
it("object-calendar's flat field spellings get the wrong-layer prescription, not a rename", () => {
3293-
// Read as back-compat by getCalendarConfig, emitted by ObjectView/ListView
3294-
// handoffs — but the authored spelling is the `calendar` object (one key
3295-
// per concept; the `body` → `children` precedent).
3293+
// Not read by getCalendarConfig since objectstack#25923, and not emitted by
3294+
// ObjectView/ListView — the authored spelling is the `calendar` object (one
3295+
// key per concept; the `body` → `children` precedent).
32963296
const message = refuse(ComponentPropsMap['object-calendar'], { objectName: 'task', startDateField: 'due_date' });
32973297
expect(message).toContain('`calendar`');
32983298
expect(message).toContain('startDateField');

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

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6042,15 +6042,13 @@ export type ObjectKanbanProps = z.input<typeof ObjectKanbanPropsSchema>;
60426042
export type ObjectKanbanPropsParsed = z.infer<typeof ObjectKanbanPropsSchema>;
60436043

60446044
/**
6045-
* The flat per-field spellings `ObjectCalendar` keeps reading as a
6046-
* stored-document fallback (`getCalendarConfig`; read points recorded in
6047-
* `liveness/page.json`, row `regions`). `ObjectView`/`ListView` hand the
6048-
* binding off in the `calendar` block, not flat (objectstack#25923), and the
6049-
* flat keys live on `plugin-calendar`'s own hand-off type, not on
6050-
* `@object-ui/types`' `ObjectCalendarSchema`. Read, but
6051-
* NOT authorable — one composition key per concept (Prime Directive #12, the
6052-
* `body` → `children` precedent on {@link PageContainerProps}): the authored
6053-
* spelling is the `calendar` object.
6045+
* The flat per-field spellings of the `calendar` block, refused on the node.
6046+
* `ObjectView`/`ListView` hand the binding off in the `calendar` block, not
6047+
* flat, `@object-ui/types`' `ObjectCalendarSchema` declares none of them, and
6048+
* `ObjectCalendar`'s `getCalendarConfig` no longer reads them either: its flat
6049+
* fallback retired with objectstack#25923. NOT authorable — one composition
6050+
* key per concept (Prime Directive #12, the `body` → `children` precedent on
6051+
* {@link PageContainerProps}): the authored spelling is the `calendar` object.
60546052
*/
60556053
const OBJECT_CALENDAR_FLAT_FIELD_GUIDANCE: readonly KeySetGuidance[] = [
60566054
...COMPONENT_LEVEL_GUIDANCE,
@@ -6061,8 +6059,8 @@ const OBJECT_CALENDAR_FLAT_FIELD_GUIDANCE: readonly KeySetGuidance[] = [
60616059
prescription:
60626060
'Write this as a key of the `calendar` config object instead — `calendar: { startDateField, '
60636061
+ 'endDateField, titleField, colorField, allDayField }`. `ObjectView`/`ListView` hand the binding '
6064-
+ 'off in that block too; the flat spelling is only a stored-document fallback the renderer still '
6065-
+ 'reads, not a second authorable spelling (one key per concept, Prime Directive #12).',
6062+
+ 'off in that block too, and the renderer reads the binding there only: the flat spelling is not '
6063+
+ 'read and not a second authorable spelling (one key per concept, Prime Directive #12).',
60666064
},
60676065
];
60686066

@@ -7373,26 +7371,21 @@ export type ObjectMapProps = z.input<typeof ObjectMapPropsSchema>;
73737371
export type ObjectMapPropsParsed = z.infer<typeof ObjectMapPropsSchema>;
73747372

73757373
/**
7376-
* The flat `GanttConfig` spellings `getGanttConfig`'s branch 2 reads as a
7377-
* stored-document fallback — objectui's own `FLAT_GANTT_CONFIG_KEYS` (read
7378-
* points recorded in `liveness/page.json`, row `regions`). `ObjectView` /
7379-
* `ListView` hand the binding off in the `gantt` block, not flat
7380-
* (objectstack#25923). Read, but
7381-
* NOT authorable, for the reason the map's twin set above records: objectui#6469
7382-
* inherited the objectui#5018 ruling for this block, so the `gantt` block is the
7383-
* authoring shape, it is taken WHOLE when present, and every flat key beside it
7384-
* is named as ignored in a dev warning.
7374+
* The flat `GanttConfig` spellings, refused on the node — objectui's own
7375+
* `FLAT_GANTT_CONFIG_KEYS`. `ObjectView` / `ListView` hand the binding off in
7376+
* the `gantt` block, not flat, and `getGanttConfig` reads that block only: its
7377+
* flat fallback branch retired with objectstack#25923. NOT authorable, for the
7378+
* reason the map's twin set above records: objectui#6469 inherited the
7379+
* objectui#5018 ruling for this block, so the `gantt` block is the authoring
7380+
* shape, it is taken WHOLE, and a dev warning names every flat key as not read.
73857381
*
7386-
* The block branch is the path both view layers take — they hand the `gantt`
7387-
* block on whole — and the flat branch is only the stored-document fallback.
73887382
* The prescription still matters: an author who met the flat spelling in an
7389-
* older stored document writes it on an SDUI node next. The flat keys live on
7390-
* `plugin-gantt`'s package-local hand-off type (`ObjectGanttFlatFields`), not
7391-
* on `@object-ui/types`' `ObjectGanttSchema`, which declares only the block.
7383+
* older document writes it on an SDUI node next. `@object-ui/types`'
7384+
* `ObjectGanttSchema` declares only the block.
73927385
*
73937386
* Membership is `GanttConfigSchema`'s own shape plus the legacy singular
7394-
* `dependencyField` alias the flat branch still reads beside `dependenciesField`
7395-
* — the same two halves objectui derives its list from. Spelled out rather than
7387+
* `dependencyField` alias of `dependenciesField` — the same two halves objectui
7388+
* derives its list from. Spelled out rather than
73967389
* read off `GanttConfigSchema.shape` here because that schema is a
73977390
* {@link lazySchema} proxy and forcing it at module load would build `view.zod`
73987391
* mid-initialisation (the import-cycle footgun `ruleArrayFilterError` defers
@@ -7413,10 +7406,9 @@ const OBJECT_GANTT_FLAT_CONFIG_GUIDANCE: readonly KeySetGuidance[] = [
74137406
examples: ['startDateField', 'endDateField', 'viewMode'],
74147407
prescription:
74157408
'Write this as a key of the `gantt` config object instead — `gantt: { startDateField, endDateField, '
7416-
+ 'titleField, ... }`. `ObjectView`/`ListView` hand the binding off in that block too; the flat '
7417-
+ 'top-level spelling is only a stored-document fallback the renderer still reads, not a second '
7418-
+ 'authoring spelling: whenever a `gantt` block is present the renderer takes it WHOLE and names '
7419-
+ 'every flat key beside it as ignored. The '
7409+
+ 'titleField, ... }`. `ObjectView`/`ListView` hand the binding off in that block too, and the '
7410+
+ 'renderer reads the binding there only: the flat top-level spelling is not read and not a second '
7411+
+ 'authoring spelling. The '
74207412
+ 'legacy singular `dependencyField` is `dependenciesField` inside that block.',
74217413
},
74227414
];
@@ -7483,8 +7475,8 @@ function objectGanttMarker() {
74837475
* `showBaselines`, `readOnly` (the chart and the record overlay's lock) and
74847476
* `mobileReadOnly`.
74857477
*
7486-
* Measured and deliberately NOT declared: the flat `GanttConfig` spellings (the
7487-
* stored-document fallback — {@link OBJECT_GANTT_FLAT_CONFIG_GUIDANCE}); `title`, which
7478+
* Measured and deliberately NOT declared: the flat `GanttConfig` spellings (not
7479+
* read since objectstack#25923 — {@link OBJECT_GANTT_FLAT_CONFIG_GUIDANCE}); `title`, which
74887480
* this renderer never reads (the export-name chain is `gantt.exportFileName` →
74897481
* `label` → the OBJECT's label → `objectName`); a row cap — the reload's `$top`
74907482
* is the platform ceiling, spread in as core's `nonGridRowCeilingQuery()` (one
@@ -7494,8 +7486,8 @@ function objectGanttMarker() {
74947486
* props. ⚠️ Recorded, not ruled: objectui#10250 gave the renderer two more
74957487
* reads, `search` and `searchableFields` (sent as `$search` / `$searchFields`),
74967488
* which `ListView` writes onto the node it generates from its toolbar Search
7497-
* box (its `case 'gantt'` arm) — a host-generated key pair in the same position
7498-
* as the flat fallback spellings, and not declared here.
7489+
* box (its `case 'gantt'` arm) — a host-generated key pair, and not declared
7490+
* here.
74997491
*
75007492
* VALUE posture: `gantt` is the one config block in this family whose value
75017493
* contract is already the SPEC's — the renderer validates it against

‎ui/apps/console/src/__tests__/filterContextTokensSweep-10666.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ const ROWS: NodeRow[] = [
209209
// this block (objectui#8348); its `data` row is the array arm.
210210
withFilter: top({ type: 'object-calendar', calendar: CALENDAR, staticData: [{ ...ROW }] }) },
211211
{ node: 'object-gantt', shape: 'tuple', path: 'dataSource', filterParam: '$filter',
212-
withFilter: top({ type: 'object-gantt', objectName: OBJECT, titleField: 'name', startDateField: 'start', endDateField: 'end' }) },
212+
withFilter: top({ type: 'object-gantt', objectName: OBJECT, gantt: { titleField: 'name', startDateField: 'start', endDateField: 'end' } }) },
213213
{ node: 'object-kanban', shape: 'tuple', path: 'dataSource', filterParam: '$filter',
214214
withFilter: top({ type: 'object-kanban', objectName: OBJECT, groupBy: 'status', columns: [{ id: 'open', title: 'Open' }] }) },
215215
{ node: 'object-map (object)', shape: 'tuple', path: 'dataSource', filterParam: '$filter',

‎ui/packages/app-shell/src/__tests__/widget-dom-leak-sweep.test.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,11 @@ const OBJECT_CHART_EXTRAS = {
585585
data: CHART_DATA,
586586
series: CHART_SERIES,
587587
};
588+
// The binding lives in the `calendar` block, the one spelling `ObjectCalendar`
589+
// reads since objectstack#25923 retired its flat fallback.
588590
const CALENDAR_OBJECT_EXTRAS = {
589591
objectName: 'accounts',
590-
startDateField: 'start_at',
591-
titleField: 'name',
592+
calendar: { startDateField: 'start_at', titleField: 'name' },
592593
};
593594

594595
/* ── `packages/components`: the renderer family objectui#5574 widened this to ──

‎ui/packages/plugin-calendar/README.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,9 @@ this. `@objectstack/spec` refuses them at authoring with `unrecognized_keys` and
325325
names the `calendar` block in the same diagnostic (one key per concept, its
326326
Prime Directive #12), and since objectstack#25923 `ObjectCalendarSchema` does
327327
not declare them flat either: `ObjectView` and `ListView` emit the `calendar`
328-
block on the node they build. `getCalendarConfig` still falls back to the flat
329-
spelling when a node has no `calendar` block, for a host that mounts the
330-
renderer directly; that read is typed on this package's own hand-off type,
331-
`ObjectCalendarHandoff`, not on the published schema.
328+
block on the node they build. The renderer does not read the flat spelling
329+
either: a node that carries the five flat keys and no `calendar` block reaches
330+
the "Calendar configuration required" screen, which names the block.
332331

333332
```typescript
334333
import type { ObjectCalendarSchema } from '@object-ui/types';

‎ui/packages/plugin-calendar/src/CalendarView.popoverLocale-10747.test.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@ describe('object-calendar — an AUTHORED `locale` reaches the header popover (o
144144
type: 'plugin-calendar:object-calendar',
145145
id: 'n',
146146
objectName: 'accounts',
147-
startDateField: 'start_at',
148-
titleField: 'name',
147+
calendar: {
148+
startDateField: 'start_at',
149+
titleField: 'name',
150+
},
149151
data: [{ id: 'r1', name: 'Standup', start_at: new Date(2020, 2, 10, 10).toISOString() }],
150152
...extra,
151153
} as never

‎ui/packages/plugin-calendar/src/ObjectCalendar.invalidationRefetch-10572.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const renderBlock = (schema: Record<string, unknown>, ds: ReturnType<typeof make
5757
</SchemaRendererProvider>,
5858
);
5959

60-
const BLOCK = { type: 'object-calendar', objectName: 'event', dateField: 'due', titleField: 'name' };
60+
const BLOCK = { type: 'object-calendar', objectName: 'event', calendar: { startDateField: 'due', titleField: 'name' } };
6161

6262
describe('object-calendar re-reads on the data-invalidation bus (objectui#10572)', () => {
6363
it('an unscoped change (objectName "*") re-runs its query once', async () => {

‎ui/packages/plugin-calendar/src/ObjectCalendar.quickCreateHandoff-12291.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ describe('objectui#12291 — an object quick-create cannot satisfy hands the day
202202
render(
203203
<SchemaRendererProvider dataSource={ds}>
204204
<SchemaRenderer
205-
schema={{ type: 'object-calendar', id: 'n', objectName: 'showcase_task', startDateField: 'due_date', titleField: 'title' } as never}
205+
schema={{ type: 'object-calendar', id: 'n', objectName: 'showcase_task', calendar: { startDateField: 'due_date', titleField: 'title' } } as never}
206206
data={[]}
207207
onEdit={onEdit}
208208
/>

‎ui/packages/plugin-calendar/src/ObjectCalendar.refusalRemedy-8170.test.tsx‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,10 @@ describe('ObjectCalendar refusal screen — the remedy it states (objectui#8170)
145145
{
146146
type: 'object-calendar',
147147
objectName: 'crm_leave_request',
148-
startDateField: 'start_date',
149-
titleField: 'name',
148+
calendar: {
149+
startDateField: 'start_date',
150+
titleField: 'name',
151+
},
150152
} as any
151153
}
152154
dataSource={makeDataSource()}
@@ -168,7 +170,9 @@ describe('ObjectCalendar refusal screen — the remedy it states (objectui#8170)
168170
{
169171
type: 'object-calendar',
170172
objectName: 'crm_leave_request',
171-
startDateField: 'start_date',
173+
calendar: {
174+
startDateField: 'start_date',
175+
},
172176
} as any
173177
}
174178
dataSource={makeDataSource()}

0 commit comments

Comments
 (0)