lib/events.ts declares a client-safe Event interface presented as the mirror of the one in lib/events-server.ts, but it has fallen behind. Missing fields:
speakers
status
startDateTime
endDateTime
createdAt
Nothing is broken today because every consumer of those fields is a server component reading getEventBySlug / getAllEventsServer directly. The hazard is silent: the first client component to type its props with the lib/events.ts Event gets a type that compiles and is wrong.
Fix
Derive the client type from the server one rather than restating it, e.g. a Pick/Omit over the server interface with Temporal fields mapped to strings, so drift becomes a compile error instead of a latent gap.
Noticed while wiring event.speakers into components/event-speakers.tsx — the component imports EventSpeaker from lib/speakers.ts rather than the client Event for exactly this reason.
lib/events.tsdeclares a client-safeEventinterface presented as the mirror of the one inlib/events-server.ts, but it has fallen behind. Missing fields:speakersstatusstartDateTimeendDateTimecreatedAtNothing is broken today because every consumer of those fields is a server component reading
getEventBySlug/getAllEventsServerdirectly. The hazard is silent: the first client component to type its props with thelib/events.tsEventgets a type that compiles and is wrong.Fix
Derive the client type from the server one rather than restating it, e.g. a
Pick/Omitover the server interface withTemporalfields mapped to strings, so drift becomes a compile error instead of a latent gap.Noticed while wiring
event.speakersintocomponents/event-speakers.tsx— the component importsEventSpeakerfromlib/speakers.tsrather than the clientEventfor exactly this reason.