Dashboard stats briefly render as 0 before data loads
- Dominant language
- Python
- Stars
- 2k
- Forks
- 984
- Avg merge
- 2h 54m
- Merged PRs (30d)
- 14
Description
When loading the dashboard, the statistics cards (Ongoing Challenges, Host Teams, Participant Teams) initially display 0 before the API response updates them. This can mislead users into thinking they have no data.
**Steps to Reproduce**
1. Log in
2. Hard refresh dashboard
3. Observe stats briefly show 0
**Expected Behavior**
Show a loading state (spinner/skeleton/placeholder) until data is available.
**Proposed Solution**
The dashboard stats currently use fallback expressions like {{ dash.challengeCount || 0 }}, which causes 0 to briefly render before the API response loads. This can mislead users.
Instead, we can make the rendering loading-aware by reusing the existing dashboard loader. Introduce a loading flag for the stats and show a placeholder (or loader) until the API response resolves, then render the actual values.
This avoids showing incorrect data, improves UX, and keeps the change minimal by reusing existing patterns.lves.
Contributor guide
Research direction
Start at the dashboard stats rendering and the existing dashboard loader, then reproduce the hard-refresh behavior described in the issue. Reuse the loader’s established pattern so the three cards show a loading placeholder until the API response resolves, and verify that the actual statistics then render without an interim 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angularjs
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100