feat: SSE reconnection state, list virtualization, wallet availability, stream card memoization - #1072
Open
DeFiVC wants to merge 5 commits into
Open
feat: SSE reconnection state, list virtualization, wallet availability, stream card memoization#1072DeFiVC wants to merge 5 commits into
DeFiVC wants to merge 5 commits into
Conversation
The disconnect banner was always red even during reconnection, which confused users into thinking the connection was permanently lost. Now the banner color changes to yellow when reconnecting to provide clear visual feedback that a retry is in progress.
ActivityHistory.tsx rendered all events into DOM rows with no windowing, causing visible jank on scroll for accounts with many historical events. Added @tanstack/react-virtual to virtualize the list when it exceeds 50 items, while preserving the existing pagination behavior for initial fetch.
WalletButton.tsx assumed a connected wallet stays available for the entire session. If the user disabled or uninstalled the wallet extension while connected, subsequent operations would fail with raw errors. Now the component periodically checks wallet availability and prompts reconnection with a clear message when the extension is unavailable.
…re-renders IncomingStreamCard was re-rendering on every parent update even when its props hadn't changed. Wrapped the component in React.memo with a custom comparison function that checks stream data and withdrawing state, preventing unnecessary recalculations on the dashboard.
Fixed syntax error in dashboard.ts (misplaced closing brace before catch block) and added missing useQueryClient import in dashboard-view.tsx that were preventing successful builds.
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.
Closes #1044, Closes #1045, Closes #1046, Closes #1047
Type of Change
Summary
This PR addresses four frontend issues: (1) SSEStatusIndicator now shows a yellow "reconnecting" banner instead of always red, giving users clear visual feedback during backoff; (2) ActivityHistory virtualizes lists exceeding 50 items using @tanstack/react-virtual to prevent scroll jank; (3) WalletButton detects when the wallet extension is uninstalled mid-session and prompts reconnection; (4) IncomingStreamCard is wrapped in React.memo to prevent unnecessary re-renders on parent updates.
Motivation / Context
Closes #1044 — SSEStatusIndicator shows only connected/disconnected with no visual state for reconnecting. The disconnect banner was always red even during reconnection, confusing users into thinking the connection was permanently lost.
Closes #1045 — ActivityHistory renders an unbounded list with no virtualization for accounts with many events, causing visible jank on scroll.
Closes #1046 — WalletButton does not handle the case where the connected wallet extension is uninstalled mid-session, leading to raw signing errors.
Closes #1047 — IncomingStreamCard does not memoize its per-second amount calculation, causing unnecessary re-renders when parent components update.