v0.8.3-dev to master#187
Conversation
WalkthroughThis pull request updates the package version in Changes
Sequence Diagram(s)sequenceDiagram
participant AppCtx as AppContext
participant VoteOp as Voting Operation
participant VoteProc as Vote Processor
AppCtx->>VoteOp: Initiate contested vote operation
VoteOp-->>AppCtx: Return vote result (DPNSVoteResults / Err / unexpected Ok)
AppCtx->>VoteProc: Process result via flat_map
alt Successful DPNS vote
VoteProc-->>AppCtx: Return platform results
else Vote error
VoteProc-->>AppCtx: Return error vector (name, choice, error message)
else Unexpected case
VoteProc-->>AppCtx: Return vector with Ok(())
end
sequenceDiagram
participant UI as DPNSScreen
participant Backend as Backend Task
UI->>Backend: Request bulk vote handling status
Backend-->>UI: Return bulk_schedule_message
alt Message is Error
UI->>UI: Display error heading and message
else Message is Success
UI->>UI: Display success heading and confirmation message
UI->>UI: Show navigation button for Scheduled Votes Screen
end
Possibly related PRs
Suggested reviewers
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Pro Plan! Simply use the command ✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/backend_task/contested_names/mod.rs (1)
72-86: Consider clarifying or logging the unexpected success case.The
Ok(_) => { ... } // This shouldn't occurbranch potentially masks unexpectedBackendTaskSuccessResultvariants. It might be beneficial to log a warning or handle that branch more explicitly to help troubleshoot unforeseen cases.Ok(_) => { - // Got some other BackendTaskSuccessResult, this shouldn't occur + tracing::warn!("Unexpected BackendTaskSuccessResult variant encountered. Consider reviewing new or outdated result types."); vec![(name.clone(), vote_choice.clone(), Ok(()))] }src/ui/dpns/dpns_contested_names_screen.rs (3)
1646-1658: Enhance user feedback for bulk schedule results.When encountering an error, the code displays a ❌ icon and the raw error message. For partial or more nuanced failures, consider tailoring the content to convey the overall success/failure ratio. This could help users quickly interpret results.
1677-1684: Improve navigation clarity.After completing a bulk vote, the user is offered two paths: "Go back to Active Contests" and "Go to Scheduled Votes Screen." The flow appears correct, but consider showing a brief description of each option to guide next steps more explicitly.
1796-1828: Refine success and error aggregation.The logic neatly separates complete failure, partial success, and full success. However, the partial success state is being labeled as a general error message. For better UX, consider introducing an additional category (e.g., a "Warning" banner) to differentiate from total failure.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
Cargo.toml(1 hunks)src/backend_task/contested_names/mod.rs(1 hunks)src/backend_task/contested_names/vote_on_dpns_name.rs(0 hunks)src/ui/dpns/dpns_contested_names_screen.rs(3 hunks)src/ui/identities/register_dpns_name_screen.rs(2 hunks)
💤 Files with no reviewable changes (1)
- src/backend_task/contested_names/vote_on_dpns_name.rs
✅ Files skipped from review due to trivial changes (2)
- Cargo.toml
- src/ui/identities/register_dpns_name_screen.rs
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/ui/dpns/dpns_contested_names_screen.rs (2)
1654-1672: Enhanced bulk vote results display with better error handlingThis change improves the user experience by providing more nuanced feedback on vote results, differentiating between partial success, complete failure, and complete success scenarios.
Consider making the success/failure determination more robust by using a structured approach rather than string checking with
contains("Successes"). A dedicated enum or boolean flag in the message structure would be less fragile than string checking.
1813-1845: Enhanced error handling for vote resultsThe vote results processing has been improved to explicitly construct separate vectors for successes and errors, leading to more detailed feedback for users.
The error message formatting using
{:?}for displaying errors might not be the most user-friendly. Consider a more structured approach where each error is formatted on its own line with clear context about which vote failed.- format!( - "Successes: {}/{}\n\nErrors:\n\n{:?}", - successes.len(), - successes.len() + errors.len(), - errors_string - ), + format!( + "Successes: {}/{}\n\nErrors:\n\n{}", + successes.len(), + successes.len() + errors.len(), + errors.iter().enumerate().map(|(i, err)| format!("{}. {}", i+1, err)).collect::<Vec<_>>().join("\n") + ),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/ui/dpns/dpns_contested_names_screen.rs(3 hunks)
🔇 Additional comments (2)
src/ui/dpns/dpns_contested_names_screen.rs (2)
1507-1515: Improved UX with conditional warning displayThe code now only shows the warning about Dash Evo Tool needing to remain running for scheduled votes when relevant (when any votes are actually scheduled), rather than displaying it statically all the time.
1694-1701: Improved navigation with Scheduled Votes buttonThe button for navigating to the Scheduled Votes Screen has been repositioned with proper spacing, making the UI more intuitive after completing vote operations.
* feat: devnet support * fix: re-add zmq listeners * progress * local network connection working * ok * feat: register contract screen * works * add contracts to the db on register * feat: tokens screen * compiles but not done * ok * fix * clean * add mint button and search results * add mint backend file * search improvements * feat: change to platform v2 * hacks * ok * moreee * token balances query works * some stuff is working * token transfers * ok * fix token query * mint token * burn tokens * destroy tokens * freeze tokens * unfreeze tokens * pause and resume tokens * ok * display token names * fix: identities being removed from identity table but not identity_order table * fix local network loading * remove token balance from det * contracts screen * chore: use GH runners for ARM * chore: fix protobuf * ok * ok * sequential backend tasks * fix: identity custom ordering * feat: input dashmate password * enable zmq for local * update tokens screen * token screen * remove tokens * fix * fix * progress * feat: set all vote options in voting screen * feat: filter contests in dpns screens * feat: filter owned names * feat: token creator * feat: more advanced token creator and cleaner * v0.8.3-dev to master (#187) * fix: error propagation in bulk voting * refactor: only update local db vote counts with platform queries * chore: bump version * feat: better message display for vote results * feat: better display of voting errors * more robust token creation * more on token creator * select authorized action takers * add token icon * feat: top panel navigation * feat: remove private key from DET button * more rule configs * more * refined token creator * more on token creator distribution * token creator * more on token creator * feat: implement cookie authentication for DashCore RPC * fix: dynamic grab different cookies for different networks * trivial: use tracing::info instead of eprintln! and don't log success * all configs done * fix * cleanup * finished token creator for now * format * groups * fix * view json * chore: bump version and rust version * set sdk path dependency * remove extra clone * expect core client --------- Co-authored-by: ktechmidas <daniel@ktechmidas.net> Co-authored-by: pasta <pasta@dashboost.org>
Summary by CodeRabbit
Chores
New Features
Style
Enhancements