Add round-closing urgency state when under 30 seconds - #485
Merged
josephchimebuka merged 1 commit intoAug 26, 2026
Conversation
RoundCard now shows a non-blocking rose urgency pill with a pulsing dot when the live countdown drops below 30 seconds, visually distinct from the CLOSING SOON status label. The transition is announced politely via the card's sr-only aria-live region, and the pill respects prefers-reduced-motion. Closes TevaLabs#414 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@brodapeethar is attempting to deploy a commit to the josephchimebuka's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #414
Adds a non-blocking urgency state to the RoundCard (the predict card in the Dashboard rounds grid) when the round is closing in under 30 seconds, distinct from the existing CLOSING SOON status label.
Changes
src/components/RoundCard.tsxuseRoundCountdown), so the state appears/disappears in real time rather than waiting for a server round refresh.UNDER 30S) with a pulsing dot in the card's meta row only whensecondsLeft < 30and the round isn't expired.aria-live="polite"sr-only region, and is cleared when the round resolves/refreshes.src/index.css.status-dot-urgent(rose, pulsing) +pulse-urgentkeyframes, distinct from the yellow CLOSING SOON dot.prefers-reduced-motionblock so the pulse is disabled for reduced-motion users.src/components/__tests__/RoundCard.test.tsx— new tests covering the urgency state:secondsLeft < 30secondsLeft >= 30and for expired roundssrc/stories/RoundCard.stories.tsx— added anUrgentstory for the design-system showcase.Design notes
PredictionCard) has no round-time data, so the urgency state lives onRoundCard, which is the predict card rendered in the Dashboard rounds grid.Acceptance criteria
Testing
pnpm test:unit— 784 tests passing (62 files, +4 new urgency tests)pnpm build— passes (TypeScript + Vite production build)pnpm lint— only pre-existingreact-hooks/set-state-in-effecterrors in unrelated files; no new issuesNo env vars, migrations, or manual QA steps required.