Skip to content

Commit 38bce2f

Browse files
committed
fix(spec): correct GanttConfig.timeZone describe — date fields don't persist as real instants
The `GanttConfig` `timeZone` member's `.describe()` said "persisted data stays real instants" unconditionally. That is false for a `Field.date` column: per the spec's own storage rule (`temporalStorageForm` / ADR-0053), a gantt drop on a `date` field writes the calendar day it landed on as a timezone-naive `YYYY-MM-DD`, while a `datetime` field still writes the real instant. Only the false clause is replaced with the true wording; the rest of the describe is unchanged. Claude-Session: https://claude.ai/code/session_014EJ1ED8X4MMrT18BhVx4tx Co-authored-by: Claude <noreply@anthropic.com>
1 parent b810ddb commit 38bce2f

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
fix(spec): correct `GanttConfig.timeZone`'s describe — persisted gantt drops on a `date` field are not "real instants" (#20466)
6+
7+
Clause-②: no
8+
9+
The `GanttConfig` `timeZone` member's `.describe()` said "persisted data stays real
10+
instants" for every field. That is false for a `Field.date` column: per the spec's own
11+
storage rule (`temporalStorageForm` / ADR-0053), a gantt drop on a `date` field writes the
12+
calendar day it landed on, as a timezone-naive `YYYY-MM-DD`, while a `datetime` field
13+
still writes the real instant. Only the false clause is replaced — "a datetime value is
14+
still written as the real instant, and a date value as the calendar day it was dropped on
15+
in this zone's calendar (`YYYY-MM-DD`)" — the rest of the describe, and every other
16+
member, is unchanged.
17+
18+
No key moves and no verdict moves: this corrects a published describe's prose to match
19+
the contract it already had, it does not add, remove or re-scope anything authorable. The
20+
JSON Schema and reference docs regenerate from the corrected source.

‎packages/spec/src/ui/view.zod.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,7 @@ export const GanttConfigSchema = lazySchema(() => strictObject({
19171917
summaryExtent: z.enum(['children', 'self']).optional().describe("How a summary bar's span is computed. 'children' (renderer default) rolls the bar up from its children — min start, max end, duration-weighted progress — and ignores the record's own dates; 'self' renders the record's OWN start, end and progress and falls back to rollup only for records without dates (use it when the parent's schedule is authoritative, e.g. a shift plan whose work-order children are locked history)"),
19181918
defaultCollapsedDepth: z.number().int().min(0).optional().describe('Auto-collapse tree nodes at or below this 0-indexed depth on first render (roots are depth 0): every node at that depth or deeper that has children starts folded; the user can still expand them. Omit to start fully expanded'),
19191919
dependencyTypes: z.boolean().optional().describe('Whether the backing store persists dependency link TYPES (fs, ss, ff, sf); renderer default true. Set false when dependencies are bare predecessor ids: the link menu hides the type switcher (a switch would be silently reverted on refetch) and drag-created links are always finish-to-start'),
1920-
timeZone: z.string().optional().describe("Business time zone, an IANA name such as 'Asia/Shanghai': the chart's calendar — shift bands, day columns, snapping, the today line, date labels — renders in this zone's wall time for every viewer instead of the browser's zone; persisted data stays real instants. An invalid name falls back to the browser zone with a console warning"),
1920+
timeZone: z.string().optional().describe("Business time zone, an IANA name such as 'Asia/Shanghai': the chart's calendar — shift bands, day columns, snapping, the today line, date labels — renders in this zone's wall time for every viewer instead of the browser's zone; a datetime value is still written as the real instant, and a date value as the calendar day it was dropped on in this zone's calendar (YYYY-MM-DD). An invalid name falls back to the browser zone with a console warning"),
19211921
exportFileName: z.string().optional().describe("Base name for exported PNG and PDF files (e.g. the view's display label — the host's view schema often reaches the renderer stripped of label); falls back to the object schema label, then the object API name. A timestamp suffix is always appended"),
19221922
interactions: strictObject({
19231923
surface: 'this gantt interactions block',

0 commit comments

Comments
 (0)