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

supabase / supabase-flutter / 32821305408
89%

Build:
DEFAULT BRANCH: main
Ran 25 Aug 2026 07:24AM UTC
Jobs 10
Files 120
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

25 Aug 2026 07:22AM UTC coverage: 88.576%. Remained the same
32821305408

push

github

web-flow
refactor(realtime)!: make RealtimeClient internal mutable fields private (#1758)

## What kind of change does this PR introduce?

Breaking change for v3, implementing
[SDK-818](https://linear.app/supabase/issue/SDK-818/breakingrealtime-make-realtimeclient-internal-mutable-fields-private).

## What is the current behavior?

`RealtimeClient` exposes its internal state machine as public mutable
fields: external code can mutate `channels` directly (bypassing all
lifecycle management), reset `ref`, cancel `heartbeatTimer` or
`reconnectTimer`, overwrite `connection`/`connectionState`, and reassign
`accessToken` without the token propagating to joined channels.

## What is the new behavior?

The internals are private and the remaining public surface is read-only,
with mutation going through intentional paths only:

- `channels` is an unmodifiable view; channels are added with
`channel()` and removed with `removeChannel()`/`removeAllChannels()`.
- `accessToken` is a getter; token rotation goes through
`setAccessToken()`, which also propagates the token to every joined
channel (a raw setter would silently skip that, so the ticket's proposed
setter was intentionally not added).
- `heartbeatInterval`, `customAccessToken` and `reconnectAfter` are
final and settable only via the constructor. `RealtimeClientOptions`
gains `heartbeatInterval` and `reconnectAfter` so a client managed by
`SupabaseClient` keeps those knobs, and the `TimerCalculation` typedef
plus `RealtimeConstants.defaultHeartbeatInterval` are exported to
support them.
- `connection` and `connectionState` are read-only getters with no
setters at all; the tests that used to fake socket state now drive the
real `connect()` flow through the mocked transport.
- `ref`, `pendingHeartbeatRef`, `heartbeatTimer`, `reconnectTimer` and
`sendBuffer` are private. The few read accessors tests still need (plus
the `ref` setter for the overflow test, which has no transport-driven
equivalent) are kept behind `@interna... (continued)

59 of 60 new or added lines in 2 files covered. (98.33%)

14 existing lines in 2 files now uncovered.

5978 of 6749 relevant lines covered (88.58%)

4.44 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.07
0.0% packages/supabase_realtime/lib/src/realtime_client.dart

Coverage Regressions

Lines Coverage ∆ File
7
95.29
0.0% packages/supabase/lib/src/supabase_client.dart
7
96.07
0.0% packages/supabase_realtime/lib/src/realtime_client.dart
Jobs
ID Job ID Ran Files Coverage
10 supabase_functions - 32821305408.10 25 Aug 2026 07:24AM UTC 4
97.83
GitHub Action Run
8 supabase_realtime - 32488229193.8 21 Aug 2026 01:47PM UTC 13
90.15
GitHub Action Run
6 supabase - 32488229193.6 21 Aug 2026 01:46PM UTC 14
93.58
GitHub Action Run
10 postgrest - 32488229193.10 21 Aug 2026 01:45PM UTC 11
84.5
GitHub Action Run
3 supabase_storage - 32488229193.3 21 Aug 2026 01:46PM UTC 9
97.31
GitHub Action Run
9 supabase_auth - 32488229193.9 21 Aug 2026 01:47PM UTC 30
90.67
GitHub Action Run
2 yet_another_json_isolate - 32488229193.2 21 Aug 2026 01:43PM UTC 1
98.44
GitHub Action Run
8 supabase_common - 32709892111.8 24 Aug 2026 09:09AM UTC 21
86.96
GitHub Action Run
10 iceberg - 32709892111.10 24 Aug 2026 09:09AM UTC 6
68.52
GitHub Action Run
4 supabase_flutter - 32488229193.4 21 Aug 2026 01:43PM UTC 11
82.11
GitHub Action Run
Source Files on build 32821305408
  • Tree
  • List 120
  • Changed 11
  • Source Changed 10
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32821305408
  • e38f3a83 on github
  • Prev Build on main (#32709892111)
  • Next Build on main (#32821480584)
  • 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