Skip to content

docs(realtime): rejoin a channel after a server phx_error - #334

Merged
grdsdev merged 1 commit into
claude/realtime-configuration-specs-1bc7bcfrom
claude/realtime-channel-phx-error-rejoin
Nov 10, 2026
Merged

grdsdev merged 1 commit into
claude/realtime-configuration-specs-1bc7bcfrom
claude/realtime-channel-phx-error-rejoin

Conversation

@grdsdev

@grdsdev grdsdev commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #304. Merge #304 first; this PR then retargets to main.

Adds a "Server channel error" section to specs/realtime/channel/subscribe.md:

  • A phx_error for a stale join_ref changes nothing.
  • On a joined channel, the client reports the error, marks the channel errored, and rejoins with the rejoin delays (1/2/5/10 s, then 10 s). A push that waits for a reply fails when its own timeout ends.
  • On a join in flight, the phx_error counts as a failed join attempt. Subscribe keeps waiting.
  • A confirmed rejoin reports the channel as subscribed again.
  • A socket close during the delay cancels it. The channel rejoins when the socket opens.
  • phx_close removes the channel and does not rejoin.

The rules follow @supabase/phoenix 0.4.5 channel.js. The state diagram gains the phx_error and phx_close transitions. presence_state.md rule 5 assumes this rejoin, and the new section links it. That file is on main, so the link resolves once #304 merges.

Context: SDK-2609 (supabase-swift v3 does not rejoin after a server phx_error).

Add a "Server channel error" section to the subscribe spec. A phx_error
for the current join marks the channel errored and rejoins it with the
rejoin delays; one for a stale join_ref changes nothing; phx_close still
removes the channel. Follows @supabase/phoenix 0.4.5 channel.js.

Refs SDK-2609
@grdsdev
grdsdev requested a review from a team as a code owner November 5, 2026 18:53
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4331eada-e46d-45e3-b712-753a7c030518
Commits

Reviewing files that changed from the base of the PR and between 1815aa6 and 2165428.

Files selected for processing: 1

  • packages/capability-matrix/specs/realtime/channel/subscribe.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@spydon spydon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@grdsdev
grdsdev added this pull request to stack #349 November 10, 2026 19:51
@grdsdev
grdsdev merged commit 07d5ae0 into main Nov 10, 2026
9 checks passed
@grdsdev
grdsdev deleted the claude/realtime-channel-phx-error-rejoin branch November 10, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants