-
Notifications
You must be signed in to change notification settings - Fork 122
feat 8000 (bridge): enhance SwapConfirmModal with loading state handling an… #5902
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
feat(bridge): enhance SwapConfirmModal with loading state handling an… #5902
Conversation
…d improve context stability
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)@coderabbitai pause to pause the reviews on a PR.@coderabbitai resume to resume the paused reviews.@coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full review to do a full review from scratch and review all the files again.@coderabbitai summary to regenerate the summary of the PR.@coderabbitai generate docstrings to generate docstrings for this PR.@coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.@coderabbitai resolve resolve all the CodeRabbit review comments.@coderabbitai configuration to show the current CodeRabbit configuration for the repository.@coderabbitai help to get help.Other keywords and placeholders
CodeRabbit Configuration File (
|
Fixed in #5903 |
Summary
Fixes multiple critical UI and UX bugs that occur when opening and closing the CoWShed modal from the swap confirmation screen. This PR implements a robust, multi-part solution that:
This tactical solution immediately resolves the user-facing issues while we plan a longer-term architectural improvement to the underlying data hooks.
Before
Screen.Recording.2025-06-28.at.17.23.22.mov
After
Screen.Recording.2025-06-28.at.17.24.25.mov
To Test
Confirm Button Stability
UI Flicker and Data Stability
Loading State UX
Background
The investigation revealed three distinct root causes for what appeared to be a single bug:
CoWShedWidget
was not correctly restoring the user's wallet account to the global balance context upon being dismissed.TradeConfirmation
component would momentarily becomeundefined
, causing it to unmount and remount.This PR addresses all three issues with targeted fixes. The use of a "stability ref" (
stableBridgeDataRef
) in theSwapConfirmModal
is a tactical choice to prevent component unmounting now. A follow-up technical debt ticket will be created to address the root cause of the prop instability in our lower-level data hooks, at which point this temporary patch can be removed.