fix: stats page NaN in total words, sort languages alphabetically#170
fix: stats page NaN in total words, sort languages alphabetically#170
Conversation
- Fix NaN: template referenced non-existent n_supplement field, now uses n_words directly (matches API response) - Fix "curated" badge: used non-existent has_schedule field, now checks n_daily > 0 - Sort language table alphabetically by name instead of by word count
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe statistics page adjusts the curated badge display condition and recalculates the total word count to exclude supplementary words. The API endpoint now sorts languages lexicographically by name instead of by word count in descending order. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
lang.n_supplementwhich doesn't exist in the API response, causingn_words + undefined = NaNfor every language rowhas_schedulefield, now usesn_daily > 0Test plan
Summary by CodeRabbit