-
Notifications
You must be signed in to change notification settings - Fork 4
chore: eVoting fixes #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: eVoting fixes #305
Conversation
Caution Review failedThe pull request is closed. WalkthroughFrontend and backend for eVoting were updated to add paginated/searchable/sortable polls listing, refine poll detail flows (private blind voting, end-of-poll results), adjust create-poll validation and visibility controls, enhance voted-state UI, modify points-mode storage/tallying, and remove a wallet “Your Vote” display block. APIs and services now support new list parameters and results structures. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant FE as Frontend (Polls Page)
participant API as evoting-api (Controller)
participant SVC as PollService
participant DB as Database
User->>FE: Open All Polls / interact (search/sort/page)
FE->>API: GET /api/polls?page&limit&search&sortField&sortDirection
API->>SVC: getAllPolls(params)
SVC->>DB: findAndCount(where: search)
DB-->>SVC: polls[], total
SVC->>SVC: sort (status/title/mode/visibility/votes/deadline)
SVC->>SVC: paginate (slice by page/limit)
SVC-->>API: { polls, total, page, limit, totalPages }
API-->>FE: JSON response
FE-->>User: Render table, pager, sort indicators
sequenceDiagram
autonumber
actor Voter
participant FE as Frontend (Poll Detail)
participant SI as Signing Interface
participant API as evoting-api
participant VS as VoteService
Voter->>FE: Select options and submit
FE->>SI: Open signing drawer (no vote preview in wallet)
SI-->>FE: Signature success
FE->>API: POST vote (public or private)
API->>VS: createVote(data)
VS-->>API: stored vote
API-->>FE: 200 OK
alt Private poll
FE->>API: GET /blind-tallies (on submit/refresh)
API->>VS: tallyBlindVotes()
VS-->>API: blindVoteResults
API-->>FE: results
FE-->>Voter: Show "Blind Vote Submitted" and hide live results until end
else Public poll
FE-->>Voter: Show "Vote Submitted" and disabled options
end
opt After deadline
FE->>API: GET final results
API->>VS: getPollResults()
VS-->>API: results (normal/rank/point)
API-->>FE: results
FE-->>Voter: Render final results with winner/percentages
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60–90 minutes Possibly related PRs
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (9)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Description of change
Issue Number
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit
New Features
Improvements
Changes