Register the query
This is the complete generated query file.src/queries.ts
ref stable after release. It identifies the query across the browser bundle, Worker, reconnects, and pending subscriptions.
The organization predicate is required even though CharDB also applies the ownership policy. It tells the router which partition can answer the query.
Subscribe in React
Configure one client with the public Worker URL and the same Better Auth client. CharDB derives/ws from this URL.
src/web/App.tsx
organizationId to the wire arguments.
src/MessageList.tsx
pending means the first snapshot has not arrived. live means the subscription is current. refetching means CharDB could not safely resume an earlier snapshot and is replacing it.