feat(governance): implement governance voting dashboard with real-time proposal tracking (#174) - #200
Merged
JamesEjembi merged 2 commits intoAug 20, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This pull request resolves #174 by implementing a governance voting dashboard for VRN token holders, supporting active/passed/defeated proposal lifecycles, real-time vote distribution and quorum progress, token-weighted and quadratic voting mechanisms, community delegate management, on-chain parameter proposal creation, and historical vote logging with CSV export.
🎯 Key Implementations
Governance Domain Models & Store (
src/types/governance.ts,src/store/governanceStore.ts)Proposal,ProposalStatus,ProposalCategory,VotingType,VoteRecord,Delegate,CreateProposalInput, andQuorumProgress.UI & Dashboard Components (
src/components/governance/,app/governance/page.tsx)ProposalList.tsx: Filterable proposal catalog with status tabs, category filtering, live search, quorum progress bars, and vote share breakdown indicators.ProposalDetail.tsx: Full proposal review with description markdown rendering, executable parameter actions, vote distribution charts, interactive voting power slider (25%, 50%, 75%, 100% presets), dynamic weight preview, and gas cost estimation.DelegateManager.tsx: Delegation status banner, community delegate search, voting power/participation metrics, custom address delegation, and revocation controls.ProposalCreator.tsx: Structured proposal submission form with title, description preview, category picker, voting type selector, parameter action builder, and deposit requirement indicator.VoteHistoryTable.tsx: Per-user audit log with proposal title, choice badge, voting power, effective weight, voting mechanism, tx hash, gas cost, timestamp, and CSV download export.app/governance/page.tsx: Responsive dashboard with top-level protocol metrics (Total Proposals, Active Proposals, Average Turnout, User Voting Power, Delegation Status).Comprehensive Unit & Component Tests (
src/__tests__/governance.test.ts,src/__tests__/governanceComponents.test.tsx)🧪 Verification & Testing
npm run test:unit: