feat(social-controllers): add realtime feed service - #10561
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
xavier-brochard
force-pushed
the
feat/social-realtime-service
branch
from
September 29, 2026 08:14
927c9da to
0c253fe
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2f8a7e4. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
zone-live
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
SocialRealtimeServicefor subscribing to Social realtime feed events through the shared backend WebSocket connection.@metamask/core-backenddependency with the v11 workspace package.CONNECTEDnotifications.SocialRealtimeServiceso existing backend subscriptions are not adopted or unsubscribed accidentally.@metamask/social-controllers.Testing
yarn workspace @metamask/social-controllers run test --no-coverageyarn workspace @metamask/social-controllers run buildyarn workspace @metamask/social-controllers run changelog:validateyarn workspace @metamask/social-controllers run lint:tsconfigsyarn lint:misc --check packages/social-controllers/src/SocialRealtimeService.ts packages/social-controllers/src/SocialRealtimeService.test.tsyarn lint:oxlint packages/social-controllers/src/SocialRealtimeService.ts packages/social-controllers/src/SocialRealtimeService.test.ts packages/social-controllers/src/index.ts packages/social-controllers/src/index.test.tsNote
Medium Risk
New WebSocket subscription lifecycle and async edge cases (reconnect, race on deactivate) could affect feed freshness if mis-integrated, but failures are best-effort and scoped to Social realtime.
Overview
Adds
SocialRealtimeServiceto@metamask/social-controllersso clients can receive live Social feed updates over the existingBackendWebSocketServiceconnection (channelsocial.v1.feed.all), without opening a separate socket.Consumers call
setActive(true|false)to subscribe/unsubscribe (e.g. when the feed tab is focused), optionally gated byisEnabled. Validfeed-itempayloads are validated and forwarded to listeners; reconnects trigger resubscription and optionaladdReconnectListenercallbacks. Subscription setup is serialized to avoid duplicates during rapid connect/disconnect and overlapping activate/deactivate.The package now depends on
@metamask/core-backend^11.0.0, exports the service and related types from the public index, and documents the dependency in the monorepo graph. This is a new exported capability—SocialControlleris not wired to it in this PR.Reviewed by Cursor Bugbot for commit e388abc. Bugbot is set up for automated code reviews on this repo. Configure here.