• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 38230159408
92%

Build:
DEFAULT BRANCH: main
Ran 12 Oct 2026 09:30AM UTC
Jobs 11
Files 175
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Oct 2026 09:28AM UTC coverage: 91.573% (+0.04%) from 91.532%
38230159408

push

github

web-flow
fix(realtime): keep a rejoining channel from unsubscribing itself (#1949)

Fixes #1942

## Problem

`RealtimeChannel.rejoin()` calls `leaveOpenTopic(topic)` to leave any
duplicate channel on the same topic. That lookup returned the first
joined or joining channel on the topic, which is the rejoining channel
itself whenever it is already joining or joined. The channel then
unsubscribed itself, reported `closed`, was removed from the client and
never received anything again.

This happens in practice after a reconnect: the socket rejoins errored
channels as soon as it opens, while the backoff timer scheduled at the
drop keeps running. If the server has not answered the join by the next
tick (about 2 s later), the tick rejoins a joining channel and it leaves
itself. Adding a presence listener to a joined channel without presence
hit the same path every time.

## Changes

- `leaveOpenTopic` takes the rejoining channel and skips it by identity,
so it only leaves real duplicates on the topic.
- `rejoinUntilConnected` no longer resends a join that is still waiting
for its reply. Resending would cancel the join in flight, so a server
slower than the backoff interval could never answer one. A join answered
with an error is still retried on the next tick.

## Tests

- New `rejoin_test.dart` covers a rejoin of a joined channel, the
presence listener resubscription, a duplicate channel on the same topic
still being left, and the rejoin timer with a pending and an errored
join.
- `mock_test.dart` "correct CHANNEL_ERROR data on heartbeat timeout"
expected a `closed` status that came from this bug. It now asserts that
the channel stays on the client with only the `channelError` status.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved channel rejoining to avoid sending a duplicate join while a
reply is pending.
* Rejoining a channel no longer closes that same channel when another
open c... (continued)

6 of 6 new or added lines in 3 files covered. (100.0%)

51 existing lines in 1 file now uncovered.

9508 of 10383 relevant lines covered (91.57%)

5.27 hits per line

Coverage Regressions

Lines Coverage ∆ File
51
89.09
0.63% packages/supabase_auth/lib/src/auth_client.dart
Jobs
ID Job ID Ran Files Coverage
3 iceberg - 38230159408.3 12 Oct 2026 09:30AM UTC 6
69.17
GitHub Action Run
4 supabase_functions - 38230159408.4 12 Oct 2026 09:30AM UTC 4
93.28
GitHub Action Run
5 supabase_realtime - 38230159408.5 12 Oct 2026 09:33AM UTC 14
91.13
GitHub Action Run
6 supabase_flutter - 38230159408.6 12 Oct 2026 09:31AM UTC 15
80.58
GitHub Action Run
7 supabase_storage - 38230159408.7 12 Oct 2026 09:32AM UTC 9
98.46
GitHub Action Run
8 supabase - 38230159408.8 12 Oct 2026 09:34AM UTC 17
95.05
GitHub Action Run
9 postgrest - 38230159408.9 12 Oct 2026 09:33AM UTC 30
92.97
GitHub Action Run
10 supabase_auth - 38230159408.10 12 Oct 2026 09:34AM UTC 32
92.44
GitHub Action Run
11 supabase_typegen - 38230159408.11 12 Oct 2026 09:32AM UTC 24
96.19
GitHub Action Run
11 yet_another_json_isolate - 37623283614.11 07 Oct 2026 12:48PM UTC 1
98.44
GitHub Action Run
2 supabase_common - 37944513512.2 09 Oct 2026 02:32PM UTC 23
88.14
GitHub Action Run
Source Files on build 38230159408
  • Tree
  • List 175
  • Changed 7
  • Source Changed 7
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38230159408
  • 8a8eb1fc on github
  • Prev Build on main (#38226711363)
  • Next Build on main (#38269157431)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc