You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1f4200d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: ai-docs/ai-migration-v14-v15.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,65 @@ To ingest an ad-hoc channel (e.g. navigating to a DM or search result) into the
65
65
66
66
`Channel` no longer reflects the channel-list query state. Its loading / error / empty rendering is driven by the channel's own `watch()` bootstrap (`LoadingIndicator` while watching, `LoadingErrorIndicator` on watch failure, `EmptyPlaceholder` when no channel is provided). The channel-list query state is the `ChannelList`'s concern, not `Channel`'s.
67
67
68
+
## Dates on response types are unix-nanosecond numbers
69
+
70
+
`stream-chat` now types every **server-sent** date as the unix-nanosecond `number` the API puts on the
71
+
wire — `created_at`, `updated_at`, `last_read`, and every sibling on a response or event. It is not a
72
+
`Date` and not an ISO string, and the React types that carry those values through changed with it.
73
+
74
+
Two failure modes are silent, because neither is a type error:
75
+
76
+
-`new Date(ns)` is **out of range**. `Date` tops out near 8.64e15 ms while a current timestamp is
77
+
~1.79e18, so you get an `Invalid Date` — and `.toISOString()` on one throws
78
+
`RangeError: Invalid time value`, usually mid-render.
79
+
- Date libraries read a bare number as **milliseconds**, so `dayjs(created_at)` renders a date roughly
0 commit comments