Skip to content

finding(docs,plugin-calendar): the README's two object-calendar examples author six keys and the renderer reads none of them — object for objectName, startField for startDateField, plus fields / node-level dataSource #7925

Description

@claude

Finding (observation, awaiting first grading). Measured by the os-dev seat working objectui#5174 batch 13 (PR to follow, packages/plugin-calendar/README.md leaving UNGATED_DOCS). ⛔ Deliberately NOT fixed there: that batch's disposition is snippet coverage, every one of these blocks already COMPILES, and repairing them is an authoring decision plus a lenient-alias question, not a coverage one. Unassigned and bare — domain:* and grading are triage's.

What is true today (measured at origin/main db2c20d08)

packages/plugin-calendar/README.md teaches the object-calendar node in two example blocks. Between them they author six keys. The renderer reads none of them as written.

Block 1 — "With ObjectQL Integration" (README line 262)

const schema = {
  type: 'object-calendar',
  object: 'events',
  titleField: 'name',
  startField: 'startDate',
  endField: 'endDate',
  colorField: 'category.color'
};
key taught declared on ObjectCalendarSchema? read by the renderer?
object no (it declares objectName) nopackages/plugin-calendar/src/ObjectCalendar.tsx reads schema.objectName at 26 sites and schema.object at none
startField no no — no read site anywhere in the package
endField no only inside a branch this example never enters (below)
colorField no same branch
titleField yes same branch

The branch is the decisive part. getCalendarConfig (ObjectCalendar.tsx:119) reaches the flat-property ladder only through this gate at :131:

if ((schema as any).startDateField || (schema as any).dateField) {

The example supplies startField — neither of those two spellings — so the gate is false, getCalendarConfig returns null, and titleField / endField / colorField are never read even though two of them are spelled the way the ladder would accept. A reader who copies this block gets a calendar bound to no object and configured by nothing.

Block 2 — "ObjectQL Integration" (README line 314)

const schema = {
  type: 'object-calendar',
  dataSource,
  object: 'calendar_events',
  fields: { title: 'title', start: 'start_time', end: 'end_time', color: 'category_color' }
};

fields is not declared on ObjectCalendarSchema and has no read site in plugin-calendar (the only fields read, ObjectCalendar.tsx:484, is the OBJECT definition's field map, not the node's). dataSource is not an authorable node key at all — AGENTS.md §5 #1 says it is injected as <SchemaRendererProvider dataSource={...} />. object is wrong here for the same reason as above.

For reference, ObjectCalendarSchema (packages/types/src/objectql.ts:2672) declares exactly: type, objectName?, data?, staticData?, startDateField?, endDateField?, titleField?, defaultView?.

Why no gate catches this, which is the part worth keeping

Three gates are green on these two blocks right now, and each is green for its own stated reason:

  1. check-doc-component-types verifies the type literal object-calendar, which is correct.
  2. check-doc-snippet-types compiles the blocks, and they compile — the literals carry no annotation, so nothing is compared against ObjectCalendarSchema.
  3. Annotating them would not fix that. ObjectCalendarSchema extends BaseSchema, and BaseSchema closes with [key: string]: any (packages/types/src/base.ts:467), so every one of these six keys type-checks under the annotation too. Measured directly on the sibling CalendarViewSchema in batch 13's probe P5: renaming titleField to titleFieldd inside an annotated block leaves the gate at exit 0. Filed separately.

This is objectui#5138's shape 1 with a concrete instance, and the same sentence the snippet gate's own header uses for objectui#5174: the gate looked at the one key that was correct.

Scope, if this is graded for work

  1. Decide the intended authored form of an object-calendar node — objectName is the only spelling the renderer honours, so the README's object is simply wrong and mechanical to repair.
  2. startField has no read site; endField / dateField are lenient (schema as any) aliases read behind the :131 gate. AGENTS.md §5 #0.1 says a fallback alias belongs at the producer, not the consumer — so the honest question is whether those aliases should be removed and the README pointed at startDateField / endDateField, not whether to teach the aliases.
  3. fields and node-level dataSource look like they predate the current DataSource injection contract; confirm before rewriting either block.
  4. Whatever lands, a pin is what keeps it: packages/plugin-calendar/src/readme-calendar-view-schema.test.ts already holds the calendar-view fence to CalendarViewSchema by parsing both sides from source. There is no equivalent for the object-calendar blocks, which is why these drifted silently.

Related: objectui#7780 (ObjectKanbanSchema — a declared/read mismatch on a sibling view schema), objectui#7711 and objectui#7311 (both on plugin-calendar's config plumbing), objectui#7661 (ObjectCalendar among the three renderers that ignore a bare-array data), objectui#5138 (the shape).


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationdomain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repodomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpm:queuepriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions