Skip to content

finding(types/plugin-calendar): defaultView declares 'agenda' in ObjectCalendarSchema and both zod twins, but ObjectCalendar reads it as 'month' | 'week' | 'day' #5784

Description

@os-sam

Found while implementing #5740 (PR #5782, which retired 'agenda' from CalendarViewMode / CalendarViewModeSchema). Filed unassigned, not claiming — this is the same declared-vs-enforced class on a different declaration, and #5740's ruling inheritance covered only the shared CalendarViewMode union on the calendar-view renderer, so narrowing these enums (a further accept-set change on other declared keys) needs its own pass rather than a rider on that PR.

Measured (on origin/main1f94b4c)

Three declaration faces admit 'agenda' for defaultView:

The enforcement point reads three values:

So an author writing the zod-valid defaultView: 'agenda' on an object-calendar node (or in a list view's calendar config) gets a month calendar with no error — the exact shape #5740 just closed on CalendarViewSchema.view. defaultView is a declared key on these schemas, so aligning it is an accept-set narrowing with the same clause-② character as #5740.

Authorship sweep: zero authors of defaultView: 'agenda' in-repo, in examples/, or in the objectstack tree (same sweep as #5740's, which matched every agenda occurrence in both repos).

Options (not mine to pick)

Back-links: #5740 (the sibling retirement on CalendarViewSchema.view and the measurement standard), #5667 (the parent ruling), PR #5782.

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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions