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

supabase / realtime / 36811496102
93%

Build:
DEFAULT BRANCH: main
Ran 01 Oct 2026 03:47AM UTC
Jobs 1
Files 126
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

01 Oct 2026 03:39AM UTC coverage: 92.069% (+0.1%) from 91.948%
36811496102

push

github

web-flow
refactor: extract out presence related functions from realtimechannel (#2312)

* refactor: simplify presence event handling on channels

This moves some of the logic for when to do authorisation against the
database from RealtimeChannel to PresenceHandler.

Two side-effects of this:

1. We get to remove some duplicate code for presence error handling from
   RealtimeChannel.
2. We only need to create a database connection when we actually need to
   perform an authorisation check. Previously every track/untrack call
   on a private channel would call Connect.lookup_or_start_connection,
   which looks like it may involve some waiting. Now, private channels
   only need to get the connection the first time they attempt a write.
   This impact should be consistent with our "authorisation lasts until
   token refresh" promise.

* refactor: separates presence resync decision from action

Previously deciding whether to resync presence was handled by the
RealtimeChannel inspecting the before and after state of socket assigns,
and if a resync was needed it would queue one up. This change moves the
decision of whether to resync, enacapsulating the "why", into the
PresenceHandler. Now it just returns a value in the return tuple telling
the caller they should resync, which lets us remove some code from
RealtimeChannel.

* refactor: reuse PresenceHandler.can_read_presence?/1 in RealtimeChannel

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* refactor: use expect instead of stub

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

19 of 20 new or added lines in 2 files covered. (95.0%)

3 existing lines in 2 files now uncovered.

4063 of 4413 relevant lines covered (92.07%)

4507.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.41
1.84% lib/realtime_web/channels/realtime_channel/presence_handler.ex

Coverage Regressions

Lines Coverage ∆ File
2
88.14
-3.39% lib/realtime/monitoring/gen_rpc_metrics.ex
1
87.96
-0.52% lib/realtime/tenants/replication_connection.ex
Jobs
ID Job ID Ran Files Coverage
1 36811496102.1 01 Oct 2026 03:47AM UTC 504
60.56
GitHub Action Run
Source Files on build 36811496102
  • Tree
  • List 126
  • Changed 106
  • Source Changed 2
  • Coverage Changed 106
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36811496102
  • 3bb25671 on github
  • Prev Build on main (#36779338090)
  • Next Build on main (#36926450074)
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