Skip to content

feat(voting): request dates, the links filter and Quick voting - #1366

Open
romchornyi wants to merge 17 commits into
feat/voting-vote-from-pillsfrom
feat/voting-quick-voting
Open

romchornyi wants to merge 17 commits into
feat/voting-vote-from-pillsfrom
feat/voting-quick-voting

Conversation

@romchornyi

@romchornyi romchornyi commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Stacked on the stage 4 PR (#1347, vote from the pills), the last stage of the username voting redesign. A masternode owner now sees each request's date and link, can keep only the requests with links, and can approve every shown username at once with Quick voting. This PR also carries the review fixes to stage 4 made since it was published. Feature summary: docs/features/username-voting/README.md.

What was done?

  • Request dates and links. Each request in an expanded row shows its request date and "Link included" when it has a link; Request details shows the voting period from the earliest request date to the voting end, "Not provided" when a date or link is missing. The dates come from SwiftDashSDK (platform#5718, already in the platform pin on develop); a request whose document cannot be read comes back without a date and the read still succeeds.
  • "Only requests with links" can be ticked. Links are looked up once per name through one store-wide queue (at most 4 at a time; an expanded row and Request details go to the front). While links load the list shows loading; when a link cannot be told it says "Can't filter by links right now" with "Reset filters", and applying the filter again retries the failed lookups.
  • Quick voting. "Quick voting" in the list's "…" menu (as on Android) opens QuickVotingSheet, sized to its content: how many of the shown usernames will be approved and how many are skipped, and "One vote left" once for the whole run. QuickVotePlan plans every name with the same gates as a single vote, in the same order (ADR-0035, Deviation): a name is skipped when it has closed or ended, its voting end or the order of its requests cannot be told (no date, or a tie to the millisecond), any masternode of this wallet blocked it, or no ticked masternode has a vote left; an existing block or approve is never replaced.
  • The run (castRun, ADR-0037): one PIN prompt, then name by name and masternode by masternode, recording each landed vote before the next; progress toast and VoiceOver announcement once the PIN is passed. A run with failures opens a result sheet listing the usernames not voted for, with "Try again" for those only; every vote failing is an error toast. Leaving the screen or sending the app to the background stops the run; a stopped run or Try again asks for no PIN and sends nothing.
  • 16 new strings, English in every locale; counted phrases worded without plurals. Two stage 4 toast texts are shortened so they fit the bar ("Already voted this way on %@").
  • Every toast of the list (vote, error, Quick voting progress) sits over the list just above the "Filtered by" bar and wraps, so an error reason is never cut; success toasts have no close button and hide after 3 s, as in the design, error toasts keep it.
  • With no masternode and no imported key, the key flow opens on "Enter voting key".
  • ADR-0037 added to the decision log as Proposed; the feature summary grows with stage 5b.

Security Lead: please review the Quick voting run (spec §6.1 — one confirmation for many votes): QuickVotePlan, MasternodeVoteCaster.castRun, VotingStore run / Try again.

How Has This Been Tested?

  • DashWalletTests (scheme dashwallet-dashpay, Debug, iPhone 17 simulator, iOS 26.5) on the tip (2026-11-11, after the live-run fixes): 2058 tests, 0 failures, 1 skipped. New tests: QuickVotePlanTests (every skip, mutation-checked), QuickVotingViewModelTests, the store's run / Try again / link-queue cases, VotingFilterTests for links, the caster's run in MasternodeVoteCasterTests, and the request-date cases in VotingStoreTests (AC-22; the decoder itself is covered by platform#5718).
  • Live run on testnet (2026-11-11, a masternode and an evonode voting key, six contested names from nine requester wallets): request dates and "Link included" on a 3-request name; a vote and a block that replaced an approve made from another device; Quick voting approved the earliest request of the 3-request name and skipped two names (sheet: 4 voted, 2 skipped). Quick voting only knows the votes this device recorded (AC-19); a vote made only on another device is not known here (feat(voting): read this wallet's masternode votes from Platform, not only the device's history #1377). The UI differences it found against the design are fixed in this PR.
  • scripts/a11y_audit.py --check: no new findings; test-target membership check: ok.
  • After the rebase onto develop cb5ab12ee and the latest review fixes (2026-11-13): DashWalletTests on every stage branch — feat(voting): restyle the username voting list #1326 2231 (1 failure in CoinbaseTransferAmountTests, from develop, passes alone), feat(voting): filter and sort the username voting list #1327 2239, feat(voting): expand duplicates in place, open Request details from a row, keep contests until voting ends #1328 2379, feat(voting): vote from the pills, with the vote-limit and block confirmations and Add your voting keys #1347 2519, this PR 2632 tests, 1 skipped each, no other failures (iPhone 17 simulator, iOS 26.5); Release build (simulator) of every stage succeeded.
  • Not checked on a device after the review fixes: a wallet with no voting node waits for the wallet sync before the key flow opens on "Enter voting key"; back from "Enter voting key" returns to the key list once it was shown; the list scrolls clear of a toast; the per-masternode result report scrolls. Unit tests cover the logic of each.
  • Maestro flows: the three no-keys flows (username_voting_pill_before_setup, voting_key_validation, username_voting_manage_voting_keys) still expect "Add your voting keys" and the old field label, and the request date/time row, the "Quick voting" menu entry and the toasts over the list have no flows yet. They follow in a separate change.

Screenshots

To add with the live run: a request with its date and "Link included", Request details with the voting period, "Only requests with links" (loading and can't-filter), the Quick voting sheet, the progress toast, and the result sheet.

Breaking Changes

None.

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
  • ADR (ADR-0001): ADR-0037 added
  • Nothing in this PR holds customer data, unfixed vulnerability detail, secrets, or step-by-step attack detail against keys, PIN or encryption (ADR-0001, rule 2)

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

Loading
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.

4 participants