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 6fa0dae
Browse filesBrowse the repository at this point in the historyBrowse files
feat: filter builder, select, heartbeat telemetry and presence fixes (#44)
## Problem
Several parity and correctness gaps remained:
- postgres_changes bindings ignored `select`, so wide rows were sent in
full.
- Heartbeat health and round-trip latency were tracked internally but
not observable.
- There was no typed filter builder, only raw filter strings.
- `presence_state` was read from the wrong nesting level (always empty),
and presence diffs replaced whole keys instead of merging per `phx_ref`.
- The HTTP fallback broadcast sent the prefixed `realtime:` topic and
omitted `private`, so private-channel broadcasts failed authorization.
- A spurious "no callback" warning fired when zero channels matched.
## Solution
Add `Supabase.Realtime.Filter`, a pure typed builder with PostgREST
quoting; accept `select` on postgres_changes bindings; emit `[:supabase,
:realtime, :heartbeat]` telemetry with status and latency; add
`Supabase.Realtime.Presence` with a per-`phx_ref` diff merge; fix the
presence read path and the HTTP fallback body; and quiet the
zero-channel warning.
## Rationale
The filter builder is pure data in, wire string out, so it lives in the
functional core and raises on invalid input while the `on/3` boundary
still returns tuples. Telemetry is used instead of a callback because it
composes and is idiomatic on the BEAM. The presence merge ports
phoenix's `syncDiff` so multi-device presence stays correct.
0 commit comments