This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(plugin-calendar): read the calendar config from calendar, never from filter - #8027
Merged
Merged
Conversation
… from `filter` `getCalendarConfig` probed `schema.filter` for a `calendar` key and, on a hit, returned that value as the `CalendarConfig` — while the same object still went to `$filter` on the wire. One authored key, two incompatible meanings. The arm is deleted. `@objectstack/spec`'s `ComponentPropsMap['object-calendar']` declares `calendar` as the configuration container and `filter` as the base query filter, and admits no `filter.calendar` spelling; the canonical read already sat directly below the retired arm, under a comment calling *it* the "backward compatibility" branch. That comment had the contract inverted and is gone too. No compatibility rung and no deprecation window (AGENTS.md #0.1). The `calendarConfig` memo's dependency list drops `schema.filter`, which the function no longer reads, and gains the three flat keys it does read but the list never named: `startDateField`, `endDateField`, `allDayField`. Dropping `filter` removes an accidental co-trigger that used to pick those up whenever a filter changed alongside them. The calendar twin of the `filter.map` retirement in objectui#4034, measured to differ in two ways: there is no `Array.prototype.calendar`, so the probe never fired on array-shaped filters the way `'map' in schema.filter` fired on every one of them; and a calendar that loses its configuration renders the existing "Calendar configuration required" refusal rather than the map's silent fallback to default field names. Hence no dev-time diagnostic rider here. Refs objectui#7711. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QnpvbdoRisQdRAczkLwnf5
Contributor
✅ 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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7711
filteris the query filter and nothing else.calendaris the configuration container. One key, one meaning — which is also the shape objectui#7712 inherits, per the dispatch decision on the card.What changed
getCalendarConfigprobedschema.filterfor acalendarkey and, on a hit, returned that value as theCalendarConfig— while the very same object still went to$filteron the wire at:430. One authored key was read twice with two incompatible meanings.That arm is deleted.
@objectstack/spec'sComponentPropsMap['object-calendar']declarescalendaras the configuration container andfilteras the base query filter, and admits nofilter.calendarspelling. The canonical read already existed directly below the retired arm, merely shadowed by it — so this is a deletion, not a new reading. The comment sitting on that canonical read called it the "backward compatibility" branch; the contract was inverted in a source comment, and that comment is gone too.⛔ No compatibility rung, no deprecation warning, no staged window — objectui
AGENTS.md#0.1 (a tolerant fallback fossilizes the wrong convention into a second de-facto contract), plus the standing maintainer ruling of 2026-08-27: 「项目在创业阶段,用户也很少,短期不考虑渐进。」Also here: the
calendarConfigmemo's dependency list dropsschema.filter, which the function no longer reads, and gains the three flat keys it does read but the list never named —startDateField,endDateField,allDayField. Droppingfilterremoves an accidental co-trigger that used to pick those up whenever a filter happened to change alongside them, so leaving the list as it was would have turned a latent staleness into a reachable one.The defect is not only the retired spelling
filter: { calendar: 'team' }— triage's example, a legitimate condition on a field literally namedcalendar— was returned as theCalendarConfig.'team'is truthy, so the refusal screen did not fire either:startDateFielddestructured off a string isundefined, every record fell into "unscheduled", and the grid rendered empty while the author's declaredcalendarblock sat unread. Measured, not predicted — it is ablation A's third failure below.Two measured differences from the
filter.maptwin (objectui#4034)Read first, as instructed. #4034 paired the same deletion with a narrow dev-time diagnostic (
warnOnLegacyFilterMapConfig). This change carries no rider, and the grounds are measurements on this branch rather than a preference:'map' in schema.filteristruefor every array-shaped filter — the empty array, a JSON-Rules array, and theandnode a dataSource binding merges — viaArray.prototype.map. That is what upgraded ObjectMap 把 schema.filter 当地图配置的容器读(getMapConfig 读 filter.map / filter.map.style):filter 是过滤器,不是配置槽 #4034 from an observation to a live defect breaking authors who wrote the correct shape. There is noArray.prototype.calendar: all three answerfalse. Only an object-shaped filter with an owncalendarkey ever reached the retired arm. Asserted as a mechanism case, with themaphalf as the control that proves the probe can fire.null, and the existing early return renders "Calendar configuration required. Please specify startDateField and titleField." The map fell back to default field names — an empty map that looks like bad data — which is precisely why it had to warn. The calendar names what is missing, on screen. That is the outcome ObjectMap 把 schema.filter 当地图配置的容器读(getMapConfig 读 filter.map / filter.map.style):filter 是过滤器,不是配置槽 #4034's rider was invented to provide, already present structurally.Census — zero, with controls that fire
Authored
filter: { calendar: ... }sites in this repo: 0. Both the object-literal and the JSON spellings, over all 6,532 tracked files.A zero is only a reading if the search could have found a positive, so three controls:
calendar→statusapps/,content/,eslint-rules/calendar→projectcontent/docs/utilities/data-objectstack.mdx:331)packages/plugin-calendar/src/__tests__/andexamples/git status --porcelainThe first JSON control I wrote (
status) returned zero for the control too, so it was discarded as NOT MEASURED and replaced withproject, which the corpus actually contains.Tests
New pin:
packages/plugin-calendar/src/__tests__/ObjectCalendar.filterIsNotAConfigSlot-7711.test.tsx, 7 cases. Both directions, because a change that merely stopped reading the filter would pass a retirement-only file: the second group asserts a legitimate filter on a field namedcalendarreaches$filteruntouched (same object identity) and is never mistaken for configuration.Green, all under the shared verify lock, at
7aa2ef5:pnpm exec vitest run packages/plugin-calendar/— 25 files, 145 tests passedpnpm --filter @object-ui/plugin-calendar type-check(tsc --noEmit && tsc -p tsconfig.test.json) — passapp-shell/plugin-view/plugin-list/typescalendar + filter-source cases) — 6 files, 56 tests passedcheck:control-bytes,check:vi-mock-specifiers,check:vi-mock-inherit,check:unreferenced-sources,node scripts/check-changeset-presence.mjs— all exit 0eslinton both changed files — 0 errors (86 pre-existingno-explicit-anywarnings;as anycount on the edited file moved 25 → 27, the memo's three added keys less the deleted read)scripts/pm/dispatch-gates.mjsdoes not exist in this repo. Repo-wide scans (pnpm lint, fullpnpm test) are left to CI.Reverse verification
Two ablations, each committed-first, each proving the mutation reached disk before the result was read, each restored via
git checkout HEAD -- pathwith an emptygit diff HEADas the restore proof. Directions predicted before running; both matched.A — reinstate the retired arm. Marker count 0 → 1, blob hash moved off HEAD,
+3lines. ⇒ 3 failed / 4 passed. Red at the refusal case, the shadowing case, and thefilter: { calendar: 'team' }case (received[]— the empty grid described above). Green, correctly, at the array-filter case and the mechanism case: reinstating the arm cannot break them, because the probe never fired on an array. That asymmetry is the point of point 1.B — revert only the memo dependency list. Added-key count 1 → 0, removed-dep count 1 → 2,
+2/-4. ⇒ 1 failed / 6 passed, red at thestartDateFieldrerender case and nowhere else.Scope
inputsdeclaration is not touched — that is objectui#7712's landing point, held behind this card, and its shape is bound by the decision above. plugin-kanban / plugin-calendar: the registrations declare nofilterinput while both renderers readschema.filterand the spec declares it — the html tier reportsunknown-propon a spec-declared key (objectui#6678 class) #7712 is not addressed here and remains open.packages/specsurface; objectstack read-only..changeset/7711-calendar-filter-is-not-a-config-slot.md(minor, deliberately breaking). Theskip-changesetlabel is inert in this repo and was not applied.ObjectCalendarresolvesallDayFieldinto itsCalendarConfigand never reads it —allDayis inferred from the absence of an end date, while thecalendar-viewsibling honours the key #8026:ObjectCalendarresolvesallDayFieldinto its config and never reads it, inferringallDayfrom the absence of an end date, while thecalendar-viewsibling honours the key. Not touched here.Generated by Claude Code