From 1d7395e121e0d4cba7239a40ea50fa0d1c8b40e3 Mon Sep 17 00:00:00 2001 From: cottongin Date: Sun, 10 May 2026 21:05:59 -0400 Subject: [PATCH] fix: clear stale pollEndingAt state when starting a new poll After a countdown-based poll end, pollEndingAt could remain set as a stale value during the optimistic update in handleStartPolling, causing the new poll to briefly render in the "Poll Ending" state with 0:00. Co-authored-by: Cursor --- frontend/src/pages/Picker.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/pages/Picker.jsx b/frontend/src/pages/Picker.jsx index cc44d99..e66b4fb 100644 --- a/frontend/src/pages/Picker.jsx +++ b/frontend/src/pages/Picker.jsx @@ -252,6 +252,8 @@ function Picker() { pollStartedAtRef.current = new Date().toISOString(); setPollActive(true); setPollResult(null); + setPollEndingAt(null); + setShowEndPollOptions(false); try { await api.post(`/sessions/${activeSession.id}/voting/start`); } catch (err) {