Skip to content

Add real-time updates via Supabase Realtime - #24

Merged
jasoncrawford merged 5 commits into
mainfrom
realtime-updates
Feb 18, 2026
Merged

jasoncrawford merged 5 commits into
mainfrom
realtime-updates

Conversation

@jasoncrawford

Copy link
Copy Markdown
Collaborator

Summary

  • Created useRealtimeSubscription hook that subscribes to Postgres changes and refreshes the page
  • Added RealtimeStatusPage component (subscribes to checks, incidents, sites tables)
  • Added RealtimeSiteDetail component (subscribes to checks/incidents filtered by site)
  • Added RealtimeIncidentDetail component (subscribes to checks/incidents filtered by site/incident)
  • Integrated RealtimeStatusPage into the status page
  • 4 new tests for subscription setup, filtering, refresh callback, and cleanup

Closes #13

Test plan

  • Hook subscribes to correct tables with correct filters
  • router.refresh() called on Postgres changes
  • Channel removed on cleanup/unmount
  • All 47 tests pass, build succeeds

useRealtimeSubscription hook subscribes to Postgres changes and
calls router.refresh() to re-render server components with fresh data.
Includes components for status page (checks/incidents/sites),
site detail (checks/incidents for site), and incident detail pages.
Subscriptions cleaned up on unmount.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jasoncrawford
jasoncrawford merged commit 1b6c290 into main Feb 18, 2026
1 check passed
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.

Add real-time updates via Supabase Realtime

1 participant