Repository navigation
feat: real-time live activity feed for platform-wide registrations & claims - #1393
Merged
joelpeace48-cell merged 2 commits intoSep 25, 2026
Merged
joelpeace48-cell merged 2 commits into
joelpeace48-cell merged 2 commits into
Conversation
Event indexer gains an onActivity hook fired after claim/register events are projected; index.js forwards them to the new WebSocketServer.publishActivity, which broadcasts masked-wallet 'activity' messages to the 'activity' channel. Refs FinesseStudioLab#1201
Subscribes to the 'activity' WebSocket channel and renders a live, de-duplicated, capped ticker of registrations and reward claims with connection status, relative times and reduced-motion-aware animations. Closes FinesseStudioLab#1201
|
@springswell Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
joelpeace48-cell
merged commit Sep 25, 2026
8cbdc38
into
FinesseStudioLab:main
11 of 26 checks passed
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
Adds a real-time, platform-wide live activity feed: a ticker of recent campaign registrations and reward claims, pushed over the existing WebSocket server (#456) instead of polled.
How it works
Backend
backend/src/jobs/eventIndexer.js:onActivitycallback oncreateEventIndexer.claimandregisterhandlers call it throughemitActivity()after the event has been projected into the DB.backend/src/websocket/server.js:publishActivity(activity)broadcasts{ type: 'activity', id, kind, wallet, campaignId, amount, ledger, timestamp }to the newactivityroom.registrationandclaimkinds are accepted.GABC…WXYZviamaskWallet. The messageiduses onlykind:txHash, so the full address never reaches subscribers.backend/src/index.js: passesonActivityto the indexer. It resolvesgetWebSocketServer()lazily, because the WS server is attached after the HTTP server starts listening. When WebSockets are disabled, nothing is sent.Clients opt in with the existing subscribe protocol,
{ type: 'subscribe', channel: 'activity' }, so there's no protocol change.Frontend
frontend/src/lib/activityFeed.js: pure helpers:normalizeActivityrejects malformed frames defensively;addActivityputs newest first, de-duplicates by id and caps at 20;formatActivityAmountconverts stroops to points;describeActivityandformatRelativeTimebuild the display text.frontend/src/components/LiveActivityFeed.jsx:getWebSocketClient()singleton, whose reconnect/resubscribe logic already existed.activityand shows a Live / Connecting… status indicator.aria-livelist and unsubscribes on unmount.clientprop for tests or Storybook.frontend/src/components/LiveActivityFeed.css: slide-in and pulse micro-animations, disabled underprefers-reduced-motion. Uses theme tokens with fallbacks, so it follows light and dark themes.Tests
backend/src/websocket/activity-feed.test.js(node:test) covers:maskWallet;emitActivitymapping for claims and registrations, a missing wallet, a missing callback and a throwing callback;publishActivity→ receive test, which also asserts the full wallet never appears in the payload;Not done / not verified (raised early on request)
activityFeed.jsor the component yet.<LiveActivityFeed />is exported and ready to drop intoLanding.jsxor a dashboard; I left the placement to maintainers.kind:txHash, which covers this.Closes feat(frontend): Real-time live activity feed widget for platform-wide claims #1201
Closes feat(frontend): Dark and Light mode theme switcher with system preference detection #1202
Closes feat(frontend): Add Global Command Palette (⌘K / Ctrl+K) for rapid navigation #1205
Closes feat(frontend): Campaign Leaderboard component with seasonal filter and rank badges #1206