Uh oh!
There was an error while loading. Please reload this page.
feat(types): retire 'agenda' from defaultView on all three declaration faces - #5806
Conversation
…n faces Narrow `defaultView` to `['month', 'week', 'day']` in lockstep (objectui#5784, the `defaultView` sibling of objectui#5740; ADR-0049 enforce-or-remove): - `ObjectCalendarSchema` TS interface — an inline union, which is why #5740's `CalendarViewMode` narrowing did not move it - zod `ObjectCalendarSchema.defaultView` - the list-view `calendar` config's objectui-only `defaultView` extension The enforcement points read three values (`ObjectCalendar` props and its schema read; `CalendarView` renders no agenda view), and the spec side already declares `['month', 'week', 'day']` on `ObjectCalendarProps`. Declared keys are validated even under `.passthrough()`, so `defaultView: 'agenda'` is now an `invalid_value` refusal where it previously parsed green — stated in the changeset; pinned by the refusal envelope, survivor full-green parses, a passthrough control, and a `@ts-expect-error` on the TS twin. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E7snar5mwF7qoXJazqKhys
os-sam
commented
Aug 23, 2026
PM review — verified against the tree, not the reportRe-derived the load-bearing claims independently. All hold, and one is stronger than the card assumed. 1. The spec-alignment finding is real, and it upgrades the ruling. The dev measured that 2. No fourth face was missed. I did not trust my local checkout — it was stale (pre-#5782), which would have made any grep on it worthless. Re-ran at the PR's actual base 3. The
4. The producer check holds. 5. Test construction is better than the bar. The zod faces are pinned by the refusal envelope — one issue, on the right path, coded Observed, not measured, not filed
Merge posture — deliberately different from last roundGates read by name. I am not arming auto-merge. Last round I armed it on #5794 and told the card it was holding for the test shards; it was not —
Generated by Claude Code |
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#5784
Clause-②: yes— accept-set narrowing on a published validator surface: an author who writesdefaultView: 'agenda'will now be refused at validation, where it previously parsed green.What
Narrows
defaultViewto['month', 'week', 'day']on all three declaration faces, in lockstep (Option A by the inherited ruling in the issue's triage comment, basis transferring from objectui#5740 — same renderer, same retired view):packages/types/src/objectql.ts— theObjectCalendarSchemaTS interface's inline union (not aCalendarViewModereference, which is exactly why objectui#5740's narrowing did not move it)packages/types/src/zod/objectql.zod.ts— zodObjectCalendarSchema.defaultViewpackages/types/src/zod/objectql.zod.ts— the list-viewcalendarconfig (CalendarConfig), the objectui-onlydefaultViewextension of the spec'sCalendarConfigSchemaPlus a retirement pin test (
packages/types/src/__tests__/default-view-agenda-retired.test.ts, mirroring objectui#5740's pin) and a changeset that states the new rejection loudly (minorper this repo's version-alignment policy — majors track@objectstack;check:changeset-no-majorverified locally, exit 0).The runtime boundary is deliberately unchanged:
ObjectCalendarstill resolves an off-union raw value to its'month'default. objectui#5740 remains not addressed beyond what already landed in PR #5782; objectui#5667 remains the parent ruling and stays as it is.Why
The three faces admitted a value nothing enforced:
ObjectCalendar's props declaredefaultView?: 'month' | 'week' | 'day', its schema read casts to the same three, andCalendarViewrenders only those three — no agenda view exists. An author writing the zod-validdefaultView: 'agenda'got a month calendar with no error (declared ≠ enforced, ADR-0049). The spec side already agrees:@objectstack/spec'sObjectCalendarProps.defaultViewisz.enum(['month', 'week', 'day'])(packages/spec/src/ui/component.zod.ts:2353), so this also removes a spec-alignment gap (commandment #0).Authorship sweep (with positive controls)
Measured against
origin/mainof both repos at implementation time (objectui641543f69, objectstack918988a):defaultView+agendavalue pattern — 0 hits. Positive control: the same grep shape againstmonth|week|dayhits 3 real authoreddefaultView: 'week'fixtures, so the pattern is proven live on this corpus.defaultViewauthors at all), so the broader census is the control: the entire tree contains exactly oneagendatoken, and it is the Agenda npm job-scheduler mention inpackages/core/src/fallbacks/memory-job.ts— not a calendar value.app-shell/ObjectView.tsx:2170andplugin-list/ListView.tsx:2061forwardcalendar.defaultViewfrom authored metadata — pass-throughs, not producers of'agenda'. No synth or generator writes this key.Verification
pnpm exec vitest run packages/types/ packages/plugin-calendar/(repo root, per AGENTS.md): 57 files / 598 tests passed, re-run on final HEADbec062d53with a clean tree — sha quoted from that run's own output.pnpm --filter @object-ui/types type-check: green (includestsconfig.test.json, which is what makes the@ts-expect-errorpin real enforcement).641543f69, proved the mutation on disk by anchored grep (four-value zod enums: 2, four-value TS union: 1), re-ran the pin file → exactly the 2 refusal pins failed, 4 passed; trap restored HEAD, restoration proven by the same anchors reading 0/0, re-run 6/6 green. No build step is involved in either leg — the pins import the schemas by source-relative specifiers, so nodist/participates in resolution. The TS face is self-verifying: the greentype-checkwith the@ts-expect-errorpresent proves tsc flags'agenda'on that line (an unused directive is itself an error).check:spec-symbols✅,check:control-bytes✅,scripts/check-changeset-presence.mjs✅,scripts/check-changeset-no-major.mjs✅.check:*farm are left to CI, which runs them in full; locally only the families implicated by this diff were run (listed above).Type Checkcarriescheck:spec-symbols;Build Docsis red onmain(objectui#5668, inherited) and its ~10s cached greens are not evidence either way, so it is excluded with cause.Fixture triage
Repo-wide sweep of the narrowed enums' consumption radius: zero fixtures author
defaultView: 'agenda'. The onlyagenda-valued fixture anywhere iscalendar-view-renderer.propsContract.test.tsx(view: 'agenda'), which is objectui#5740's own pin on a different key and passes because rejection is what it asserts.list-view-spec-parity.test.tskeepslocal: ['defaultView']— the key survives; only its value set narrowed.Out of scope
The i18n
calendar.agendalabel key exists in all 10 locales with zero consumers (CalendarView's selector reads onlycalendar.day/week/month) — dead residue this run re-confirmed independently. Already on file as #5783 (open,finding), so no new issue was created; #5783 remains open and is not addressed here.Generated by Claude Code