-
Notifications
You must be signed in to change notification settings - Fork 562
Nebula: Improved toasts in move funds page #7307
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
Nebula: Improved toasts in move funds page #7307
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
""" WalkthroughThe code refactors the token sending logic in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SendFunds Component
participant toast
participant Transaction API
User->>SendFunds Component: Submit token transfer
SendFunds Component->>toast: toast.promise(start transaction)
activate toast
toast->>Transaction API: Execute transaction
Transaction API-->>toast: Success or Error
toast-->>User: Show success or error notification
deactivate toast
Possibly related PRs
Suggested reviewers
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ Finishing Touches
🪧 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7307 +/- ##
=======================================
Coverage 55.57% 55.57%
=======================================
Files 909 909
Lines 58673 58673
Branches 4158 4158
=======================================
Hits 32607 32607
Misses 25959 25959
Partials 107 107
🚀 New features to boost your workflow:
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx (1)
383-401
: Consider adding minimal error logging for debugging.While the silent error handling is consistent with the
toast.promise
approach (which handles user-facing error display), completely silent failures could make debugging production issues difficult.Consider adding minimal error logging while keeping the user experience clean:
} catch { - // no op + // toast.promise handles user-facing errors }Or optionally log to console in development:
} catch (error) { + if (process.env.NODE_ENV === 'development') { + console.error('Transaction error:', error); + } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Unit Tests
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: Lint Packages
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Size
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: Build Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx (1)
291-303
: LGTM! Clean refactor to use toast.promise.The batch transaction handling is correctly implemented with
toast.promise
, providing better user feedback and cleaner code structure.
size-limit report 📦
|
58b0b84
to
86b49d5
Compare
86b49d5
to
139a015
Compare
Merge activity
|
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving error handling and user feedback in the `SendFunds` function by utilizing `toast.promise` for asynchronous operations, enhancing the user experience during token transfers. ### Detailed summary - Replaced `toast.loading`, `toast.success`, and `toast.error` with `toast.promise` for batch and single token transfers. - Improved error handling by catching errors without logging them. - Simplified success and error messages in the toast notifications. - Removed duration settings for toast notifications. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Toast notifications for sending funds are now streamlined using unified loading, success, and error messages, providing clearer and more consistent feedback during transactions. Error messages are also improved for better clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
139a015
to
dacfd94
Compare
PR-Codex overview
This PR focuses on improving the handling of token transfer transactions in the
SendFunds
component by replacing traditional loading and error handling with a more user-friendlytoast.promise
approach.Detailed summary
toast.promise
for better user feedback.try-catch
structure around the transaction submission logic.Summary by CodeRabbit