Skip to content

feat: implement governance web interface, SDK, and E2E tests#602

Open
Agbasimere wants to merge 7 commits into
Epta-Node:mainfrom
Agbasimere:feature/governance-interface
Open

feat: implement governance web interface, SDK, and E2E tests#602
Agbasimere wants to merge 7 commits into
Epta-Node:mainfrom
Agbasimere:feature/governance-interface

Conversation

@Agbasimere

Copy link
Copy Markdown

This pull request implements the complete governance web interface for the Linkora platform. It extends the TypeScript SDK with smart contract governance bindings, creates mock-supported Next.js API route handlers, integrates frontend page routes (for both apps/web and packages/web), and writes E2E Playwright verification tests.

Proposed Changes

1. SDK Extensions (packages/sdk)

  • types.ts: Added TypeScript interfaces for GovParameter, GovStatus, GovProposal, and GovConfig.
  • client.ts: Implemented govGetConfig(), govGetProposal(), govPropose(), govVote(), govExecute(), and govVeto() calling the smart contract functions using XDR envelope serialization.

2. Next.js Route Handlers (apps/web)

  • config/route.ts: Serves contract configuration parameters with a mock fallback.
  • proposals/route.ts: Manages in-memory storage of active and historical proposals, supporting POST actions for creations, votes weight adjustments, and veto actions.

3. Frontend Governance Interfaces

  • apps/web/src/app/governance/page.tsx: Fully functional governance dashboard styled with Tailwind CSS. Integrates the Freighter wallet connection and LinkoraClient.
  • packages/web/app/governance/page.tsx: Inline/CSS variable-styled dashboard built for custom mock execution inside headless E2E testing environments.
  • Integrated Views & Validations:
    • Active Proposals listing with time remaining and voting counts.
    • Range validations on form inputs (e.g. FeeBps [0-10000], GovQuorum [1-100], TipCooldownWindow > 0, valid Stellar address for Treasury).
    • Visual quorum indicators representing decay-aware quorum progress.
    • Executed history records.
    • Veto actions (admin-only).

4. Navigation Links

  • Added Governance links to navigation headers in:
    • apps/web/src/components/NavBar.tsx
    • packages/web/app/layout.tsx
    • packages/web/app/components/Navbar.tsx

5. Automated Playwright E2E Tests

  • Created governance.spec.ts verifying active proposals, input range validations, voting weight count updates, and proposal submissions.

Verification Plan

1. SDK builds and tests:

pnpm --filter linkora-sdk build
pnpm --filter linkora-sdk test

Closes #597 

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@Agbasimere is attempting to deploy a commit to the Jaja's projects Team on Vercel.

A member of the Team first needs to authorize it.

@devJaja devJaja self-requested a review June 22, 2026 21:09
@devJaja

devJaja commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Resolve the conflict

Fix the fontend E2E CI check

@Agbasimere

Copy link
Copy Markdown
Author

@devJaja Please kindly review.

@devJaja

devJaja commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@Agbasimere CI checks still failing.
your PR should also include the issue number is clossing

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