Skip to content

parity(realtime): add replication_ready broadcast option and system event payload [from supabase-js] #272

Description

@grdsdev

Warning

Auto-generated parity issue — may be a false positive.

This issue was created automatically by /sync-sdk-parity from a heuristic
analysis of recent supabase-js commits. The tooling has limited insight
into language-specific idioms and may have:

  • misidentified a JS-only change as cross-language relevant,
  • missed an existing implementation in this SDK under a different name,
  • or proposed an API shape that doesn't fit this language's conventions.

It is the SDK author's responsibility to validate the need before
implementing.
If this change does not apply to this SDK, please close the
issue with a short note explaining why.


SDK Parity: C# implementation needed

A change was made in supabase-js that may need to be implemented in this repository for SDK parity. Please confirm applicability before starting work.

Reference Implementation (supabase-js)

What Changed

Added replication_ready?: boolean to the broadcast channel config. When true, the Realtime server emits a system event once the Postgres replication connection is ready. Also added RealtimeSystemPayload type with extension, status, message, channel fields.

Code Reference

const channel = supabase.channel('room1', {
  config: { broadcast: { replication_ready: true } },
})
channel.on('system', {}, (payload) => {
  if (payload.status === 'ok') console.log('Replication ready!')
}).subscribe()

Implementation Guidance

Expected API Surface (C#)

var channel = supabase.Realtime.Channel("room1", new RealtimeChannelOptions {
    Broadcast = new BroadcastOptions { ReplicationReady = true }
});

channel.OnSystem += (sender, payload) => {
    if (payload.Status == "ok") {
        Console.WriteLine($"Replication ready: {payload.Message}");
    }
};
await channel.Subscribe();

Key Behaviors to Match

  • ReplicationReady: bool in broadcast config, serialized as replication_ready
  • Server emits system event with Extension, Status, Message, Channel
  • Status == "ok" = ready; "error" = failed
  • Typed payload class/record for system events

Acceptance Criteria

  • ReplicationReady: bool on broadcast channel options
  • Serialized as replication_ready in JSON join payload
  • Typed system event payload class with all fields
  • OnSystem event or typed callback
  • Unit test verifying join payload includes the option

Context

  • supabase-js version: v2.110.0
  • Parity tracking: Auto-generated by SDK parity analysis
  • Related Linear issues: SDK-1179 (dart), SDK-1180 (py), SDK-1181 (swift)

Generated with Claude Code /sync-sdk-parity

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions