fix(ui): restore Governance → Voting (build break + missing back navigation) - #925
Conversation
develop does not compile: #923 and #924 collided after both merged green independently. #923 replaced UsernameVotingViewController with the SwiftUI UsernameVotingScreen and updated the showVoting() that lived in MainMenuViewController when that PR was written. #924 had since moved the Voting entry point into GovernanceMenuScreen, which #923 never saw. On the merged tip the live entry point (Governance) still called the deleted controller — a hard build error — while the updated copy in MainMenuViewController was orphaned, since #924 removed its caller. Points Governance at UsernameVotingScreen (exactly what #923 wrote, in the location that is actually reachable) and deletes the dead copy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
Two fixes to the same entry point, one commit each.
1.
developis currently reddevelopdoes not compile. #923 and #924 collided after both merged green independently:UsernameVotingViewControllerwith the SwiftUIUsernameVotingScreen, updating theshowVoting()that lived inMainMenuViewControllerat the time that PR was written.GovernanceMenuScreen, which feat(dashpay): make username voting real #923 never saw.On the merged tip the two halves are crossed:
GovernanceMenuScreen.swift:123— the live entry point — still called the deletedUsernameVotingViewController:error: cannot find 'UsernameVotingViewController' in scope.MainMenuViewController.showVoting()— the updated copy — was orphaned: defined, never called, because feat(ui): group Masternodes and Voting under a Governance menu #924 removed its caller.So the reachable path was broken and the fixed path was unreachable. Points Governance at
UsernameVotingScreen(exactly what #923 wrote, in the location that is actually reachable) and deletes the dead copy.2. No way back out of a contested name
With the build restored, opening a name stranded the user: the contest detail had no back button and no navigation bar at all.
showVoting()pushed a bareUIHostingController(rootView: UsernameVotingScreen()). Both voting screens set.navigationTitle, and the list drills intoContestDetailScreenviaNavigationLink— but with noNavigationStackthere was no bar to host that title, and no automatic back button for the push.Wrapped in a
NavigationStackwith a leading chevron that pops the UIKit stack — the same wrappershowMasternodes()in this file already uses, for the same reason. Contest detail now gets its standard back button, and the root gets a way back to Governance.Verification
dashpayscheme builds clean (arm64 simulator) — it does not ondevelopwithout commit 1. Installed and launched on the simulator; back navigation itself is unverified on-device (PIN-gated), so the thing to click is Governance → Voting → a contested name → back.