Skip to content

feat(messaging): #35 live-update the pending-connections badge via realtime#142

Merged
TortoiseWolfe merged 1 commit into
mainfrom
feat/35-live-connections-badge
Jun 6, 2026
Merged

feat(messaging): #35 live-update the pending-connections badge via realtime#142
TortoiseWolfe merged 1 commit into
mainfrom
feat/35-live-connections-badge

Conversation

@TortoiseWolfe

Copy link
Copy Markdown
Owner

Partially addresses #35 (the badge-latency half).

What

useConnections only fetched on mount, so the Connections-tab pending badge (UnifiedSidebar → ConnectionManager) stayed stale until a remount or manual action. Adds a Supabase realtime subscription to user_connections (already in the supabase_realtime publication with REPLICA IDENTITY FULL) that refetches on change — debounced 1s to avoid re-render cascades, mirroring the proven ConversationList/useConversationList pattern, with proper removeChannel cleanup.

Scope

Just the badge-latency half of #35. The "mobile drawer transition polish" half is intentionally left out (subjective, no defect/acceptance criteria), and the unread-badge debounce is untouched (documented regression risk). So #35 stays open for the drawer-polish piece if you want it later — but the concrete badge bug is fixed.

Verification

  • type-check / lint green.
  • 3 tests: subscribes to user_connections on mount, debounced refetch on a change event, channel removed on unmount.

🤖 Generated with Claude Code

…altime

useConnections only fetched on mount, so the Connections-tab pending badge
(UnifiedSidebar → ConnectionManager) went stale until a remount or manual
action. Add a Supabase realtime subscription to user_connections (already in
the supabase_realtime publication with REPLICA IDENTITY FULL) that refetches
on change, debounced 1s to avoid re-render cascades — mirroring the proven
ConversationList/useConversationList pattern, with proper removeChannel cleanup.

Scope: just the badge-latency half of #35. The "mobile drawer transition
polish" half is left out (subjective, no defect/acceptance criteria), and the
unread-badge debounce is intentionally untouched (documented regression risk).

Tests: subscribes to user_connections on mount, debounced refetch on a change
event, channel removed on unmount.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TortoiseWolfe TortoiseWolfe merged commit 41024a3 into main Jun 6, 2026
17 checks passed
@TortoiseWolfe TortoiseWolfe deleted the feat/35-live-connections-badge branch June 6, 2026 13:23
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