Filed unassigned while implementing objectui#6770 (the null gantt date). Deliberately left out of that card — see "why this is not the same input class" below.
Measured on c6732825d with a throwaway probe, one row item, i.e. with objectui#6759's guards in the tree and before objectui#6770's change:
CASE-ZERO-NUM items: [{ label: 'R', items: [{ title: 'T', startDate: '2024-01-01', endDate: 0 }] }]
alert: none
axis: 649 month buckets, "Jan 1970" … "Jan 2024"
bars: ["left: 100%; width: -100%;"]
Identical, byte for byte, to the reading objectui#6770 was filed for. new Date(0), new Date(false) and new Date([]) are all the epoch, so every one of them passes the parse guard and anchors the axis in 1970 with no error, no diagnostic and no console warning.
Why this is NOT the same input class as objectui#6770
objectui#6770 refuses null on the ground that null is an absence spelling — what a record mapping hands you for an unset field — which objectui#6759 already refuses when it is spelled undefined. Its guard is value === null and deliberately nothing wider, because:
0 is a legitimate epoch timestamp. startDate: 1704067200000 renders 2024 correctly today, and there is no way to tell 0 apart from an author who genuinely means 1970-01-01.
false / [] are neither timestamps nor absence spellings; refusing them means a type rule ("a gantt date must be a string, a number or a Date"), which is wider than any of the three cards so far and would have to be adjudicated as such.
So this is a policy question, not a mechanical fix, and it is a different question from the one objectui#6770 answered.
The three arms, as they look from here
- A type rule. Refuse anything that is not a string, a finite number or a
Date. Catches false / [] / {} and leaves 0 rendering as 1970 — which is arguably correct, since 0 really is a date in that encoding.
- Refuse
0 too, on the ground that a 0 in a date field is almost always an unset integer column rather than an author meaning 1970. Costs the ability to author the epoch, which nobody plausibly wants but which is currently legal.
- Leave it.
false / [] in a date field are not plausible authored input, and 0 is genuinely ambiguous. The 1970 axis stays reachable through a door narrower than the one objectui#6770 closed.
Where it lives
packages/plugin-timeline/src/renderer.tsx — findUnusableGanttDate, the isUnusable predicate. Line numbers deliberately omitted: re-derive them on your base.
Filed unassigned while implementing objectui#6770 (the
nullgantt date). Deliberately left out of that card — see "why this is not the same input class" below.Measured on
c6732825dwith a throwaway probe, one row item, i.e. with objectui#6759's guards in the tree and before objectui#6770's change:Identical, byte for byte, to the reading objectui#6770 was filed for.
new Date(0),new Date(false)andnew Date([])are all the epoch, so every one of them passes the parse guard and anchors the axis in 1970 with no error, no diagnostic and no console warning.Why this is NOT the same input class as objectui#6770
objectui#6770 refuses
nullon the ground thatnullis an absence spelling — what a record mapping hands you for an unset field — which objectui#6759 already refuses when it is spelledundefined. Its guard isvalue === nulland deliberately nothing wider, because:0is a legitimate epoch timestamp.startDate: 1704067200000renders 2024 correctly today, and there is no way to tell0apart from an author who genuinely means 1970-01-01.false/[]are neither timestamps nor absence spellings; refusing them means a type rule ("a gantt date must be a string, a number or a Date"), which is wider than any of the three cards so far and would have to be adjudicated as such.So this is a policy question, not a mechanical fix, and it is a different question from the one objectui#6770 answered.
The three arms, as they look from here
Date. Catchesfalse/[]/{}and leaves0rendering as 1970 — which is arguably correct, since0really is a date in that encoding.0too, on the ground that a0in a date field is almost always an unset integer column rather than an author meaning 1970. Costs the ability to author the epoch, which nobody plausibly wants but which is currently legal.false/[]in a date field are not plausible authored input, and0is genuinely ambiguous. The 1970 axis stays reachable through a door narrower than the one objectui#6770 closed.Where it lives
packages/plugin-timeline/src/renderer.tsx—findUnusableGanttDate, theisUnusablepredicate. Line numbers deliberately omitted: re-derive them on your base.