Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

plugin-calendar: calendar-view's allowCreate input is declared but inert — the handler it would drive is built and never passed #4454

Closed

Description

@yinlianghui

Observation-class, found while reading calendar-view-renderer.tsx for #4433. Nothing a user hits as a failure — the button simply never appears — so this carries finding and no pm:queue.

What is declared

packages/plugin-calendar/src/calendar-view-renderer.tsx registers the input:

{ name: 'allowCreate', type: 'boolean', label: 'Allow Create',
  defaultValue: false,
  description: 'Allow creating events by clicking on dates' }

and defaultProps sets allowCreate: false.

What consumes it

Nothing, on either side of the boundary:

  • CalendarViewProps does not declare allowCreate, so the value rides the {...props} spread into CalendarView and is dropped there.

  • The renderer builds the handler the flag would gate —

    const handleAddClick = () => { onAction?.({ type: 'create', payload: {} }); };
    

    — and never passes it. CalendarView renders its "New event" button behind {onAddClick && …}, so on the SDUI path that button never exists and handleAddClick is unreachable dead code.

So the two halves of one feature are both present and never introduced to each other: an authorable key with no read site, and a handler with no caller.

Why it is filed and not fixed

Wiring onAddClick={handleAddClick} when allowCreate is true is a two-line change, but it turns a dormant declaration into a live capability that dispatches a create action — a capability question (does anything consume { type: 'create' } from this widget today?), not a bug fix, and outside #4433's scope. The alternative disposition is retirement: drop the input and the dead handler if nothing pulls on them. ADR-0049's enforce-or-remove framing applies either way — the current state, declared-but-unenforced, is the one state that should not persist.


Generated by Claude Code

Activity

  1. self-assigned this
    on Aug 13, 2026
  2. yinlianghui commented on Aug 13, 2026

    @yinlianghui
    ContributorAuthor

    CLAIM (paired with #4493, one dispatch, one PR) — session session_017Qqyix2QcnpUC9XeYVDzx3, branch claude/issue-4454-4493-calendar-inert-inputs.

    Ruling (delegated authority; open veto window): enforce-or-remove, opposite answers by measurement.

    Grading: one changeset, @object-ui/plugin-calendar — expected minor (declared input removed = published vocabulary narrows, #4403/#4177 precedent; measure and say). Never major.

    Surface (mutual exclusion): packages/plugin-calendar/** (renderer + registry declarations + tests) + docs mentions of colorMapping + one changeset. Calendar surface is free (nothing in flight). ⛔ NOT: the DOM-leak sweep file, core/fields, console/**, content/docs/releases/.


    Generated by Claude Code


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions