Skip to content

v0.3.0

Choose a tag to compare

@asm0dey asm0dey released this 16 May 12:46
· 126 commits to main since this release

Highlights

Voters can now retract their vote on an ACTIVE question ("Change my answer") and recast it before the presenter closes the slide. The whole flow is status-gated end-to-end — the backend refuses retract once the question is CLOSED, and the voter UI hides the retract affordance the moment a close event lands.

Features

  • Retract vote endpoint: DELETE /api/polls/{slug}/votes — status-gated, deletes the caller's vote on the active question and rebroadcasts the tally via SSE (VoteRetractedEvent).
  • Voter UI: "Change my answer" button on the voted state — clears the per-(slug, questionId) localStorage flag and returns the picker.
  • Shared client: ApiClient.retractVote(slug) in @slidev-polls/shared.

Fixes

  • Vote disappears on slide back (this release's voter bug): PollView no longer blanket-clears the per-question already-voted localStorage flags on question-closed or on the no-active-question branch of initial load. After the presenter navigated off a poll slide and back, the voter UI flipped from "Answer recorded" to the Submit form even though the server still held the vote — that's gone.
  • Retract race: backend re-checks QuestionStatus after the gated DELETE so a presenter closing the question while a retract is in flight no longer produces a false QUESTION_NOT_ACTIVE.
  • Integration test constraint: VoteRepositoryImplDeleteByVoterIT.throws_question_not_active_when_question_closed now NULLs activated_at alongside the CLOSED status flip, matching the poll_questions_active_timestamp_ck constraint and the production close path.

Chores

  • Bumped com.diffplug.spotless:spotless-maven-plugin to 3.5.1.

Artifacts

  • Backend image: ghcr.io/asm0dey/slidev-polls:v0.3.0 (multi-arch — linux/amd64, linux/arm64).
  • npm: @slidev-polls/shared@0.3.0, @slidev-polls/component@0.3.0.