-
Notifications
You must be signed in to change notification settings - Fork 160
fix: token list management bug #6544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughRoutes for Limit Orders and Advanced Orders are converted from lazy-loaded to eagerly-loaded components, and both Advanced Orders and Limit Orders pages now wrap OrdersTableWidget in React.Suspense boundaries with Loading fallbacks to control component initialization. Changes
Sequence DiagramsequenceDiagram
participant Router as Router
participant LazyRoute as Lazy Route<br/>(Before)
participant EagerRoute as Eager Route<br/>(After)
participant Page as Page Component
participant Suspense as Suspense Boundary
participant Table as OrdersTableWidget
alt Before: Lazy Loading
Router->>LazyRoute: Navigation
LazyRoute-->>Router: Load Component (async)
LazyRoute->>Page: Mount page
Page->>Table: Render immediately
Note over Table: May cause visual jank
end
alt After: Eager Loading + Suspense
Router->>EagerRoute: Navigation
EagerRoute->>Page: Mount page (already loaded)
Page->>Suspense: Render with Suspense
Suspense->>Suspense: Show Loading fallback
Suspense->>Table: Render when ready
Note over Suspense: Controlled loading state
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…e token selection logic
|
@fairlighteth just a small note about the commit message. This is a |
elena-zh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this issue :)
Summary
Fixes #6156
OrdersTableWidgetin Limit and TWAP/Advanced Orders with a local<Suspense>and the existing loader. Table data fetches can suspend without unmounting the surrounding page.Screen.Recording.2025-11-24.at.16.20.27.mov
Technical context
Previously, when token lists toggled,
OrdersTableWidgetcould suspend while reloading balances/allowances. Because the page was under a route-level<Suspense>, that suspension replaced the entire page with a global loader, causing the visible blink. Moving these routes out of the lazy Suspense and localizing the fallback to the table confines the loader to the table area.To Test
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.