Skip to content

feat(web): surface jury round phase countdown - #165

Merged
karagozemin merged 1 commit into
Sub-Rosa-Issue:mainfrom
sebas11042:feat/jury-round-phase-countdown
Jul 21, 2026
Merged

feat(web): surface jury round phase countdown#165
karagozemin merged 1 commit into
Sub-Rosa-Issue:mainfrom
sebas11042:feat/jury-round-phase-countdown

Conversation

@sebas11042

Copy link
Copy Markdown
Contributor

Summary

This PR updates the web jury/dashboard UI so users can clearly understand the current sealed round phase and how long remains until the configured Drand reveal round R.

It adds a dedicated round phase classifier for the UI, surfaces an explicit Open / Reveal / Settled phase badge, and shows a live reveal countdown tied to the target Drand round. The countdown also handles rounds where R has already passed, which is important for the bundled offline demo fixture because its canonical trace is already settled.

Closes #155

What Changed

  • Added classifyRoundPhase for UI-level phase classification:

    • Open when the round is still waiting for Drand R
    • Reveal when the round is revealing, cleared, or Drand R has already published
    • Settled when the round is terminal, including settled or voided rounds
  • Updated the round status card in apps/web to display:

    • A visible phase badge: Open, Reveal, or Settled
    • The existing contract round status
    • A dedicated Phase row
    • A dedicated Reveal countdown row
  • Improved Drand countdown behavior:

    • Uses the live Drand quicknet info when available
    • Falls back to local quicknet timing when offline or when the Drand request fails
    • Correctly displays when the target round R has already published
  • Added component-level coverage for the round status card:

    • Settled round with past Drand R
    • Open round with future Drand countdown
    • Open round where Drand R has already passed and should surface as Reveal

Why

Before this change, users could see raw round/Drand information, but the jury UI did not clearly communicate the actual product-facing phase of the round or make the reveal timing obvious at a glance.

This is important because the core user flow depends on understanding when sealed values become revealable.

Offline Demo Behavior

The bundled dashboard fixture still works without a configured live endpoint. Since the fixture is already settled and its Drand round is in the past, the UI now shows that R has already published instead of relying on a live Drand request.

Tests

Ran successfully:

npx.cmd pnpm@10.13.1 web:test
npx.cmd pnpm@10.13.1 web:typecheck
npx.cmd pnpm@10.13.1 web:build

## Test result:
web:test: 48/48 passing
web:typecheck: passing
web:build: passing

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.

web: surface round phase and reveal countdown in the jury UI

2 participants