Skip to content

Add priority sort and vote participation indicators to proposal lists - #31

Draft
Stanys-dev wants to merge 3 commits into
lightchain-protocol:mainfrom
Stanys-dev:feat/proposal-list-voting-cues
Draft

Stanys-dev wants to merge 3 commits into
lightchain-protocol:mainfrom
Stanys-dev:feat/proposal-list-voting-cues

Conversation

@Stanys-dev

Copy link
Copy Markdown

What this adds

Connected wallets see Voted / Not voted badges on active proposals, priority-based default sorting, and a highlighted row for proposals that still need your vote.

Why

DAO participants need to spot where action is required without scanning the full proposal list. This wires the data layer from #30 into the proposal list UI.

Changes

  • components/proposal/ProposalFilter.tsx — Priority sort option with info tooltip
  • components/proposal/proposal-list-item.tsx — vote badges and tier-0 row highlight (alongside archived badge)
  • components/home/proposals-list.tsx — default priority-desc, batch vote reads, client re-sort, dim-while-loading
  • components/home/recent-proposals.tsx — priority top-3 with vote badges
  • components/ui/tooltip.tsx — sensible default delayDuration for filter tooltip
  • lib/getWalletVoteStatusOnActive.ts — shared vote-status helper + unit tests

Scope

7 files. Proposal list UI only — no sidebar or home page wiring yet (PR4).

Note on stacking

Depends on #30. Until that merges, this diff includes its commits — review the "Add priority sort and vote participation indicators" commit here. Will rebase once #30 lands.

Verification

  • Ran npm run test — 14 tests pass
  • Ran npm run build — compiles cleanly

Test plan (for reviewer)

  • npm run test passes
  • npm run build / Vercel preview succeeds
  • Connect wallet on Proposals tab — active rows show Voted / Not voted badges
  • Priority sort is default; list re-orders after vote batch loads
  • Active + not-voted rows have left border highlight
  • Recent proposals on home tab show same badges (top 3 by priority)
  • Archived proposals still show archived badge

Antanas and others added 3 commits July 18, 2026 08:43
Introduce batch hasVoted reads, governance signal fetching, client-side priority sort, and GraphQL priority-desc pre-sort. Add Vitest with unit tests for sort and time-formatting helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Map data/mock/proposals.json to API-shaped Proposal fixtures for deterministic priority-sort coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wire PR1 hooks into proposal and recent lists: priority default sort, vote badges, tier-0 row highlight, and Priority filter option with tooltip.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Lightchain AI Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

1 participant