📌 Description
DashboardTab (src/features/maintainers/components/dashboard/DashboardTab.tsx) renders a "Repository Views" stat hardcoded to 0 with a -100% change, and silently keeps showing skeletons when the stats API errors.
💡 Why it matters: A fake -100% stat and a stuck skeleton mislead maintainers about their repo health.
🧩 Requirements and context
- Wire "Repository Views" to real data, or remove the card until the metric exists.
- Replace the silent-skeleton-on-error behavior with an error state plus retry.
- Add an empty/CTA state when no project is selected.
Non-functional requirements
- Must be secure, tested, and documented.
- Should be efficient and easy to review.
🛠️ Suggested execution
1. Fork the repo and create a branch
git checkout -b fix/dashboardtab-stats
2. Implement changes
- Write/modify the relevant source:
src/features/maintainers/components/dashboard/DashboardTab.tsx
- Write comprehensive tests:
src/features/maintainers/components/dashboard/DashboardTab.test.tsx
- Add documentation: inline TSDoc
- Include TSDoc doc comments
- Validate security assumptions: validate stat values
3. Test and commit
- Cover edge cases: stats error, no project selected
- Include test output and security notes in the PR description.
Example commit message
fix(maintainers): real repository-views stat + error state
✅ Acceptance criteria
🔒 Security notes
Validate numeric stats before display.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
DashboardTab(src/features/maintainers/components/dashboard/DashboardTab.tsx) renders a "Repository Views" stat hardcoded to 0 with a -100% change, and silently keeps showing skeletons when the stats API errors.🧩 Requirements and context
Non-functional requirements
🛠️ Suggested execution
1. Fork the repo and create a branch
2. Implement changes
src/features/maintainers/components/dashboard/DashboardTab.tsxsrc/features/maintainers/components/dashboard/DashboardTab.test.tsx3. Test and commit
npm run testExample commit message
✅ Acceptance criteria
🔒 Security notes
Validate numeric stats before display.
📋 Guidelines