@flamingo-stack/openframe-frontend-core 0.0.644-2208.6339.1 → 0.0.644

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/{chunk-INMRSV3L.js → chunk-27RD5XTP.js} +3 -3
  2. package/dist/{chunk-PEFFPDWJ.js → chunk-3DGRXC74.js} +3 -3
  3. package/dist/{chunk-YFFHAH5V.cjs → chunk-3UBT2OIX.cjs} +20 -20
  4. package/dist/{chunk-YFFHAH5V.cjs.map → chunk-3UBT2OIX.cjs.map} +1 -1
  5. package/dist/{chunk-JZJP2E7A.js → chunk-4WVWRFGP.js} +6 -6
  6. package/dist/{chunk-XLFZATGH.cjs → chunk-65EVGKFV.cjs} +7 -7
  7. package/dist/{chunk-XLFZATGH.cjs.map → chunk-65EVGKFV.cjs.map} +1 -1
  8. package/dist/{chunk-SDHZ5X4S.js → chunk-7Q5XXPCB.js} +6 -6
  9. package/dist/{chunk-MYZU76SO.cjs → chunk-7R2DIGG4.cjs} +2 -6
  10. package/dist/chunk-7R2DIGG4.cjs.map +1 -0
  11. package/dist/{chunk-CT4IE4XG.js → chunk-B3Z3RJRW.js} +2 -2
  12. package/dist/{chunk-DE6NQDGP.cjs → chunk-B5IFXCRF.cjs} +22 -22
  13. package/dist/{chunk-DE6NQDGP.cjs.map → chunk-B5IFXCRF.cjs.map} +1 -1
  14. package/dist/{chunk-ABKOVXCY.cjs → chunk-C5Y5T6GC.cjs} +15 -15
  15. package/dist/{chunk-ABKOVXCY.cjs.map → chunk-C5Y5T6GC.cjs.map} +1 -1
  16. package/dist/{chunk-IMURE6LF.cjs → chunk-CBXZSTAG.cjs} +150 -150
  17. package/dist/{chunk-IMURE6LF.cjs.map → chunk-CBXZSTAG.cjs.map} +1 -1
  18. package/dist/{chunk-X2A3P4U4.cjs → chunk-DCCY54LU.cjs} +6 -6
  19. package/dist/{chunk-X2A3P4U4.cjs.map → chunk-DCCY54LU.cjs.map} +1 -1
  20. package/dist/{chunk-NJTNG2VQ.cjs → chunk-FAD5WURS.cjs} +81 -81
  21. package/dist/{chunk-NJTNG2VQ.cjs.map → chunk-FAD5WURS.cjs.map} +1 -1
  22. package/dist/{chunk-F7YD5S7X.js → chunk-FOSIR4QF.js} +2 -6
  23. package/dist/chunk-FOSIR4QF.js.map +1 -0
  24. package/dist/{chunk-RU4GPPAA.js → chunk-HOGOQA2X.js} +2 -2
  25. package/dist/{chunk-JD6K4XQF.js → chunk-HPWLIYRL.js} +3 -3
  26. package/dist/{chunk-PEF3T7LD.js → chunk-I57XLISO.js} +2 -2
  27. package/dist/{chunk-I6HVMVUO.cjs → chunk-IIXB5REN.cjs} +3 -3
  28. package/dist/{chunk-I6HVMVUO.cjs.map → chunk-IIXB5REN.cjs.map} +1 -1
  29. package/dist/{chunk-6MPXU5OA.js → chunk-IXD6SHQ6.js} +4 -4
  30. package/dist/{chunk-WYFLKPRS.cjs → chunk-LZYPSDFE.cjs} +59 -59
  31. package/dist/{chunk-WYFLKPRS.cjs.map → chunk-LZYPSDFE.cjs.map} +1 -1
  32. package/dist/{chunk-JPVG4T6I.cjs → chunk-MCQAOIUK.cjs} +28 -28
  33. package/dist/{chunk-JPVG4T6I.cjs.map → chunk-MCQAOIUK.cjs.map} +1 -1
  34. package/dist/{chunk-L2EHOIWY.js → chunk-MRIOYSXH.js} +3 -3
  35. package/dist/{chunk-Y7SKSUMR.cjs → chunk-OMSUWB6A.cjs} +29 -29
  36. package/dist/{chunk-Y7SKSUMR.cjs.map → chunk-OMSUWB6A.cjs.map} +1 -1
  37. package/dist/{chunk-IWKJA3QD.cjs → chunk-OVXYX47B.cjs} +10 -10
  38. package/dist/{chunk-IWKJA3QD.cjs.map → chunk-OVXYX47B.cjs.map} +1 -1
  39. package/dist/{chunk-BEFZJUF5.js → chunk-PFV4DAX5.js} +4 -4
  40. package/dist/{chunk-G5VZH2A2.cjs → chunk-RB6L5EGM.cjs} +203 -203
  41. package/dist/{chunk-G5VZH2A2.cjs.map → chunk-RB6L5EGM.cjs.map} +1 -1
  42. package/dist/{chunk-JKD4BFF4.cjs → chunk-RFFF2EYD.cjs} +11 -11
  43. package/dist/{chunk-JKD4BFF4.cjs.map → chunk-RFFF2EYD.cjs.map} +1 -1
  44. package/dist/{chunk-ZYZWFA4B.js → chunk-RNMGKAS6.js} +7 -7
  45. package/dist/{chunk-ZAAHH6UR.cjs → chunk-RWURXICE.cjs} +32 -32
  46. package/dist/{chunk-ZAAHH6UR.cjs.map → chunk-RWURXICE.cjs.map} +1 -1
  47. package/dist/{chunk-Z4WKQUPS.js → chunk-S2KMNFFN.js} +3 -3
  48. package/dist/{chunk-YB7MDORW.js → chunk-SKABQX44.js} +3 -3
  49. package/dist/{chunk-HPQKXVCZ.cjs → chunk-TGUA3C4U.cjs} +5 -5
  50. package/dist/{chunk-HPQKXVCZ.cjs.map → chunk-TGUA3C4U.cjs.map} +1 -1
  51. package/dist/{chunk-VWZQEE4M.js → chunk-TTVOBWAH.js} +3 -3
  52. package/dist/{chunk-FHEUC6IW.js → chunk-UEXIMEVU.js} +5 -5
  53. package/dist/{chunk-K3HL54EF.cjs → chunk-UKV52KAP.cjs} +33 -33
  54. package/dist/{chunk-K3HL54EF.cjs.map → chunk-UKV52KAP.cjs.map} +1 -1
  55. package/dist/{chunk-DMTVB6VV.js → chunk-VE52MSYC.js} +5 -5
  56. package/dist/components/case-studies/index.cjs +16 -16
  57. package/dist/components/case-studies/index.js +4 -4
  58. package/dist/components/chat/index.cjs +3 -3
  59. package/dist/components/chat/index.js +2 -2
  60. package/dist/components/chat/types/entities/program-types.d.ts +2 -23
  61. package/dist/components/chat/types/entities/program-types.d.ts.map +1 -1
  62. package/dist/components/contact/index.cjs +5 -5
  63. package/dist/components/contact/index.js +4 -4
  64. package/dist/components/docs/index.cjs +8 -8
  65. package/dist/components/docs/index.js +7 -7
  66. package/dist/components/embeds/index.cjs +5 -5
  67. package/dist/components/embeds/index.js +4 -4
  68. package/dist/components/faq/index.cjs +5 -5
  69. package/dist/components/faq/index.js +4 -4
  70. package/dist/components/features/index.cjs +4 -4
  71. package/dist/components/features/index.js +3 -3
  72. package/dist/components/help-center-pages/index.cjs +24 -24
  73. package/dist/components/help-center-pages/index.js +15 -15
  74. package/dist/components/index.cjs +53 -53
  75. package/dist/components/index.js +15 -15
  76. package/dist/components/meeting-scheduler/index.cjs +40 -40
  77. package/dist/components/meeting-scheduler/index.js +3 -3
  78. package/dist/components/navigation/index.cjs +7 -7
  79. package/dist/components/navigation/index.js +6 -6
  80. package/dist/components/onboarding-guides/index.cjs +7 -7
  81. package/dist/components/onboarding-guides/index.js +6 -6
  82. package/dist/components/related-content/index.cjs +3 -3
  83. package/dist/components/related-content/index.js +2 -2
  84. package/dist/components/tickets/index.cjs +8 -8
  85. package/dist/components/tickets/index.js +7 -7
  86. package/dist/components/ui/index.cjs +4 -4
  87. package/dist/components/ui/index.js +3 -3
  88. package/dist/index.cjs +9 -9
  89. package/dist/index.js +7 -7
  90. package/dist/utils/format.d.ts +10 -17
  91. package/dist/utils/format.d.ts.map +1 -1
  92. package/dist/utils/index.cjs +1 -5
  93. package/dist/utils/index.cjs.map +1 -1
  94. package/dist/utils/index.js +1 -5
  95. package/dist/utils/index.js.map +1 -1
  96. package/dist/utils/program-instant.d.ts +9 -35
  97. package/dist/utils/program-instant.d.ts.map +1 -1
  98. package/package.json +1 -1
  99. package/src/components/chat/types/entities/program-types.ts +2 -23
  100. package/src/utils/__tests__/format-program-dates.test.ts +2 -34
  101. package/src/utils/__tests__/program-instant.test.ts +1 -46
  102. package/src/utils/format.ts +12 -23
  103. package/src/utils/program-instant.ts +13 -44
  104. package/dist/chunk-F7YD5S7X.js.map +0 -1
  105. package/dist/chunk-MYZU76SO.cjs.map +0 -1
  106. /package/dist/{chunk-INMRSV3L.js.map → chunk-27RD5XTP.js.map} +0 -0
  107. /package/dist/{chunk-PEFFPDWJ.js.map → chunk-3DGRXC74.js.map} +0 -0
  108. /package/dist/{chunk-JZJP2E7A.js.map → chunk-4WVWRFGP.js.map} +0 -0
  109. /package/dist/{chunk-SDHZ5X4S.js.map → chunk-7Q5XXPCB.js.map} +0 -0
  110. /package/dist/{chunk-CT4IE4XG.js.map → chunk-B3Z3RJRW.js.map} +0 -0
  111. /package/dist/{chunk-RU4GPPAA.js.map → chunk-HOGOQA2X.js.map} +0 -0
  112. /package/dist/{chunk-JD6K4XQF.js.map → chunk-HPWLIYRL.js.map} +0 -0
  113. /package/dist/{chunk-PEF3T7LD.js.map → chunk-I57XLISO.js.map} +0 -0
  114. /package/dist/{chunk-6MPXU5OA.js.map → chunk-IXD6SHQ6.js.map} +0 -0
  115. /package/dist/{chunk-L2EHOIWY.js.map → chunk-MRIOYSXH.js.map} +0 -0
  116. /package/dist/{chunk-BEFZJUF5.js.map → chunk-PFV4DAX5.js.map} +0 -0
  117. /package/dist/{chunk-ZYZWFA4B.js.map → chunk-RNMGKAS6.js.map} +0 -0
  118. /package/dist/{chunk-Z4WKQUPS.js.map → chunk-S2KMNFFN.js.map} +0 -0
  119. /package/dist/{chunk-YB7MDORW.js.map → chunk-SKABQX44.js.map} +0 -0
  120. /package/dist/{chunk-VWZQEE4M.js.map → chunk-TTVOBWAH.js.map} +0 -0
  121. /package/dist/{chunk-FHEUC6IW.js.map → chunk-UEXIMEVU.js.map} +0 -0
  122. /package/dist/{chunk-DMTVB6VV.js.map → chunk-VE52MSYC.js.map} +0 -0
