Skip to content

feat(governance): implement governance voting dashboard with real-time proposal tracking (#174) - #203

Merged
JamesEjembi merged 2 commits into
VeriNode-Labs:mainfrom
Simultech369:feat/governance-voting-dashboard
Aug 22, 2026
Merged

feat(governance): implement governance voting dashboard with real-time proposal tracking (#174)#203
JamesEjembi merged 2 commits into
VeriNode-Labs:mainfrom
Simultech369:feat/governance-voting-dashboard

Conversation

@Simultech369

Copy link
Copy Markdown
Contributor

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

  1. Governance Domain Models & Store (src/types/governance.ts, src/store/governanceStore.ts)

    • Implemented schemas for Proposal, ProposalStatus, ProposalCategory, VotingType, VoteRecord, Delegate, CreateProposalInput, and QuorumProgress.
    • Linear ($1:1$) and quadratic ($\sqrt{\text{tokens}}$) voting weight algorithms.
    • Quorum tracking and vote distribution share percentages.
    • Comprehensive state management for proposals, status/category filtering, delegate tracking, voting power, and vote history.
  2. 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).
  3. Comprehensive Unit & Component Tests (src/__tests__/governance.test.ts, src/__tests__/governanceComponents.test.tsx)

    • 33 test cases verifying store state transitions, quadratic vs token-weighted voting math, quorum calculations, delegation/revocation, proposal creation validation, CSV formatting, and React component interactivity.

🧪 Verification & Testing

  • npm run test:unit:

@JamesEjembi
JamesEjembi merged commit 4c84b40 into VeriNode-Labs:main Aug 22, 2026
3 of 13 checks passed
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.

Governance Voting Dashboard with Real-Time Proposal Tracking

2 participants