Skip to content

fix(web): format mention/citation counts with thousands separators - #603

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/insights-thousands-separators
Aug 3, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/insights-thousands-separators

Conversation

@d180

@d180 d180 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The Insights KPI cards and competitor leaderboard rendered raw numbers instead of formatted ones, so large counts showed as 12345 instead of 12,345. Every sibling dashboard page (Citations, Traffic, Topics) already formats counts with toLocaleString(). This applies the same convention:

  • KPI cards (total mentions, total citations) now use toLocaleString()
  • The "+X new" count delta badge now uses toLocaleString()
  • The competitor leaderboard (tighter on space) now uses formatCompactNumber(), which falls back to toLocaleString() under 1,000 and shows compact k/M/B form above that

Score values (0-100, one decimal) are untouched.

Related issue

Closes #587

Type of change

  • fix — Bug fix

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice — full separators on the KPI cards and compact form where space is tight is the right split. Thanks!

@gkhngyk
gkhngyk merged commit ebc0307 into ansvisor:main Aug 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Insights: KPI cards and competitor leaderboard render counts without thousands separators

2 participants