Conversation
What was broken The My Submissions badge showed the full attempt count on its own tab, then dropped to the latest-only count after visiting the Submissions tab. Root cause Both tabs replace the same Marathon Match submissions state. The badge read the loaded attempts array length, even though the latest-only response carries the member's total submissionCount separately. What was changed Derive a dedicated My Submissions count from submissionCount with a loaded-attempt fallback, pass it through the challenge header, and use it for desktop and mobile badges. Any added/updated tests Added regression coverage for deriving the total from a latest-only response and rendering that total independently of the loaded attempts array.
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.
What was broken
For Marathon Match challenges with multiple attempts, the My Submissions badge showed the correct total while that tab was open, then dropped to the latest-only count after visiting the Submissions tab.
Root cause
The My Submissions and Submissions tabs replace the same grouped Marathon Match submissions state. The Submissions tab intentionally loads only each member's latest attempt for performance, but the badge used the loaded attempts array length instead of the total
submissionCountreturned with the latest row.What was changed
The challenge detail container now derives a dedicated My Submissions count from the logged-in member's
submissionCount, falling back to the loaded attempts length when needed. That stable count is passed through the header and displayed by both desktop and mobile tab badges. The latest-only loading optimization remains unchanged.Any added/updated tests
npm test,npm run lint, andnpm run buildunder Node 24.18.0.