@@ -21,34 +21,16 @@
21
21
  *
22
22
  * THE RULE:
23
23
  *
24
- * - `item.date` IS the instant to render. The host resolves it once, applying
25
- * any admin display override, and hands the same value to the card, the
26
- * model's context and the API wire. Preferring `start_at` looks like it buys
27
- * intra-card coherence — it does, by disagreeing with everything else.
24
+ * - `item.date` IS the instant to render. The host resolves it once and hands
25
+ * the same value to the card, the model's context and the API wire.
26
+ * Preferring `start_at` looks like it buys intra-card coherence — it does, by
27
+ * disagreeing with everything else.
28
28
  * - `start_at` / `end_at` remain the source for DURATION, which is elapsed time
29
29
  * rather than a display date.
30
- * - A DISPLAY OVERRIDE is a chosen date, not a moment. An admin backdating in a
31
- * `datetime-local` control gets `00:00`, so "show this as March 19" is stored
32
- * at UTC midnight; rendering that in a west-of-UTC zone shows March 18 at
33
- * 8 PM — a day early, at a time nobody chose. Such a value renders UTC-pinned
34
- * with no clock and WITHOUT A ZONE LABEL.
35
30
  *
36
- * The discriminator is "did an override supply this", NOT the value's
37
- * precision. The override column is `timestamptz` and the host normalizes it
38
- * through `toISOString()`, so it is always a full instant — an earlier
39
- * attempt keyed on precision and could therefore never fire.
31
+ * `timezone` here is "the zone this value renders in and may be labelled with".
32
+ * A row that declares none keeps the UTC pin (the React #418 fix).
40
33
  *
41
- * THE ZONE IS NULLED RATHER THAN FLAGGED, deliberately. `timezone` here is "the
42
- * zone this value renders in and may be labelled with", so a day-valued row
43
- * carries none and a consumer CANNOT print `America/New_York` under a clock the
44
- * rule just suppressed. Three surfaces had to remember that gate; two forgot,
45
- * and one of them rendered a bare IANA string under an empty heading. A rule
46
- * enforced by the shape of the data cannot be forgotten by the next call site.
47
- *
48
- * There is deliberately NO escape hatch back to the un-nulled zone. One was
49
- * added ("for the rare consumer that needs it as data") and no consumer ever
50
- * wanted it — an un-nulled copy hanging off the resolved value is just the
51
- * mistake again, one property away.
52
34
  */
53
35
  /** Read a string field off an item type that does not declare it. */
54
36
  export declare const programStr: (value: unknown) => string | null;
@@ -57,12 +39,8 @@ export interface ProgramInstant {
57
39
  * to `utcDate`. */
58
40
  instant: string | null;
59
41
  /** The zone this value RENDERS IN and may be LABELLED with. Null when the row
60
- * declares none, and null when the value is day-valued — see the note above
61
- * on why this is nulled rather than flagged. */
42
+ * declares none. */
62
43
  timezone: string | null;
63
- /** True when an admin display override supplied the value: render the day
64
- * UTC-pinned, with no clock. */
65
- dateOnly: boolean;
66
44
  /** The row's canonical date string, used when there is no zone to render in.
67
45
  * Kept on the resolved value so the UTC fallback is not re-derived (and
68
46
  * re-formatted differently) at each call site. */
@@ -72,16 +50,13 @@ export interface ProgramInstant {
72
50
  * The columns this rule reads. Declared structurally rather than as a
73
51
  * `Record<string, unknown>` so a caller holding a real `BaseProgramItem` can
74
52
  * pass it straight in: while the parameter was a bare record, every one of the
75
- * four call sites wrote `as unknown as Record<string, unknown>`, and a cast at
76
- * every call site is how a producer that forgets to set the flag goes
77
- * unnoticed by the compiler.
53
+ * four call sites wrote `as unknown as Record<string, unknown>`.
78
54
  */
79
55
  export interface ProgramDateFields {
80
56
  date?: unknown;
81
57
  start_at?: unknown;
82
58
  end_at?: unknown;
83
59
  timezone?: unknown;
84
- date_is_display_override?: unknown;
85
60
  }
86
61
  /** Resolve what a program item should render. */
87
62
  export declare function programDateInstant(item: ProgramDateFields): ProgramInstant;
@@ -93,8 +68,7 @@ export declare function programDateInstant(item: ProgramDateFields): ProgramInst
93
68
  * columns in four different shapes (`programStr`, raw reads, `?? null`, and an
94
69
  * `in`-guarded cast), which is the same defect one field-pair down from the one
95
70
  * this module exists to fix. They are read off the row, never off the resolved
96
- * instant, because elapsed time is not a display date: an override moves the
97
- * day shown, and a webinar still runs for 45 minutes.
71
+ * instant, because elapsed time is not a display date.
98
72
  */
99
73
  export declare function webinarTiming(item: ProgramDateFields): {
100
74
  startAt: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"program-instant.d.ts","sourceRoot":"","sources":["../../src/utils/program-instant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAEH,qEAAqE;AACrE,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,MAAM,GAAG,IAA2D,CAAC;AAEjH,MAAM,WAAW,cAAc;IAC7B;wBACoB;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;qDAEiD;IACjD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;qCACiC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB;;uDAEmD;IACn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AQ,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;IAC7C,WAAW,EAAE,CACX,EAAE,EAAE,cAAc,EAClB,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,KAC5E,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,oBAAoB,EAAE,IAAI,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO;eAMxF,cAAc;wBA7BP,MAAM,GAAG,IAAI,KAAK,MAAM;sBA+BxB,cAAc,KAAK;QAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;EAGxF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.644-2208.6339.1",
3
+ "version": "0.0.644",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,13 +13,8 @@
13
13
  * Lifted from `lib/types/program-types.ts` in the hub.
14
14
  *
15
15
  * The pure row→item transform helpers that used to live here are GONE. They
16
- * had no caller in this package or in the host app, and the webinar one
17
- * hand-rolled `display_date_override ?? start_at` — the expression
18
- * `programDateInstant` exists to own — without setting the
19
- * `date_is_display_override` flag it needs, so an overridden webinar built
20
- * through it rendered with the clock and zone label the rule suppresses
21
- * everywhere else. A dead PUBLIC export that contradicts the rule is worse
22
- * than no export. The host app keeps its own transforms, which resolve.
16
+ * had no caller in this package or in the host app. The host app keeps its
17
+ * own transforms, which resolve the date.
23
18
  */
24
19
 
25
20
  import type { ReactNode } from 'react';
@@ -172,22 +167,6 @@ export interface BaseProgramItem {
172
167
  description: string | null;
173
168
  cover_url: string | null; // Primary image
174
169
  date: string; // ISO date string - maps to: start_at, published_at
175
- /**
176
- * True when an admin DISPLAY OVERRIDE supplied `date`, rather than the row's
177
- * own schedule — the flag `programDateInstant` reads to decide that this
178
- * value is a chosen DAY, rendered UTC-pinned with no clock and no zone.
179
- *
180
- * Declared HERE, on the type `ProgramCard` actually consumes, because while
181
- * it lived only in the host app's copy of this interface every consumer had
182
- * to cast past the type to read it — so the compiler could not tell anyone
183
- * when a producer forgot to set it.
184
- *
185
- * NOT the same as "is it a calendar date": the override column is
186
- * `timestamptz` and the host normalizes through `toISOString()`, so an
187
- * override always arrives as a full instant. An earlier attempt keyed off
188
- * value precision and could therefore never fire.
189
- */
190
- date_is_display_override?: boolean;
191
170
  /** The event's IANA zone, when the row declares one. Read through
192
171
  * `programDateInstant`, never directly — see that module on why. */
193
172
  timezone?: string | null;
@@ -3,7 +3,6 @@ import { describe, expect, it } from 'vitest';
3
3
  import {
4
4
  formatDateWithTimezone,
5
5
  formatDurationFromRange,
6
- formatProgramDate,
7
6
  formatTimeWithTimezone,
8
7
  formatWebinarTimeMeta,
9
8
  } from '../format';
@@ -100,8 +99,8 @@ describe('formatDateWithTimezone / formatTimeWithTimezone agree on the zone', ()
100
99
  /**
101
100
  * The webinar time+duration composition. These exact three lines existed in
102
101
  * three surfaces and drifted twice — once so the page read the raw `start_at`
103
- * while the card read the resolved instant, once so two of three applied the
104
- * display-override rule. The rule now lives here, so it is tested here.
102
+ * while the card read the resolved instant, once so the zone label differed.
103
+ * The rule now lives here, so it is tested here.
105
104
  */
106
105
  describe('formatWebinarTimeMeta', () => {
107
106
  const RANGE = { startAt: '2026-03-20T01:18:00Z', endAt: '2026-03-20T02:18:00Z' };
@@ -120,12 +119,6 @@ describe('formatWebinarTimeMeta', () => {
120
119
  );
121
120
  });
122
121
 
123
- it('drops the CLOCK for a display override, keeping the duration', () => {
124
- // A chosen display date has no time of day the admin meant.
125
- const at = programDateInstant({ ...zonedRow, date: '2026-03-19T00:00:00Z', date_is_display_override: true });
126
- expect(formatWebinarTimeMeta(at, RANGE)).toBe('1h');
127
- });
128
-
129
122
  it('leaves no dangling separator when either side is missing', () => {
130
123
  const at = programDateInstant(zonedRow);
131
124
  expect(formatWebinarTimeMeta(at, { ...RANGE, endAt: null })).toBe('9:18 PM');
@@ -153,28 +146,3 @@ describe('formatWebinarTimeMeta', () => {
153
146
  expect(formatWebinarTimeMeta(at, { ...RANGE, withZoneLabel: true })).toBe('1:18 AM UTC · 1h');
154
147
  });
155
148
  });
156
-
157
- describe('a day-valued row leaves nothing for a consumer to mislabel', () => {
158
- // The worst shape this rule can produce, and the one three surfaces rendered:
159
- // an override supplies the day (so no clock), `end_at` is null (so no
160
- // duration), and the composition is EMPTY — beside which two of the three
161
- // surfaces still printed the row's bare IANA zone, captioning nothing.
162
- //
163
- // `end_at` being null is not hypothetical: the Livestorm ingest guard nulls
164
- // it on an inverted range, which is exactly the corrupt-row case that guard
165
- // was added for.
166
- it('empty meta and no zone, so the slot renders nothing at all', () => {
167
- const at = programDateInstant({
168
- date: '2026-03-19T00:00:00.000Z',
169
- start_at: '2026-03-20T01:18:00.000Z',
170
- timezone: 'America/New_York',
171
- date_is_display_override: true,
172
- });
173
- expect(at.timezone).toBeNull();
174
- expect(formatWebinarTimeMeta(at, { startAt: '2026-03-20T01:18:00.000Z', endAt: null, withZoneLabel: true })).toBe(
175
- '',
176
- );
177
- // ...while the DATE is still stated, and states the day the admin chose.
178
- expect(formatProgramDate(at, 'weekday')).toBe('Thursday, March 19');
179
- });
180
- });
@@ -32,8 +32,7 @@ describe('programDateInstant', () => {
32
32
  expect(formatTimeWithTimezone(r.instant, r.timezone)).toBe('9:18 PM');
33
33
  });
34
34
 
35
- it('prefers item.date, so an admin display override moves the card', () => {
36
- // item.date is the host-resolved instant with the override already applied.
35
+ it('prefers item.date, the host-resolved instant', () => {
37
36
  const r = programDateInstant({ ...zoned, date: '2026-02-09T15:00:00.000Z' });
38
37
  expect(r.instant).toBe('2026-02-09T15:00:00.000Z');
39
38
  });
@@ -50,31 +49,6 @@ describe('programDateInstant', () => {
50
49
  expect(programDateInstant({ date: '2026-03-20T01:18:00.000Z' }).instant).toBeNull();
51
50
  });
52
51
 
53
- it('flags an admin display override — the shape a producer ACTUALLY emits', () => {
54
- // This is what the DAL hands over: the override column is timestamptz and
55
- // the route normalizes through toISOString(), so the value is a FULL
56
- // INSTANT. An earlier version of this test hand-built a bare `YYYY-MM-DD`
57
- // row that no producer can emit, which made it pass while the bug it named
58
- // stayed live.
59
- const r = programDateInstant({
60
- date: '2026-03-19T00:00:00.000Z',
61
- start_at: '2026-04-01T20:00:00.000Z',
62
- timezone: 'America/New_York',
63
- date_is_display_override: true,
64
- });
65
- expect(r.dateOnly).toBe(true);
66
- // The resolved value carries NO ZONE, so a consumer cannot render or label
67
- // one. Three surfaces had to remember that gate and two forgot; nulling it
68
- // makes the mistake unrepresentable rather than merely documented.
69
- expect(r.timezone).toBeNull();
70
- // The admin who asked for March 19 sees March 19 — not March 18 at 8 PM,
71
- // which is what a zoned render of UTC midnight gives.
72
- expect(formatProgramDate(r)).toBe('Mar 19, 2026');
73
- // ...and that is true precisely BECAUSE the zone was dropped: rendering the
74
- // same value in the row's declared zone still lands on the 18th.
75
- expect(formatDateWithTimezone(r.utcDate, 'America/New_York')).toBe('Mar 18, 2026');
76
- });
77
-
78
52
  it('renders the same shape whether or not the row declares a zone', () => {
79
53
  // The UTC fallback used to be a separate date-fns branch at each call site,
80
54
  // and it emitted a DIFFERENT SHAPE ("Thursday 19 March" vs "Thursday,
@@ -85,10 +59,6 @@ describe('programDateInstant', () => {
85
59
  expect(withZone).toBe('Thursday, March 19');
86
60
  expect(withoutZone).toBe('Thursday, March 19');
87
61
  });
88
-
89
- it('treats a real timestamp as an instant', () => {
90
- expect(programDateInstant(zoned).dateOnly).toBe(false);
91
- });
92
62
  });
93
63
 
94
64
  /**
@@ -118,21 +88,6 @@ describe('programMetaLine', () => {
118
88
  expect(line).toBe('Mar 19, 2026 · 9:18 PM EDT · 45m');
119
89
  });
120
90
 
121
- it('an overridden webinar: the chosen day, no clock, no zone', () => {
122
- const { line } = programMetaLine(
123
- {
124
- date: '2026-01-05T00:00:00.000Z',
125
- start_at: '2026-03-20T01:18:00.000Z',
126
- end_at: '2026-03-20T02:03:00.000Z',
127
- timezone: 'America/New_York',
128
- date_is_display_override: true,
129
- },
130
- 'webinar',
131
- FMT,
132
- );
133
- expect(line).toBe('Jan 5, 2026 · 45m');
134
- });
135
-
136
91
  it('a scheduled podcast does not present its stored duration as elapsed time', () => {
137
92
  const row = { date: '2026-03-20T01:18:00.000Z', duration_seconds: 1800 };
138
93
  expect(programMetaLine(row, 'podcast', FMT).typeMeta).not.toBeNull();
@@ -482,7 +482,7 @@ export function formatTimeWithTimezone(
482
482
  * cannot name different moments.
483
483
  *
484
484
  * Every program surface used to write this branch itself:
485
- * `zoned.instant && !zoned.dateOnly ? formatDateWithTimezone(...) :
485
+ * `zoned.instant ? formatDateWithTimezone(...) :
486
486
  * formatUtc(new Date(item.date), 'EEEE d MMMM')` — four copies, and they did
487
487
  * not agree. Three stated the condition off the resolved instant and the
488
488
  * fourth off a local timezone variable; worse, the two branches rendered
@@ -963,8 +963,8 @@ export function formatBioText(aboutHtml: string | null | undefined, fallback: st
963
963
  *
964
964
  * The third member of the set beside `formatProgramDate` (the day) and
965
965
  * `formatWebinarTimeMeta` (time + duration), and it exists because the page
966
- * header rebuilt it locally: an `instant ?? utcDate` fallback, a `dateOnly`
967
- * suppression and a zone-labelled render — the same three things the meta
966
+ * header rebuilt it locally: an `instant ?? utcDate` fallback and a
967
+ * zone-labelled render — the same things the meta
968
968
  * helper owns, re-applied at the call site, which is exactly what that
969
969
  * helper's docblock says goes wrong. The header also appended the RAW IANA
970
970
  * name while the slot beneath it used the short name, so one component
@@ -977,10 +977,6 @@ export function formatProgramTimeRange(
977
977
  at: ProgramInstant,
978
978
  opts: { startAt?: string | null; endAt?: string | null; withZoneLabel?: boolean } = {},
979
979
  ): string {
980
- // A chosen display day has no clock the admin meant. THE one statement of
981
- // that rule for every clock this package renders — `formatWebinarTimeMeta`
982
- // composes over this rather than repeating it.
983
- if (at.dateOnly) return '';
984
980
  // `instant` is null when the row declares no zone; `utcDate` is the canonical
985
981
  // value then, and the formatter's own UTC pin renders it deterministically.
986
982
  // Resolved ONCE — spelling this chain twice is how the previous version of
@@ -1011,22 +1007,15 @@ export function formatProgramTimeRange(
1011
1007
  *
1012
1008
  * Extracted because this exact three-line composition existed in the chat card
1013
1009
  * and the public page header, and they DRIFTED: the card was corrected to read
1014
- * the resolved display instant while the page still read the raw `start_at`, so
1015
- * an admin override printed two different clock times for one webinar. One
1016
- * review round apart, on the same three lines.
1010
+ * the resolved display instant while the page still read the raw `start_at`.
1017
1011
  *
1018
- * The split is the point: the TIME comes from the resolved display `instant`
1019
- * (which carries any override), the DURATION from `startAt`/`endAt`, because
1020
- * elapsed time is not a display date. Both sides of the separator are gated, so
1021
- * neither a suppressed duration nor an unrenderable time can leave one dangling.
1012
+ * The split is the point: the TIME comes from the resolved `instant`, the
1013
+ * DURATION from `startAt`/`endAt`, because elapsed time is not a display date.
1014
+ * Both sides of the separator are gated, so neither a suppressed duration nor
1015
+ * an unrenderable time can leave one dangling.
1022
1016
  *
1023
- * `dateOnly` lives in HERE rather than at the call sites on purpose: when each
1024
- * caller applied it, two of the three forgot and the surfaces disagreed about
1025
- * the same row. A chosen display date has no clock the admin meant, so the time
1026
- * half is dropped and only the duration remains.
1027
- *
1028
- * It takes the RESOLVED `ProgramInstant`, exactly as `formatProgramDate` does,
1029
- * for the same reason. While it took `instant` / `timezone` / `dateOnly` as
1017
+ * It takes the RESOLVED `ProgramInstant`, exactly as `formatProgramDate` does.
1018
+ * While it took `instant` / `timezone` as
1030
1019
  * loose fields, all four callers re-projected them off the same resolved value
1031
1020
  * and no two projections matched — so a zoneless webinar rendered "4:00 PM UTC"
1032
1021
  * on the public card and "4:00 PM" on the chat card, which exist to mirror each
@@ -1038,8 +1027,8 @@ export function formatWebinarTimeMeta(
1038
1027
  opts: { startAt: string | null; endAt: string | null; withZoneLabel?: boolean },
1039
1028
  ): string {
1040
1029
  // The CLOCK is `formatProgramTimeRange`'s, not a second rendering of it: this
1041
- // function restated the same three decisions (the `dateOnly` gate, the
1042
- // instant fallback, the labelled render) thirty lines below the sibling that
1030
+ // function restated the same decisions (the instant fallback, the labelled
1031
+ // render) thirty lines below the sibling that
1043
1032
  // owns them, and the two had already drifted apart on the fallback chain.
1044
1033
  // Only the DURATION is this function's own contribution.
1045
1034
  const duration = formatDurationFromRange(opts.startAt, opts.endAt);
@@ -21,34 +21,16 @@
21
21
  *
22
22
  * THE RULE:
23
23
  *
24
- * - `item.date` IS the instant to render. The host resolves it once, applying
25
- * any admin display override, and hands the same value to the card, the
26
- * model's context and the API wire. Preferring `start_at` looks like it buys
27
- * intra-card coherence — it does, by disagreeing with everything else.
24
+ * - `item.date` IS the instant to render. The host resolves it once and hands
25
+ * the same value to the card, the model's context and the API wire.
26
+ * Preferring `start_at` looks like it buys intra-card coherence — it does, by
27
+ * disagreeing with everything else.
28
28
  * - `start_at` / `end_at` remain the source for DURATION, which is elapsed time
29
29
  * rather than a display date.
30
- * - A DISPLAY OVERRIDE is a chosen date, not a moment. An admin backdating in a
31
- * `datetime-local` control gets `00:00`, so "show this as March 19" is stored
32
- * at UTC midnight; rendering that in a west-of-UTC zone shows March 18 at
33
- * 8 PM — a day early, at a time nobody chose. Such a value renders UTC-pinned
34
- * with no clock and WITHOUT A ZONE LABEL.
35
30
  *
36
- * The discriminator is "did an override supply this", NOT the value's
37
- * precision. The override column is `timestamptz` and the host normalizes it
38
- * through `toISOString()`, so it is always a full instant — an earlier
39
- * attempt keyed on precision and could therefore never fire.
31
+ * `timezone` here is "the zone this value renders in and may be labelled with".
32
+ * A row that declares none keeps the UTC pin (the React #418 fix).
40
33
  *
41
- * THE ZONE IS NULLED RATHER THAN FLAGGED, deliberately. `timezone` here is "the
42
- * zone this value renders in and may be labelled with", so a day-valued row
43
- * carries none and a consumer CANNOT print `America/New_York` under a clock the
44
- * rule just suppressed. Three surfaces had to remember that gate; two forgot,
45
- * and one of them rendered a bare IANA string under an empty heading. A rule
46
- * enforced by the shape of the data cannot be forgotten by the next call site.
47
- *
48
- * There is deliberately NO escape hatch back to the un-nulled zone. One was
49
- * added ("for the rare consumer that needs it as data") and no consumer ever
50
- * wanted it — an un-nulled copy hanging off the resolved value is just the
51
- * mistake again, one property away.
52
34
  */
53
35
 
54
36
  /** Read a string field off an item type that does not declare it. */
@@ -59,12 +41,8 @@ export interface ProgramInstant {
59
41
  * to `utcDate`. */
60
42
  instant: string | null;
61
43
  /** The zone this value RENDERS IN and may be LABELLED with. Null when the row
62
- * declares none, and null when the value is day-valued — see the note above
63
- * on why this is nulled rather than flagged. */
44
+ * declares none. */
64
45
  timezone: string | null;
65
- /** True when an admin display override supplied the value: render the day
66
- * UTC-pinned, with no clock. */
67
- dateOnly: boolean;
68
46
  /** The row's canonical date string, used when there is no zone to render in.
69
47
  * Kept on the resolved value so the UTC fallback is not re-derived (and
70
48
  * re-formatted differently) at each call site. */
@@ -75,33 +53,26 @@ export interface ProgramInstant {
75
53
  * The columns this rule reads. Declared structurally rather than as a
76
54
  * `Record<string, unknown>` so a caller holding a real `BaseProgramItem` can
77
55
  * pass it straight in: while the parameter was a bare record, every one of the
78
- * four call sites wrote `as unknown as Record<string, unknown>`, and a cast at
79
- * every call site is how a producer that forgets to set the flag goes
80
- * unnoticed by the compiler.
56
+ * four call sites wrote `as unknown as Record<string, unknown>`.
81
57
  */
82
58
  export interface ProgramDateFields {
83
59
  date?: unknown;
84
60
  start_at?: unknown;
85
61
  end_at?: unknown;
86
62
  timezone?: unknown;
87
- date_is_display_override?: unknown;
88
63
  }
89
64
 
90
65
  /** Resolve what a program item should render. */
91
66
  export function programDateInstant(item: ProgramDateFields): ProgramInstant {
92
- const declaredZone = programStr(item.timezone);
93
- const dateOnly = item.date_is_display_override === true;
67
+ const timezone = programStr(item.timezone);
94
68
  const date = programStr(item.date);
95
69
  const startAt = programStr(item.start_at);
96
70
 
97
- // A day-valued row has no zone to render in, and a row that declares none
98
- // keeps the caller's UTC pin — which is the React #418 fix and must not be
99
- // "fixed" into a viewer-local render.
100
- const timezone = dateOnly ? null : declaredZone;
71
+ // A row that declares no zone keeps the caller's UTC pin — which is the
72
+ // React #418 fix and must not be "fixed" into a viewer-local render.
101
73
  return {
102
74
  instant: timezone ? (date ?? startAt) : null,
103
75
  timezone,
104
- dateOnly,
105
76
  utcDate: date ?? startAt,
106
77
  };
107
78
  }
@@ -114,16 +85,14 @@ export function programDateInstant(item: ProgramDateFields): ProgramInstant {
114
85
  * columns in four different shapes (`programStr`, raw reads, `?? null`, and an
115
86
  * `in`-guarded cast), which is the same defect one field-pair down from the one
116
87
  * this module exists to fix. They are read off the row, never off the resolved
117
- * instant, because elapsed time is not a display date: an override moves the
118
- * day shown, and a webinar still runs for 45 minutes.
88
+ * instant, because elapsed time is not a display date.
119
89
  */
120
90
  export function webinarTiming(item: ProgramDateFields): {
121
91
  startAt: string | null;
122
92
  endAt: string | null;
123
93
  } {
124
94
  // No `timezone` here on purpose: it would be a second derivation of what
125
- // `programDateInstant` already resolved (and the UN-NULLED one, so a call
126
- // site could reintroduce a zone the day-valued rule just dropped).
95
+ // `programDateInstant` already resolved.
127
96
  return { startAt: programStr(item.start_at), endAt: programStr(item.end_at) };
128
97
  }
129
98