Skip to content

finding(types/plugin-calendar): view: 'agenda' is declared by CalendarViewMode and the zod enum but the calendar-view renderer silently falls back to 'month' #5740

Description

@os-sam

Found while implementing #5667 (key-level convergence of CalendarViewSchema on the renderer's read set, PR #5739). Filed unassigned, not claiming. This is the value-level residue of the same declared-vs-enforced class — #5667's ruling scoped that card to keys, so it is recorded here rather than smuggled into that PR.

Measured (on origin/main + PR #5739's branch, identical on both)

  • CalendarViewMode (packages/types/src/complex.ts) = 'month' | 'week' | 'day' | 'agenda', and the zod CalendarViewModeSchema (packages/types/src/zod/complex.zod.ts) is z.enum(['month', 'week', 'day', 'agenda']). The kept view key declares this union.
  • The registered renderer's view input declares enum: ['month', 'week', 'day'], and resolveAuthoredView (packages/plugin-calendar/src/calendar-view-renderer.tsx) resolves any off-enum value — 'agenda' included — to undefined, i.e. the component's 'month' default. CalendarView renders no agenda view.
  • So an author writing the type-legal, zod-valid view: 'agenda' gets a month calendar with no error, warning, or red panel.

PR #5739 documents the fallback in the interface/zod docblocks and the docs table, so the surviving declaration is at least honest about it — but declared-and-documented-as-inert is still one step short of declared = enforced.

Options (not mine to pick)

Back-links: #5667 (the key-level ruling and measurement), #4453 (resolveAuthoredView's drop-to-default answer), PR #5739.

Generated by Claude Code

Metadata

Metadata

Assignees

Labels

domain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lanepm:dispatched

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions