fix: critical timestamp parsing and audit fixes

- Fix timestamp conversion: String(epochMs) → new Date(epochMs).toISOString()
  in use-messages-sync, use-comments-sync, use-documents, use-inbox.
  Without this, date comparisons (isEdited, cutoff filters) would fail.
- Fix updated_at: undefined → null in use-inbox to match InboxItem type
- Fix ZeroProvider: skip Zero connection for unauthenticated users
- Clean 30+ stale "Electric SQL" comments in backend Python code
This commit is contained in:
CREDO23 2026-03-23 19:49:28 +02:00
parent f04ab89418
commit cf21eaacfc
33 changed files with 62 additions and 57 deletions

View file

@ -10,8 +10,13 @@ const cacheURL = process.env.NEXT_PUBLIC_ZERO_CACHE_URL || "http://localhost:484
export function ZeroProvider({ children }: { children: React.ReactNode }) {
const { data: user } = useAtomValue(currentUserAtom);
const userID = user?.id ? String(user.id) : "";
const context = user?.id ? { userId: String(user.id) } : undefined;
if (!user?.id) {
return <>{children}</>;
}
const userID = String(user.id);
const context = { userId: userID };
return (
<ZeroReactProvider {...{ userID, context, cacheURL, schema, queries }}>