Skip to content

fix(dashpay): keep username voting responsive - #1070

Merged
PastaPastaPasta merged 1 commit into
developfrom
t3code/fix-username-voting-loading
Aug 26, 2026
Merged

PastaPastaPasta merged 1 commit into
developfrom
t3code/fix-username-voting-loading

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

The Username voting screen can freeze indefinitely while loading active contests. The screen's main-actor refresh path called a synchronous Swift SDK wrapper that blocked inside Rust FFI while querying Platform.

Depends on dashpay/platform#4485, which makes the active-contest SDK query asynchronous, adds bounded concurrency, and enforces an overall timeout.

What was done?

Await the asynchronous dpnsActiveContests SDK query so the Username voting refresh no longer blocks the main actor.

How Has This Been Tested?

  • Built the simulator XCFramework from fix(swift-sdk)!: bound contested username loading platform#4485
  • Full dashpay Debug build, install, and launch on an iOS 26.5 simulator
  • Reproduced the Username voting path with no masternode keys
  • Verified loading completes with the “No open contests” state
  • Verified Back responds immediately during loading
  • Sampled the process during loading and confirmed the main thread remains in the UIKit run loop rather than Rust block_on

Simulator: iPhone 17 Pro, iOS 26.5 (Username Voting Loading Fix Clean)

Breaking Changes

None in DashWallet. The required SDK source change is documented in dashpay/platform#4485.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

This pull request was created by Codex.

Summary by CodeRabbit

  • Bug Fixes
    • Improved retrieval of active contested names by using asynchronous loading, while preserving existing sorting, limits, and results.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 39cfacab-6b9a-411f-84b1-264c4abba795

📥 Commits

Reviewing files that changed from the base of the PR and between 0e243a9 and 9e183a2.

📒 Files selected for processing (1)
  • DashWallet/Sources/Infrastructure/SwiftDashSDK/Voting/ContestedNamesService.swift

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

activeContests() now awaits the asynchronous dpnsActiveContests SDK method. Existing limit, logging, sorting, and return behavior remain unchanged.

Changes

Contested names retrieval

Layer / File(s) Summary
Await asynchronous contest retrieval
DashWallet/Sources/Infrastructure/SwiftDashSDK/Voting/ContestedNamesService.swift
activeContests() uses the asynchronous SDK method while preserving its existing behavior.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 9e183

This localized change makes username voting refresh asynchronously so the screen remains responsive during loading; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: quantumexplorer

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: improving username voting responsiveness through the asynchronous contest query update.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/fix-username-voting-loading

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PastaPastaPasta

Copy link
Copy Markdown
Member Author
Screen.Recording.2026-08-26.at.11.40.03.mov

@PastaPastaPasta

Copy link
Copy Markdown
Member Author

Depends on dashpay/platform#4485, which makes the active-contest SDK query asynchronous, adds bounded concurrency, and enforces an overall timeout.

note this; I think we need 4485 and then a bump first?

@PastaPastaPasta

Copy link
Copy Markdown
Member Author

No committed DashWallet dependency bump is needed.

The Xcode project references SwiftDashSDK as a local package at ../platform/packages/swift-sdk; there is no remote package version or Package.resolved pin to update. The TestFlight workflow separately checks out dashpay/platform using its platform_ref input (default: v4.2-dev) and builds/restores DashSDKFFI.xcframework with a cache key containing the resolved Platform SHA.

The intended order is therefore:

  1. Merge fix(swift-sdk)!: bound contested username loading platform#4485 into v4.2-dev.
  2. Merge this PR.
  3. For local builds, update the sibling ../platform checkout to the merged v4.2-dev and rebuild DashSDKFFI.xcframework. The TestFlight workflow performs those checkout/build steps automatically; an immutable release can select the merged Platform SHA explicitly.

So #4485 is the functional dependency, but there is no additional iOS “bump” commit between the two PRs.


🤖 Posted autonomously by Codex on behalf of pasta.

@PastaPastaPasta
PastaPastaPasta merged commit 9dc3dcd into develop Aug 26, 2026
2 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the t3code/fix-username-voting-loading branch August 26, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants