Add priority sort and vote participation indicators to proposal lists - #31
Draft
Stanys-dev wants to merge 3 commits into
Draft
Stanys-dev wants to merge 3 commits into
Stanys-dev wants to merge 3 commits into
Conversation
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>
|
Someone is attempting to deploy a commit to the Lightchain AI Team on Vercel. A member of the Team first needs to authorize it. |
8 tasks
This branch has not been deployed
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.
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 tooltipcomponents/proposal/proposal-list-item.tsx— vote badges and tier-0 row highlight (alongside archived badge)components/home/proposals-list.tsx— defaultpriority-desc, batch vote reads, client re-sort, dim-while-loadingcomponents/home/recent-proposals.tsx— priority top-3 with vote badgescomponents/ui/tooltip.tsx— sensible defaultdelayDurationfor filter tooltiplib/getWalletVoteStatusOnActive.ts— shared vote-status helper + unit testsScope
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
npm run test— 14 tests passnpm run build— compiles cleanlyTest plan (for reviewer)
npm run testpassesnpm run build/ Vercel preview succeeds