Repository navigation
feat(realtime): allow wait for pg changes - #2630
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe channel now accepts Sequence Diagram(s)sequenceDiagram
participant RealtimeChannel
participant RealtimeServer
participant SubscribeCallback
RealtimeChannel->>RealtimeServer: Join with postgres_changes_options
RealtimeServer-->>RealtimeChannel: Confirm or reject PostgreSQL subscription
RealtimeChannel-->>SubscribeCallback: Report SUBSCRIBED, CHANNEL_ERROR, or TIMED_OUT
Merge Risk: 🔵 Low · up to The opt-in wait mode may still report SUBSCRIBED before PostgreSQL replication is confirmed if the server returns a successful response without confirmation metadata, which could cause applications to miss changes. The PR is mergeable with explicit owner awareness or follow-up to enforce the server contract or fail closed. Warning Some tools did not complete. Review the errors below. 🔧 ESLint
ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@supabase/auth-js
@supabase/functions-js
@supabase/postgrest-js
@supabase/realtime-js
@supabase/storage-js
@supabase/supabase-js
commit: |
This PR updates `@supabase/supabase-js` to v2.114.0. **Source**: supabase-js-stable-release --- ## Release Notes ## v2.114.0 ## 2.114.0 (2026-09-02) ### 🚀 Features - **storage:** object versioning updates ([#2644](supabase/supabase-js#2644)) ### 🩹 Fixes - **auth:** unenroll the unverified factor after a failed registration ([#2641](supabase/supabase-js#2641)) - **deps:** override browserslist to patch high-severity advisories ([#2652](supabase/supabase-js#2652)) ### ❤️ Thank You - Katerina Skroumpelou @mandarini - Miodrag Obradovic @Kjubikstronk - Tyler Hillery ## v2.113.0 ## 2.113.0 (2026-09-02) ### 🚀 Features - **realtime:** allow wait for pg changes ([#2630](supabase/supabase-js#2630)) ### ❤️ Thank You - Filipe Cabaço @filipecabaco This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
## Summary - Registers `realtime.subscriptions.postgres_changes_wait` — the wait-for-server-confirmation option on `postgres_changes` subscriptions (`postgres_changes_options.wait` / `.timeout`), added to supabase-js in [supabase-js#2630](supabase/supabase-js#2630). - Adds a spec at `specs/realtime/subscriptions/postgres_changes_wait.md` describing the behavior, prerequisites, and error/timeout conditions in SDK-neutral terms. ## Test plan - `npm run validate` — OK, capability matrix is valid - `npm test` — 195 passed - `npm run typecheck` — clean Refs SDK-1650
🔍 Description
Adds a
wait: trueoption so subscribe() doesn't report SUBSCRIBED until the server confirms the postgres_changes subscription is actually active ‚fixing a race where changes could be missed if the channel joined before replication was streaming.If confirmation fails, you get CHANNEL_ERROR with the server's reason instead of a false SUBSCRIBED.