Skip to content

fix: handle overdue round in current round tracker#656

Merged
rickstaa merged 2 commits into
mainfrom
fix/issue-525-overdue-round-display
May 6, 2026
Merged

fix: handle overdue round in current round tracker#656
rickstaa merged 2 commits into
mainfrom
fix/issue-525-overdue-round-display

Conversation

@rickstaa

@rickstaa rickstaa commented May 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Detect overdue rounds (nominal end passed, initializeRound() not yet called) and swap copy to "Round #N has ended. Awaiting an orchestrator..." instead of showing nonsense like "-74 blocks remaining"
  • Clamp blocksRemaining to >= 0 and progress ring to <= 100% as a defense-in-depth measure
  • Code cleanup: reuse the existing blocksSinceCurrentRoundStart memo, drop redundant +Number() coercions (fields are already typed number after the API serialization layer)

Closes #525

Test plan

  • Active round: copy reads "There are X blocks ... remaining", ring fills proportionally
  • Overdue round: copy reads "Round #N has ended. Awaiting an orchestrator...", ring stays at 100%
  • blocksRemaining never displays a negative number

🤖 Generated with Claude Code

When initializeRound() hasn't been called yet despite the nominal
round end having passed, the tracker displayed "-74 blocks remaining"
with an over-100% progress ring (#525).

- Detect overdue state when blocksSinceCurrentRoundStart >= roundLength
- Swap copy to "Round #N has ended. Awaiting an orchestrator..."
- Clamp blocksRemaining to >= 0 and percentage to <= 100
- Reuse blocksSinceCurrentRoundStart memo and drop redundant
  +Number() coercions

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 07:18
@rickstaa
rickstaa requested a review from ECWireless as a code owner May 6, 2026 07:18
@vercel

vercel Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment May 6, 2026 8:03am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Current Round tracker UI logic to handle “overdue” rounds (where the nominal round length has elapsed but the next round hasn’t been initialized yet), preventing negative “blocks remaining” and overfilled progress values.

Changes:

  • Detect overdue rounds and swap the explanatory copy to an “awaiting an orchestrator” message.
  • Clamp blocksRemaining to >= 0 and cap the progress percentage to <= 100%.
  • Refactor to reuse blocksSinceCurrentRoundStart and remove redundant numeric coercions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/RoundStatus/index.tsx
Address Copilot review feedback on #525 fix: the donut label still
displayed raw "6451 of 6377" overflow values during overdue rounds.
Cap the displayed block count and replace the static "has ended" copy
with a relative time ("ended approximately 12 minutes ago") so the
overdue state is both visually clean and diagnostically useful.

Co-Authored-By: Copilot <copilot@github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rickstaa
rickstaa merged commit a615537 into main May 6, 2026
7 checks passed
@rickstaa
rickstaa deleted the fix/issue-525-overdue-round-display branch May 6, 2026 08:10
@github-project-automation github-project-automation Bot moved this from Triage to Done in Engineering Roadmap May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Current Round display showing incorrect block count as round ends

2 participants