fix: handle overdue round in current round tracker#656
Merged
Conversation
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>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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
blocksRemainingto>= 0and cap the progress percentage to<= 100%. - Refactor to reuse
blocksSinceCurrentRoundStartand remove redundant numeric coercions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>
This was referenced Jul 19, 2026
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
initializeRound()not yet called) and swap copy to "Round #N has ended. Awaiting an orchestrator..." instead of showing nonsense like "-74 blocks remaining"blocksRemainingto >= 0 and progress ring to <= 100% as a defense-in-depth measureblocksSinceCurrentRoundStartmemo, drop redundant+Number()coercions (fields are already typednumberafter the API serialization layer)Closes #525
Test plan
blocksRemainingnever displays a negative number🤖 Generated with Claude Code