Skip to content

finding(components/types): the ui:calendar designer offers mode: 'default', which both authoring faces refuse #10377

Description

@objectstack-fleet

Surfaced by the dev executing objectui#10304 (PR objectui#10376, out_of_scope_findings). Filed by the domain:spec @ objectui execution seat, session session_01877XiBYSaRCk2CU7cMSg3S. The seat re-measured the two sites below on origin/main. ⛔ Not graded: priority:* and type belong to triage. The seat proposes domain:spec, because this is a contract ↔ registration seam.

Fact (class c: the designer offers a value the contract refuses)

site reads
packages/components/src/renderers/form/calendar.tsx:42, the ui:calendar registration inputs { name: 'mode', type: 'enum', enum: ['default', 'single', 'multiple', 'range'] }
packages/types/src/form.ts:1169, CalendarSchema.mode mode?: 'single' | 'multiple' | 'range';
the zod mirror (per the dev's measurement) UiCalendarSchema.safeParse({type:'ui:calendar', mode:'default'}) → invalid_value at path mode

So an author who picks default in the designer stores a document that the mirror refuses and the TS face cannot express.

Not measured

What react-day-picker 10 does with mode: 'default' at runtime. Rule 2 of #7759 ruling 5617465269 says CalendarSchema is objectui-own, so the read site is the truth, and the fix direction follows from that measurement:

  • If the renderer treats default the same as omitting mode, drop 'default' from the designer enum.
  • If it has distinct behaviour, admit it on both faces.

Serial note

This touches the same ui:calendar registration and CalendarSchema lines as PR objectui#10376 (#10304), so it goes after that PR lands.

Seam: types:form.ts#CalendarSchema.mode → registration:packages/components ui:calendar inputs
Dedupe words: ui:calendar mode default · calendar inputs enum default · calendar mode invalid_value designer

Activity

  1. objectstack-fleet commented on Sep 24, 2026

    @objectstack-fleet
    ContributorAuthor

    分诊首次定级:priority:p3 · bug · domain:spec · pm:queue —— ui:calendar 的设计器选项提供了 mode: 'default',但 TS 类型和 zod 镜像两个作者面都拒绝这个值:在设计器里选了它,存下来的文档就不合契约

    Path: packages/components/src/renderers/form/calendar.tsx(第 71 行,ui:calendar 注册的 inputs:enum: ['default', 'single', 'multiple', 'range'])· packages/types/src/form.ts(第 1194 行,CalendarSchema.mode?: 'single' | 'multiple' | 'range')· zod 镜像 UiCalendarSchema

    Triage: lands on the CalendarSchema ↔ ui:calendar registration seam, owned by the contract face packages/types ⇒ domain:spec (the filing seat's proposal, and the lane table agrees), bug, priority:p3, pm:queue (no labels before — graded); rationale: the designer offers a value both authoring faces refuse (invalid_value at mode, measured by the objectui#10304 dev), so picking it stores a document that fails the contract; one option in one designer enum, hence p3; the card's serial note is already satisfied — PR objectui#10376 (#10304) has landed as ea02938c, and main still carries 'default' in the enum.

    分诊席 #6015,2026-09-24T23:30Z。⛔ 不认领、不派发。本席读完了卡面(本卡尚无评论),并在 objectui origin/main 961ceaa3 上核对。

    本席核对

    为什么不挂阻塞

    卡面说要等 PR #10376,因为它改的是同一段注册和类型。这个 PR 已经合并为 ea02938c,所以直接排队。

    定级说明

    p3:只是设计器里一个多余的选项,但选了它就会存下不合契约的文档,所以仍然是缺陷。

    执行要点

    1. 先测量:react-day-picker 在 mode: 'default' 下实际怎么表现。按 27 keys across 18 pairs have a zod mirror that ACCEPTS a spelling its TypeScript declaration refuses — each needs a narrow-the-mirror / widen-the-declaration ruling #7759 的裁决(5617465269)第 2 条,CalendarSchema 是 objectui 自有的契约,以读取点为准。
    2. 按测量结果二选一:
      • 表现与不写 mode 相同 ⇒ 从设计器枚举里删掉 'default';
      • 有独立的表现 ⇒ TS 和 zod 两个面都接纳它,并写清含义。
    3. 钉子:设计器枚举里的每个值都能通过 UiCalendarSchema.safeParse,即「枚举是契约的子集」的对照测试,防止以后再漂移。

    Generated by Claude Code

  2. added
    bugSomething isn't working
    domain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lane
    on Sep 24, 2026
  3. objectstack-fleet commented on Sep 24, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 13 — objectui#10377: the ui:calendar designer enum stops offering a mode value the contract refuses (measure 'default' at the read site first, per the triage plan)
    Session: session_01877XiBYSaRCk2CU7cMSg3S
    Branch: claude/issue-10377-calendar-mode-default
    Worktree: objectui-issue-10377
    Domain: domain:spec
    Seat: domain:spec#1
    File surface:

    • packages/components/src/renderers/form/calendar.tsx (the registration inputs enum only)
    • packages/types/src/form.ts and packages/types/src/zod/form.zod.ts (CalendarSchema.mode), ONLY if the measurement says 'default' has distinct behaviour
    • an enum-⊆-contract pin test, and one .changeset/10377-…md
      Container & model: S, mode:subagent, model: opus (TIER_DEFAULT)
      Clause-②: conditional.
    • If only the designer enum drops 'default' (both faces unchanged), it is a PM ACCEPT.
    • If mode widens on both faces, it goes to an isolated at-tier review before enqueue.
      Thread-read: the triage grading comment (2026-09-24T23:30Z), which gives execution steps 1–3.
      Serial constraints cleared: re-measured at 2026-09-24T23:48Z. PR objectui#10376, which touched the same lines, landed as ea02938c, and no open PR touches calendar.tsx.

    Authority: #7759 ruling 5617465269 rule 2 (CalendarSchema is objectui-own, so the read site is the truth) and the triage plan on this card. Dispatch: objectstack-ai/objectstack#19980 and 「任务很多,并发保持3」.

  4. objectstack-fleet commented on Sep 25, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 10377,
      "status": "done",
      "branch": "claude/issue-10377-calendar-mode-default",
      "pr": "https://github.com/objectstack-ai/objectui/pull/10420",
      "session": "session_01877XiBYSaRCk2CU7cMSg3S — subagent, so this is the parent's id",
      "premise_still_valid": true,
      "summary": "I measured first. The real ui:calendar renderer with react-day-picker 10.0.1 renders mode 'default' with root data-mode='default'. It drops the authored value and defaultValue: 2026-09-15 was selected when mode was omitted and nothing was selected under 'default'. Clicking a day selects nothing (omitted mode: the click selects the 20th, then the 22nd). All 35 day cells still render as buttons. RDP 10's Mode union has no 'default'; its useSelection switch sends any other string to the no-selection branch. So the behaviour is distinct but degenerate, not a designed mode, and I took the drop-from-the-enum branch. The ui:calendar registration inputs enum is now ['single','multiple','range']. CalendarSchema.mode (TS) and UiCalendarSchema are byte-unchanged. I added a pin that every designer enum value passes UiCalendarSchema.safeParse, with non-vacuity and control rows, plus a patch changeset for @object-ui/components. I found no generic designer-enum-vs-objectui-mirror check to extend: registry-inputs-spec-parity judges against @objectstack/spec, which does not carry ui:calendar. No corpus document authors mode 'default'. No label writes: the dispatch named no labels, and objectui path labels belong to labeler.yml.",
      "tests": "All runs are on HEAD 3d90a1259. (1) Dependency build: turbo run build --filter='@object-ui/components^...' --concurrency=2 under os-verify-lock gave 'Tasks: 7 successful, 7 total' (VERDICT command-exit 0). (2) pnpm --filter @object-ui/components type-check gave VERDICT command-exit 0; tsc -p tsconfig.test.json --listFiles counts the new test (1 hit). (3) pnpm exec vitest run packages/components/ --maxWorkers=2 under the lock gave 'Test Files 295 passed | 1 skipped (296)', 'Tests 2845 passed | 17 skipped (2862)' (VERDICT command-exit 0). (4) eslint --format json on the 2 touched source files (the changeset is not linted): 2 files, 0 errors, 3 warnings, all pre-existing no-explicit-any on unchanged lines; the base file has the same 3. eslint.config.js enables no type-aware linting, so the narrowing cannot move any untouched file's verdict; the full lint is left to CI. (5) Gates: check:designer-field-key-parity OK; check:control-bytes OK; check:new-line-citations 0 new; check:changeset-claims pass; check:pending-changeset-literals pass; check:component-surface-parity report-only exit 0 (its ui:calendar rows are the pre-existing minDate/maxDate rows); scripts/check-changeset-presence.mjs pass. NOT MEASURED: check:sdui-registration-pins, reason: it exits 2 PREREQUISITE because it needs the console bundle (pnpm --filter @object-ui/console build); left to CI. Ablation, after the fix commit: I put 'default' back into the enum with a node replace that checks its anchor, and a trap restores the file on exit. On-disk counts: the old spelling went 0 to 1 and the new one 1 to 0. Pin result: 'Tests 1 failed | 2 passed (3)', with the diff showing + \"default\" as refused. The restore used git checkout HEAD --; git diff HEAD was empty and the disk hash matched the HEAD blob b9a6e73df16d. After the restore: 'Tests 3 passed (3)'. The test imports the renderers from source, so no dist was involved. The probe that measured the runtime behaviour was a throwaway test file, deleted before the commit.",
      "mcp_calls": "4 — mcp__github__issue_read x3 (get; get_comments; get_comments to read this report back), mcp__github__list_pull_requests x1; all reads, no MCP write tool",
      "api_writes": "2 — git push of the branch (not REST); fleet-write relay pr_create (POST /repos/objectstack-ai/objectui/pulls, draft forced) via a repository_dispatch to objectstack-ai/objectstack, run 36076127281 success; plus this os-dev-report comment (POST /repos/objectstack-ai/objectui/issues/10377/comments via relay). Zero label writes.",
      "open_questions": [
        {
          "question": "Should ui:calendar gain a real display-only (no-selection) mode? RDP 10 supports a picker with no mode, but that is not what 'default' produced: 'default' left the day buttons interactive but inert and dropped the value.",
          "options": [
            "A: nothing now. The enum drop is the fix, and a read-only calendar is filed only if an author asks for one.",
            "B: a separate card widening CalendarSchema.mode (TS and zod) with a named read-only mode that the renderer maps to mode undefined, and a decision on how the value is shown."
          ],
          "recommendation": "A. There is no pull from the corpus: zero documents author 'default'. Option B widens the contract and needs a maintainer-level decision about the name and value semantics."
        }
      ],
      "out_of_scope_findings": []
    }

    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

Labels

bugSomething isn't workingdomain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lanepriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions