Skip to content

feat: surface round phase and reveal countdown in jury UI (#155)#164

Open
lb1192176991-lab wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
lb1192176991-lab:feat/jury-phase-countdown-155
Open

feat: surface round phase and reveal countdown in jury UI (#155)#164
lb1192176991-lab wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
lb1192176991-lab:feat/jury-phase-countdown-155

Conversation

@lb1192176991-lab

Copy link
Copy Markdown

What

Adds a phase badge and Drand countdown to the Observer View (jury UI) in apps/web/src/components/ObserverView.tsx.

  • classifyJuryPhase() maps the trace lifecycle to three user-facing phases: Open (🔓 / blue), Reveal (👁 / orange), Settled (✅ / green)
  • The old static "Sealed phase" card is replaced with a dynamic phase badge driven by the trace's active lifecycle step
  • A new Countdown card uses the existing DrandCountdownChip component to show a live countdown to the target Drand round R
  • When settled, the countdown shows "Beacon ready" (idle mode)

Why

Users could not tell at a glance what phase a round was in (Open / Reveal / Settled) or when the next round would unseal — the core value proposition of the product. This change makes the round status immediately visible.

Testing

  • Works offline against the canonical demo trace — no live RPC required
  • Phase detection handles all seven lifecycle phases (create_round, commit, wait_r → Open, open_reveal, reveal_all, clear → Reveal, settle → Settled)
  • Countdown uses the existing, tested useDrandCountdown hook from DrandCountdownChip
  • Past-R state handled naturally: countdown shows 0s elapsed when R is past
  • If no Drand round is configured, shows a fallback message instead of a broken component

Closes #155

…ssue#155)

- Adds classifyJuryPhase() helper mapping lifecycle phases to
  Open / Reveal / Settled user-facing badges with color coding
- Replaces static 'Sealed phase' card with dynamic phase badge
  driven by the trace lifecycle status
- Adds DrandCountdownChip card showing countdown to reveal round
- Updates phase descriptions per acceptance criteria
- Component works offline against canonical demo trace
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

1 participant