Repository navigation
fix(plugin-calendar): a day event moved across a DST change writes the days it was dropped on; timeZone prose and zone pins (objectui#10866, slice 4) - #10994
Conversation
…e days it was dropped on (objectui#10866) The month grid moves each date by the milliseconds between two local midnights. A date-only value is handed to it at local midnight of its day, so when a DST change lies between a date and where it lands but not between the grabbed and drop cells (or the other way round), the moved Date comes back an hour off local midnight, 23:00 of the day before when the clocks fell back in between, and the write took that local day. Under America/Los_Angeles four of ten measured day moves wrote a day one short. ObjectCalendar now writes a day event's `date` field (start, and end when set, both stored calendar days) as its stored day moved by the whole days the grid moved it, on the UTC calendar. The grid's own arithmetic is unchanged: every other field, instants included, writes what it did. Zone pins, registered in the driver's PINS: the DST day moves, the calendar's end-date write and no-schema fallback, and the gantt's no-schema path. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuWo5bdP9SdVebamn99GGk
…eld persists; a mixed DATEDIFF reads each argument by its kind (objectui#10866) `GanttConfig.timeZone`, `GanttViewProps.timeZone` and `makeTzShift` said persisted data stays real instants. Since this card's first slice a `date` field under a zoned chart is written as a calendar day: the prose now says a `datetime` stays an instant and a `date` is drawn from its day's midnight and written back as the day it was dropped on, and that near a DST change of the chart's zone or the viewer's the shim can place that midnight an hour early, onto the day before (measured, reported on the card). The FormulaFunctions docblock names how a mixed DATEDIFF (one day, one instant) reads each argument when it counts months or years. Comments and JSDoc only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuWo5bdP9SdVebamn99GGk
…plugin-gantt, types and core Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuWo5bdP9SdVebamn99GGk
|
changeset-claim-re-read
|
✅ 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
|
Contract reviewServed-tier: Isolated adversarial review of PR objectui#10994 (card objectui#10866, slice 4), written 2026-09-28. Read: the card's body and all 20 comments (triage ① Derived judgments1. Instants did not move: verified, byte for byte, in three zones. My own probe drove 38 moves through the real
All 23 instant and mixed rows are byte-equal in every zone, and no row errored. Among them, in Los Angeles: the local-midnight Classification, read at source: 2. The day repair.
3. The prose, each sentence against the code and a measurement.
4. The pins.
5. The mixed- 6. CI. 43 check-runs on 7. Commits. Three on the branch ( ② Semver level
Changeset sentences: "the month grid moves each date of an event by the milliseconds between two local midnights" ( ③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Part of #10866
Clause-②: no
Slice 4 of objectui#10866: the items slice 1 left owed (claim
5870315836, release5870108114). The binding reading is the release's: a calendar day reads and moves on the UTC calendar; adatetimekeeps its instant and is displayed in the viewer's zone. No instant behaviour moves here.What changes
America/Los_AngelesthroughObjectCalendar: four of ten day moves across November 1st and March 8th wrote a day one short (an October 29th to 31st span moved two days wrote its end2026-11-01; a November 1st to 3rd span grabbed on the 2nd and moved one day wrote its start2026-11-01; an October 31st to November 2nd span grabbed on the 2nd and moved back one day wrote its start2026-10-29; a March 5th to 9th span moved back one day wrote its end2026-03-07).Asia/Shanghaiand UTC wrote every day right.ObjectCalendarnow writes adatefield of a day event (its start, and its end when it has one, are both stored calendar days) as its stored day moved by the whole days the grid moved it, on the UTC calendar (toMovedDateValue). Every other write takes the path it took before.timeZoneprose, made true of the code at three sites plus one comment of the same sentence:@object-ui/typesGanttConfig.timeZone: adatetimevalue stays a real instant; adatevalue is a calendar day, drawn from that day's midnight in the chart's zone and written back as the day it was dropped on,YYYY-MM-DD; near a DST change of the chart's zone or the viewer's, that midnight can be placed an hour early, onto the day before (measured, see Acceptance notes).GanttViewProps.timeZone: dates handed toonTaskUpdateare translated back into real instants; for a date-only value the host translates both ways itself, asObjectGanttdoes.makeTzShift's JSDoc: whatfromgives back, howObjectGantthands a day in and writes it back, and thattoandfromare exact inverses except near a DST change of either zone. The old sentence "fixed-offset zones (Asia/Shanghai) are exact" was false for a viewer whose own zone keeps DST (measured on a verbatim copy of the function: for anAmerica/Los_Angelesviewer of anAsia/Shanghaichart, 31 of 2026's hourly instants do not round-trip, all around March 8th and November 1st), so it is replaced rather than kept.GanttView'sonTaskUpdatewrapper said "writes must persist real time"; it now says the host decides what to persist. Same sentence class, same file, comment only.PINS:ObjectCalendar.dstDayMove-10866: the ten day moves in Los Angeles and Shanghai, threedatetimecontrols in Los Angeles and one in Shanghai, a rig case per zone, and a fixture-validity case (November 1st is 25 hours long in Los Angeles, March 8th 23).ObjectCalendar.endDateNoSchemaZone-10866: theendDateFieldwrite (move, end-handle drag, quick-create), and the calendar with no object schema (read, move, end drag, quick-create), withdatetimecontrols, in the suite zone, Los Angeles and Shanghai.ObjectGantt.noSchemaZone-10866: the gantt with no object schema, for an adapter with nogetObjectSchemaand for one whose schema has no fields (theapiprovider's shape): read, drag write, a zoned chart, and an instant control, in the suite zone, Los Angeles and Shanghai.FormulaFunctionsdocblock sentence: a mixedDATEDIFF, one day and one instant, reads each argument by its own kind when it counts months or years, the day on the UTC calendar and the instant in the zone the formula runs in. Comment only.generateTimeScaleHeadersandcalculateBarDimensions(not driven), the hour, week and month scales are built the same way, so the choice (an inclusive end, or an axis stretched to the last bucket's end) is a design decision across every scale, and it moves the bar percentages slice 3's gantt pin asserts. Reported below.Why the repair sits in
ObjectCalendar, not in the gridThe grid cannot tell a day from an instant at local midnight, and the calendar's own month-view quick-create writes exactly such an instant into a
datetimefield. Every grid-side repair that makes a day exact also moves those instants, which this slice may not do.ObjectCalendarknows the field's declared type (or, with no schema, the stored value's shape), and a day event can only be dragged in the month grid: the week and day views draw it in their all-day row, which has no drag handlers. So the day event'sdatefields are written from their stored day, and the grid's arithmetic is untouched. The instant-side defect this leaves standing is in the Acceptance notes.Instants are byte-equal to the base
A probe drove 19 moves through
ObjectCalendarin UTC, Los Angeles and Shanghai, against the base source and against this head. The only rows that differ are the four Los Angeles day moves above. The nine instant and mixed rows (datetimespans, a local-midnightdatetimespan, a one-daydatetimeevent, adatestart with adatetimeend,datefields holding instants,datetimefields holding days) are equal in UTC and Los Angeles; in Shanghai five of them were measured equal, and four were not measured there (their grab cell names a day the instant does not fall on in that zone, and they errored the same way on base and head). The pin'sdatetimecontrols hold the same instants on both.Evidence
OBJECTUI_DATE_ZONE_CHILD=1,ObjectCalendar.tsxchecked out from the base:Tests 4 failed | 84 passed (88), the four red rows exactly the four day moves named above ("end": "2026-11-01"for"2026-11-02","start": "2026-11-01"for"2026-11-02","start": "2026-10-29"for"2026-10-30","end": "2026-03-07"for"2026-03-08"). Restored bygit checkout HEAD --, blob equal to HEAD,git diff HEADempty. Head:Tests 88 passed (88).ablation-replace.mjs, each anchor hit once, each blob changed and restored to HEAD:false:6 failed | 30 passed (36), the no-schema move and end-drag rows in all three zones;toISOString():33 failed | 31 passed (64)over the end-date and DST pins;false:9 failed | 15 passed (24), the drag writes and the zoned drop in all three zones;6 failed | 18 passed (24), the Los Angeles and Shanghai reads and zoned cases.4dddfff0b, each under the shared verify lock:packages/plugin-calendar/Test Files 54 passed (54),Tests 363 passed | 70 skipped (433);packages/plugin-gantt/Test Files 86 passed (86),Tests 630 passed | 43 skipped (673); the zone-pin driverTests 23 passed (23);packages/types/Test Files 270 passed (270),Tests 5977 passed (5977);packages/core/Test Files 184 passed (184),Tests 3658 passed | 27 skipped (3685); the 38 test files outside those packages that name a touched file or a touched plugin's source directoryTest Files 34 passed | 4 skipped (38)(the four skipped are other slices' zone pins, which run in the driver's child); the 48scripts/__tests__files that mention.changesetor enumerate files (ls-files, a glob, a directory walk)Test Files 48 passed (48),Tests 1899 passed (1899).type-checkfor plugin-calendar, plugin-gantt, types and core, each echoingtype-check$ tsc --noEmit ... && tsc -p tsconfig.test.jsonandDone;tsc -p tsconfig.test.json --listFilesincludes all three new pins.check-changeset-presence(8 source file(s) of 4 released package(s) changed, and this change declares 1 changeset(s)),-no-major,-fixed,-overwrite,-claims(report-only; no pending changeset repeats the "real instants" sentence),check-pending-changeset-literals,check-control-bytes,check-new-cross-file-line-citations(0 new citation(s)),check-test-path-roots, the threecheck-vi-mock-*,check-unreferenced-sources: all exit 0. A control-byte scan of the changed files finds none.check-governed-queue-guard --testover the ten paths: NOT GOVERNED.--no-inline-config --format jsonover the nine changed code files (nine results): 0 errors; each modified file's warnings equal its base blob's (ObjectCalendar.tsx31,GanttView.tsx12,objectql.ts34,FormulaFunctions.ts26); the new files andtzShift.ts0. The config sets noparserOptions.projectorprojectService, so linting is not type-aware and this diff cannot move an untouched file's verdict. Repo-wide lint is CI's.registerLazy, outside the console's eager closure.Bundle Analysisis read from CI.ObjectCalendar.tsxand one intypes/src/objectql.ts; every hunk here stays at least 16 lines clear of them, andgit merge-treeof this head with that PR's head is clean.Acceptance notes
Recorded here, not filed by the dev; the seat decides.
timeZone, a viewer whose own zone keeps DST, and a chart zone with a different DST,makeTzShift's round trip puts a day's midnight at 23:00 of the day before on a DST day: anAmerica/Los_Angelesviewer of anAmerica/New_Yorkchart sees a stored2026-03-08drawn from 23:00 on March 7th, and a drop onto March 8th writes2026-03-07; the same with anEurope/Berlinchart on March 29th. A Shanghai viewer of a New York chart is exact on those days. Measured throughObjectGanttwith theGanttViewprobe. The repair is not the family's shared step (it is the shim's inverse, for days only), so it is not made here; no named producer sets a gantttimeZone.datetimeevent at local midnight moved across a DST change in the month grid lands in the cell before the drop (instant path, unchanged here). Measured in Los Angeles: adatetimespan starting2026-11-01T07:00:00.000Z(local midnight), grabbed on November 2nd and dropped on November 3rd, writes its start2026-11-02T07:00:00.000Z, which is 23:00 on November 1st. The calendar's own month-view quick-create writes such local-midnight instants into adatetimefield. Repairing it moves instants, so it needs its own ruling.timeline gantt header column bar percentage,generateTimeScaleHeaders calculateBarDimensions,day scale misaligned.packages/spec/src/ui/view.zod.ts,GanttConfigtimeZonedescribe, which@object-ui/types' zod mirror reuses, still says "persisted data stays real instants"..changeset/10866-calendar-gantt-date-only-days.mdsays a zoned chart's drop "writes the day of the chart's calendar that the bar was dropped on"; the first note above measures a case where it writes the day before. Not edited here: it is another slice's release declaration, andcheck-changeset-overwritereports a change that modifies one. It publishes at the next release.Commits carry the model-free trailer pair only.
Generated by Claude Code