Repository navigation
fix(plugin-gantt,core,plugin-timeline): both gantt surfaces read a date-only end inclusively through one core rule, and a drag writes the same day back (objectui#11141) - #11155
Conversation
…ely through one core helper, and write a dragged end back as the day it runs through - core: `toDisplayEndDate` (a date-only end steps to the next local midnight) and its exact inverse `toInclusiveEndDay`, beside `toDisplayDate`. - plugin-timeline: `readGanttBarEnd` reads a string end through the helper instead of stepping a day itself. - plugin-gantt: `ObjectGantt` reads `end` / `baselineEnd` through the helper (`readTaskEnd`) and writes a date-only end back through the inverse; `GanttView` names an end by the day it runs through in the task list, the tooltip, a drag's preview and the inline editor. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
… write and the catalog plans; re-derive the end pins from the rule - core: `toDisplayEndDate` starts the next day at its own start, so a day whose midnight does not exist no longer ends an hour late; pins in real zones (Los Angeles DST days, Shanghai, Santiago's skipped midnight). - plugin-gantt: the three catalog plans draw each driving successor where its predecessor ends (one authored leap-day gap named); a drag round trip through the real view keeps a stored date-only end; the view names and edits an end by the day it runs through. - The 10866 zone pins, `ObjectGantt.test`'s drag mock and the display locale fixture are re-derived from the rule; the zoned pin gains a chart zone whose clock skips a midnight. - i18n: the machine-locale census drops the end-seed exemption; the end input is seeded through `toDateInputValue` now. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
…nd bar's start, so the width case can fail Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
…ge and on `GanttTask.end`; changeset Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
|
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: Inputs: card #11141 (body; triage Check-runs on the head: 43 latest runs, all completed: 40 success, 3 skipped ( ① Derived judgmentsEvery accept-set and public-surface change the diff implies, each judged:
② Semver levelChangeset It counts. The review's rule is the package's exports map, and both helpers sit on core's one Clause-②: yes (widening). The Also in the changeset prose, which is a review surface and publishes verbatim into the CHANGELOG: the sentence "A day whose next midnight does not exist in the viewer's zone now ends at that next day's first hour. The timeline used to end such a day an hour later." names the wrong day. A day whose NEXT midnight is skipped (Santiago ③ Boundary flagsDev flags (os-dev-report
Out-of-scope notes, each answered:
Findings:
Implemented-by: VERDICT: FAIL Generated by Claude Code |
…rts, and name the day whose own midnight is skipped Contract review: the two value exports widen core's published entry, as the date-only parse step's changeset did; and the skipped-midnight sentence now names the day that changed (the one whose own midnight is skipped), not the day before it. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
✅ 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: Round 2 on PR #11155 (card #11141), after the round-1 record The delta. Check-runs on the head: 16 of the 43 latest runs were still in progress when this review started; polled in the foreground until every run had completed (about ten minutes). Final: 43 latest runs, all completed, 40 success, 3 skipped ( ① Derived judgmentsEvery accept-set and public-surface change the net diff implies, each judged:
② Semver levelRe-judged on the new head.
③ Boundary flagsDev flags (os-dev-report
Out-of-scope notes, each answered as in round 1:
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #11141
Clause-②: no
What was wrong
ObjectGanttread a stored end exactly like a start. A date-only2024-01-15became January 15th's local midnight, which is the START of the day.GanttViewdraws and schedules half-open spans[start, end), so every bar stopped one day short, and a successor starting the next day stood one day after it. The schema catalog's own three plans draw that way. The timeline's gantt has drawn the same authored end through its day since objectui#11112's ruling (PR objectui#11138).Measured on this branch by ablating the new end read back to the start-of-day read (ablation A below):
1→2: expected 1 to be close to +0);expected 5 to be close to 6).What this changes
Triage 5898713114 set the direction: one rule, one place, and the write-back is the exact inverse.
@object-ui/core,utils/date-display.ts: the rule.toDisplayEndDate(value)reads a value astoDisplayDatedoes. Then, for a date-only value only (isRealCalendarDate), it moves to the start of the next calendar day.toInclusiveEndDay(end)is its exact inverse: local midnight of the day that holds the last instant beforeend.index.tsdoes not change: itsexport *already covers the file.plugin-timeline:readGanttBarEndreads a string end through the helper. It no longer steps a day itself. A number or aDatekeepsreadGanttDate's own read. The timeline's pins are unchanged and green.plugin-gantt,ObjectGantt: the read and the write.readTaskEndreadsendandbaselineEndthrough the helper, then takes the same chart-zone step a start takes (invertTo).toStoredDateValuewrites a date-only END throughtoInclusiveEndDay, so a bar ending on a day's midnight writes the day before it.2024-01-15reads as the 16th's midnight and writes back as the 15th.plugin-gantt,GanttView: the view names the day a bar runs through. This change was measured as necessary. With the read changed and the view left alone (ablation C below):1/16for a stored2024-01-15, and the tooltip readJan 1 → Jan 16 · 15d;2024-01-16, so typing the 20th would store the 19th.The End column, the row date line, the tooltip, both drag previews and the inline editor's seed now name
endDayOf(start, end):toInclusiveEndDay;The editor commits a typed end through
toDisplayEndDate, so Enter on an untouched row commits the end the row already had.styleFor, the drag arithmetic andscheduling.tsare unchanged. They already treatendas the exclusive instant, so a successor starting01-16after an inclusive01-15end now has no gap.ObjectGantt's pinned range. WithautoZoomToFilter: false,lockedRange.endis now the last instant any bar covers, where it used to be the largest end.GanttViewrunsendDatethrough the end of its day, so the largest end added an empty day column. Measured:ObjectGantt.quickfilter's pinned range read2024-03-21for a plan whose last day is2024-03-20.A chart zone whose clock skips a midnight. The order's zone-2 assumption 3 (the helper composes with the zone inversion) holds for Los Angeles, Berlin and Shanghai viewers of New York, Shanghai and Los Angeles charts.
America/Santiagosteps from 00:00 to 01:00 on 2026-09-06.invertTofinds no instant drawn at that midnight. It hands over the instant drawn at 01:00 on the next day, which the inverse names as the next day, so a read and a write moved the stored end by a day.readTaskEndnow ends such a bar at the last instant drawn on its own day. Pinned in the forks-driven zone pin.toDisplayEndDategoes back to the start of the day after the step.setDatekeeps that hour.setHours(0, 0, 0, 0), the day after it started an hour late and named itself back.DAY_AXIS.step) behaved the same way. It now ends such a day at the next midnight.Docs and changeset.
content/docs/plugins/plugin-gantt.mdxstates the inclusive end (AGENTS.md section 5, rule 2).GanttTask.enddocuments the exclusive instant.core,plugin-ganttandplugin-timeline, patch.Pins
New pins
ObjectGantt.catalogPlans-11141: the three catalog plans are read from disk as authored and drawn by the realObjectGanttandGanttView.ObjectGantt.endRoundTrip-11141: real pointer drags through the real view.datetimecontrol keeps its end instant to the millisecond.GanttView.inclusiveEnd-11141: the End cell, the sublabel, the tooltip, the drag preview, and the inline editor's seed and commit. The controls are an end inside a day and a zero-length span.date-display.inclusiveEnd-11141(core):Re-derived from the rule
These are not weakened: every case still reads the day, and only the end's instant moved.
ObjectGantt.noSchemaZone-10866:10-05..10-09reads through the end of10-09, to the 10th's midnight;10-07/10-11.ObjectGantt.dateOnlyZone-10866andObjectGantt.zonedDstDay-10866are re-derived the same way.ObjectGantt.test's view mock emits the 6th's midnight for a bar dropped onto the 1st through the 5th.GanttView.displayLocale-10668's fixture ends at the 14th's midnight, so its End cell still reads the 13th.machineLocaleCensus-9909drops the end-seed exemption. The seed goes throughtoDateInputValuenow, with no locale literal.Ablations
These are one-shot checks, and no permanent test file was kept. Each was restored through
ablation-replace.mjs, which proved that the blob hash equals HEAD and thatgit diff HEADis empty.readTaskEndreads the end withtoDisplayDate, the start-of-day read: 17 failed, 13 passed.1→2: expected 1 to be close to +0.expected 5 to be close to 6.toStoredDateValuewrites the end withouttoInclusiveEndDay: 13 failed, 41 passed. The round trip writes the day after.endDayOfreturnsendunchanged: 8 failed, 11 passed. The End cell reads'1/16'where'1/15'is expected, the tooltip readsJan 1 → Jan 16, and the editor is seeded with2024-01-16.setHours(0, 0, 0, 0)is removed fromtoDisplayEndDate: the 2 Santiago core cases are red.lockedRangetakes the largest end: the pinned range reads2024-03-21.toDisplayEndDate: 14 failed, 9 passed. This one core line reds BOTH surfaces: the timeline'sTimelineGantt.inclusiveEnd-11112pins and the gantt catalog pins. It is the one rule in one place.toInclusiveEndDay('2024-01-01')was planted inObjectGantt.tsx, andtsc --noEmitreported TS2345. So the type-check reads the rebuilt core.d.ts. Restored.Local verification at cf8d5aa
The PR adds no commit after this one.
pnpm exec vitest run --maxWorkers=2 packages/plugin-gantt/ packages/plugin-timeline/:pnpm exec vitest run --maxWorkers=2overpackages/core/,packages/i18n/,examples/schema-catalog/test/catalog-gallery-render.test.tsx,packages/app-shell/src/views/ObjectView.ganttBinding-7070.test.tsxandscripts/__tests__/date-only-zone-pins-10183.test.ts:core,plugin-gantt,plugin-timelineandi18nall exit 0. It ran afterpnpm --workspace-concurrency=2 --filter '@object-ui/plugin-gantt^...' --filter '@object-ui/plugin-timeline^...' run build, which built the 14-package dependency closure.--no-inline-configon the 14 changed TS files, with the file count read from--format json:eslint.config.jsturns on no type-aware linting (noparserOptions.projectorprojectService), so this diff cannot change the verdict on an untouched file.check:new-line-citations,check:control-bytes,check:changeset-claims,check:pending-changeset-literals,check:test-path-roots,check:doc-fences,check:esm-specifiers,check:vi-mock-specifiers,check:vi-mock-inherit,check:doc-example-ids, andnode scripts/check-changeset-presence.mjs.check-governed-queue-guard --testover the changed paths answers NOT GOVERNED.check:doc-snippetsexited 2 (PRECONDITION NOT MET): it needs a 34-package build. The docs edit is prose with no code fence.check:readme-exportsreported a collapsed population because 23 packages are not built. No README is touched.Acceptance notes
type: 'milestone'still draws as a milestone. The timeline's gantt has drawn such a task one day wide since objectui#11112.GanttViewis an exported component. An embedder that passes it aDateend directly now sees a local-midnight end named as the day before, which is the day its bar already stopped at. The bar geometry is unchanged. The changeset says so.2024-02-28and Testing starts2024-03-01. 2024 is a leap year, so February 29th lies between them, and the pin measures exactly one day there. The example is not re-authored, as the order requires. In the sprint plan, edge 3→5 has six days of slack, but it is not the edge that drives task 5.localDayStart. For a day whose midnight is skipped, that lands on 01:00, andsetDatekeeps the hour. So, for a viewer in such a zone, the day columns after that day would start at 01:00. This is inferred from reading the code, and no card was filed.packages/i18n/src/__tests__/machineLocaleCensus-9909.test.ts: a pin that readsGanttView.tsx's text, made stale by the seed change.content/docs/plugins/plugin-gantt.mdx: AGENTS.md section 5, rule 2.scheduling.tsis not touched.Generated by Claude Code