Skip to content

fix: handle unanimous vote display for first proposal (#184)#233

Open
mkcash wants to merge 2 commits into
effectai:mainfrom
mkcash:fix/first-proposal-votes-184
Open

fix: handle unanimous vote display for first proposal (#184)#233
mkcash wants to merge 2 commits into
effectai:mainfrom
mkcash:fix/first-proposal-votes-184

Conversation

@mkcash

@mkcash mkcash commented May 27, 2026

Copy link
Copy Markdown

Fixes #184

Problem

Proposal #1 had a unanimous vote (all YES), but the proposal list showed an empty vote icon.

Changes

  1. Proposals.vue: Added hasMoreYesVotes()/hasMoreNoVotes() helpers
  2. _id/index.vue: votePercentage() handles missing indices

Testing

Unanimous votes now show correct arrow direction

mkcash added 2 commits May 27, 2026 11:53
Signed-off-by: mkcash <mkcashcom@gmail.com>
Bug: First proposal (effectai#1) had a unanimous vote (all YES), but the
vote result icon showed 'empty' instead of 'passed'. The code assumed
both YES (index 1) and NO (index 2) vote counts always existed.

Changes:
- Proposals.vue: New hasMoreYesVotes/hasMoreNoVotes methods that handle
  missing vote types (single-option unanimous votes)
- _id/index.vue: votePercentage now safely handles missing vote_counts
  indices with null-safe fallback to 0

Fixes effectai#184
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.

First proposal doesn't show votes

1 participant