Repository navigation
feat: realtime accessibility, SSE streaming, ring buffers, cache invalidation (#251 #252 #253 #254) - #424
Open
edwardmiracle916-wq wants to merge 1 commit into
Conversation
…g buffers, realtime cache invalidation Closes Refract-Protocol#251 — Throttled ARIA live region system (AriaLiveProvider + useAriaLive) - aria-live=polite, atomic, visually hidden - 2s throttle window (5s with prefers-reduced-motion) - Batch coalescing: multiple messages in the same tick joined into one announcement Closes Refract-Protocol#252 — Horizon SSE streaming for transaction history - streamOperations() uses EventSource on /accounts/{address}/operations with cursor=now - useTransactionHistory: initial REST page, then live SSE updates prepended (de-duped by id) - loadMore still uses REST cursor pagination for older pages Closes Refract-Protocol#253 — Bounded per-topic ring buffers for realtime events - RingBuffer<T> class with documented capacity, push (evicts oldest), latest, toArray, clear - RealtimeClient now buffers each topic in a RingBuffer with caps from TOPIC_BUFFER_CAPS - topics.ts: REALTIME_TOPICS, TOPIC_BUFFER_CAPS, TOPIC_TO_QUERY_KEYS, TOPIC_ANNOUNCEMENTS Closes Refract-Protocol#254 — Wire realtime events into shared cache - RealtimeSyncProvider subscribes to all topics and calls queryClient.invalidateQueries - Also announces via AriaLiveProvider so screen readers learn about changes - providers.tsx: QueryClientProvider > AriaLiveProvider > RealtimeSyncProvider > WalletProvider Tests: 33 new tests (ringBuffer 12, AriaLive 6, horizonSse 8, realtimeSync 7) — all passing. Pre-existing: typecheck (12 errors in cover/page.tsx), build (same file), lint (cover/compare/page.tsx). Fixed: vitest config now includes .tsx tests, jsdom env, setup file, tsconfig.test.json for JSX. Installed missing @testing-library/dom peer dep. Deleted empty vitest.config.ts shadowing .mts.
|
@edwardmiracle916-wq 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! 🚀 |
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
Implements four issues that make the realtime streaming transport actually useful and accessible to all users:
Closes #251 — Throttled ARIA live regions
Closes #252 — Horizon SSE streaming for tx history
Closes #253 — Bounded per-topic ring buffers
Closes #254 — Wire realtime events into shared cache
What was tested
Infrastructure fixes
Blocked