Skip to content

docs: add an Election States help page - #1502

Open
masiarek wants to merge 1 commit into
Equal-Vote:mainfrom
masiarek:docs/election-states
Open

docs: add an Election States help page#1502
masiarek wants to merge 1 commit into
Equal-Vote:mainfrom
masiarek:docs/election-states

Conversation

@masiarek

@masiarek masiarek commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Adds a help page for the five election states — draft, finalized, open, closed, archived — and what you can do in each.

There wasn't a page covering this, and it's the answer to a lot of support questions: can I add a candidate now? can I change the end date? why can't my voters see the ballot? Those are all really "what state is my election in?"

It leads with the two things people actually need:

State Can voters cast a ballot? Can you edit the election?
Draft Yes — but they're test ballots Yes, anything
Finalized No No
Open Yes — these are the real ballots No
Closed No No
Archived No No

…then a section per state, how elections move between them, and a short FAQ.

Written from the code, which corrected a few assumptions

I checked each claim against the source rather than describing states generically, and several things came out differently than I'd have guessed:

  • Editing is only possible in draft. editElectionController rejects anything else with "Election is not editable" — so finalizing locks the election permanently, not just while voting runs.
  • Voting is only possible in draft and open. castVoteController rejects the rest with "Election is not open". That's the crisp difference between finalized and open.
  • Draft is the test mode, and finalizing deletes the test ballots automatically (finalizeElectionControllerinnerDeleteAllBallotsForElectionID).
  • Draft skips voter authentication, the voter roll, assertVoterMayVote, and ballot_updates. The page says this plainly, because the natural assumption is the opposite: if you test a restricted election in draft and the ballot goes through, that hasn't confirmed your restrictions work.
  • Transitions are lazy, not scheduled (updateElectionStateIfNeeded). So finalizing with no start time opens the election immediately, and an election with no end time never closes on its own.
  • Manual open/close is only available when no start/end times are set"Cannot open or close an election with scheduled start and end times." The two routes are exclusive rather than alternatives.

If any of that doesn't match intent, the page is the thing to change, not the code — happy to adjust.

Notes

  • nav_order: 1 puts it first in the section, since it reads as the orientation page the others assume. One-line change if you'd rather it sat elsewhere.
  • Links use the .md form, matching help/how_to_enable_beta_features.md's existing usage — jekyll-relative-links rewrites them for the site, and they also work when reading the source on GitHub.
  • Verified by building the site locally: renders with the table and callouts intact, lands first in the sidebar, and both Related links resolve.

Adds docs/help/election_states.md, answering what draft / finalized / open /
closed / archived mean and what you can do in each. Most "can I still do this?"
support questions are really state questions, and there was no page covering it.

Leads with a table of the two things people actually need -- can voters vote,
and can I still edit -- then a section per state, how elections move between
them, and a short FAQ.

Checked against the code rather than written from assumption, which corrected a
few things worth calling out:

- Editing is allowed only in draft (editElectionController), not "restricted
  once open". Finalize locks the election permanently.
- Voting is allowed only in draft and open (castVoteController); everything else
  is rejected with "Election is not open". That is the crisp difference between
  finalized and open.
- Draft is the test mode, and finalizing deletes the test ballots automatically
  (finalizeElectionController calls innerDeleteAllBallotsForElectionID).
- Draft skips voter authentication, the voter roll, assertVoterMayVote, and
  ballot_updates. Worth saying plainly: a draft test does NOT confirm your voter
  restrictions work, which is the opposite of what an admin would assume.
- State changes are lazy rather than scheduled (updateElectionStateIfNeeded), so
  finalizing with no start time opens the election immediately, and an election
  with no end time never closes on its own.
- Manual open/close is only available when no start/end times are set
  (setOpenStateController: "Cannot open or close an election with scheduled
  start and end times"). The two routes are exclusive, not alternatives.

nav_order is 1 so it sits first in the section -- it reads as the orientation
page the others assume. Happy to move it if you'd rather it sat elsewhere; it's
a one-line change.

Internal links use the .md form, matching help/how_to_enable_beta_features.md's
existing usage -- jekyll-relative-links rewrites them to .html for the site, and
they also work when reading the source on GitHub.

Verified by building the site locally: renders with the table and callouts
intact, lands first in the sidebar, and both Related links resolve.
@netlify

netlify Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploy Preview for bettervoting ready!

Name Link
🔨 Latest commit 0419c31
🔍 Latest deploy log https://app.netlify.com/projects/bettervoting/deploys/6a778eea0ec302000855e32b
😎 Deploy Preview https://deploy-preview-1502--bettervoting.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@masiarek, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 575f288e-4436-4d2d-a7f4-bef61c0f5085

📥 Commits

Reviewing files that changed from the base of the PR and between 7bc75a8 and 0419c31.

📒 Files selected for processing (1)
  • docs/help/election_states.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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