Uh oh!
There was an error while loading. Please reload this page.
fix(examples): pin the two plugin-calendar catalog entries onto their own events (#4627) - #4667
Merged
Merged
Conversation
… own events (#4627) `calendar-view` paints the month/week window around `currentDate`, which defaults to today. Both `plugin-calendar` catalog entries author events in a fixed past month, so the two tiles whose whole point is to demonstrate events on a calendar drew a correct-but-empty grid, and would have done so on every future day. Both entries now author `currentDate` — the registry input `calendar-view` declares as an ISO date string, parsed to a `Date` at the renderer boundary since #4452 — pinning each view onto its own events. Relative-to-today dates were the alternative and are not available: the catalog ships static JSON that must stay copy-pasteable, and nothing in the pipeline or the renderer substitutes date tokens. `catalog-gallery-render.test.tsx`'s two `AUTHORED_TEXT_EXEMPT` entries are removed rather than reworded: both entries now carry the authored-content control, and the table is empty. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnQd8iMMUwXQEV1crFmQiQ
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
marked this pull request as ready for review
August 15, 2026 06:31
Uh oh!
There was an error while loading. Please reload this page.
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 freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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#4627
calendar-viewpaints its month/week window aroundcurrentDate, which defaults to today. Bothplugin-calendarcatalog entries author their events in a fixed past month, so the two tiles whose whole point is to demonstrate events on a calendar drew a correct-but-empty grid — and would have done so on every future day.The choice: authored
currentDate, not relative-to-today datesThe card left this open between two mechanisms and asked for the choice to be stated. Relative-to-today dates are not available, so
currentDateis the option, not merely the preferred one:examples/schema-catalog/src/types.tssays so in as many words ("Kept separate from the schema JSON so the raw schemas remain copy-pasteable into user projects").new Date(record[startField])(packages/plugin-calendar/src/calendar-view-renderer.tsx), and there is no{{now}}/ offset-token language anywhere inexamples/schema-catalog/**orpackages/plugin-calendar/**— grepped, zero hits.currentDatecosts none of that. It is a declared registry input oncalendar-view—type: 'string', "ISO date string for initial calendar date" — and since #4452 / PR #4484 the renderer parses that documented ISO string into theDatethe component's prop type declares, at the boundary (resolveAuthoredCurrentDate). So the spelling authored here is exactly the spelling the input documents, and the two entries now double as the worked example of a real, declared, working key. The result is deterministic forever rather than dependent on the day the gallery is opened.Values, chosen mid-window so no timezone can shift the view out of range:
currentDatemonth-view-calendar2026-05-15T12:00:00.000Zweek-view-calendar2026-05-27T12:00:00.000ZThe events themselves are untouched — the card's shape is to pin the view onto the events, and the existing curated data already forms one coherent month and one coherent week.
The exemptions are removed, not reworded
catalog-gallery-render.test.tsxnamed both entries inAUTHORED_TEXT_EXEMPT, lifting the authored-title control with "date window" as the measured reason. That reason no longer holds, so both entries are removed from the table — which is now empty — and each now carries the full control: every authored title must be on screen. The file's header tables and the two prose references to this card are updated to match.Verification — all at
715ba9ae6(final commit, clean tree)pnpm exec vitest run examples/schema-catalog— 8 files, 1576 tests passed. Re-run after the final commit on a clean tree; both sha and dirty-count captured in the same command.--reporter=verbose), not silently skipped:currentDateablated from both entries, exactly the two authored-content cases fail, naming every authored title —git checkoutof the branch, scoped to the two entry paths), never the shared stash.pnpm --filter @object-ui/example-schema-catalog regenerate:check—src/index.ts is up to date (423 entries). Contents-only entry edits, so no index regeneration is owed (PR fix(examples,scripts): regenerating the schema catalog stops discarding curated metadata #4637's model); no titles or descriptions changed, socatalog-meta.jsonis untouched.pnpm exec tsc -p examples/schema-catalog/tsconfig.test.json --noEmit— exit 0.pnpm --filter @object-ui/example-schema-catalog lint— 0 errors (2 pre-existing warnings, insrc/index.tsandvitest.config.ts, both untouched here).node scripts/check-control-bytes.mjs—OK (scanned 4191 tracked text file(s); skipped 85 binary).Changeset
None owed, per the gate's own output:
Note for triage — the card's "2024" is imprecise, the premise is not
The issue title and body say the entries author "fixed 2024 event dates". On
origin/mainthey author 2026-05/06 dates. The substantive premise is unaffected and was confirmed directly: those dates sit outside the window painted around today either way, which is exactly what the ablation above re-measures. Only the year in the filing's prose was off; nothing about the defect or its fix changes.Generated by Claude Code