Skip to content

feat: live transaction updates on account detail page#208

Open
lmcmz wants to merge 6 commits intomainfrom
feat/account-live-transactions
Open

feat: live transaction updates on account detail page#208
lmcmz wants to merge 6 commits intomainfrom
feat/account-live-transactions

Conversation

@lmcmz
Copy link
Member

@lmcmz lmcmz commented Mar 23, 2026

Summary

  • Add address-scoped WebSocket subscriptions to the backend Hub — clients send subscribe_address/unsubscribe_address messages, server only pushes relevant transactions
  • Two-phase broadcast: MetaWorker (Phase 1, immediate — payer/proposer/authorizer) and TokenWorker (Phase 2, enriched — FT/NFT sender/receiver with transfer summaries)
  • Frontend useAddressTransactions hook with Phase 1+2 deduplication and buffering
  • Hybrid UX: auto-prepend with 3s green highlight when at top, sticky "N new transactions" badge when scrolled away
  • New internal/broadcast package to decouple api↔ingester import cycle

Test plan

  • Open account detail page, verify subscribe_address message sent via WebSocket (devtools Network tab)
  • Navigate away, verify unsubscribe_address sent
  • Disconnect/reconnect WebSocket, verify re-subscribe happens automatically
  • Send a transaction to/from the viewed account, verify Phase 1 notification (basic roles) appears
  • Verify Phase 2 notification arrives and merges transfer details
  • Verify green highlight appears for 3 seconds on new transactions
  • Scroll down on activity tab, send transaction — verify badge appears with count
  • Click badge — verify scroll to top + transactions prepended
  • Test both pages and timeline view modes
  • Verify max 10 subscriptions per client enforced

🤖 Generated with Claude Code

zenabot27 and others added 6 commits March 24, 2026 02:28
Address-scoped WebSocket subscriptions with two-phase broadcast
(ingester + TokenWorker), hybrid UX (auto-prepend + badge).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8 tasks covering backend Hub subscriptions, Phase 1/2 broadcasts,
frontend provider/hook/badge, and ActivityTab integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MetaWorker broadcasts payer/proposer/authorizer roles (Phase 1) and
TokenWorker broadcasts FT/NFT transfer roles (Phase 2) to address-
subscribed WebSocket clients. Uses a new internal/broadcast package
to avoid the api<->ingester import cycle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- WebSocketProvider: subscribeAddress/unsubscribeAddress with reconnect
- useAddressTransactions hook: subscribe, deduplicate Phase 1+2, buffer
- NewTransactionsBadge: sticky animated badge for buffered live txs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…y tab

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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