Skip to content

Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.

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

Patel Dhritebc030743699
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/insights/_charts.tsx b/web/src/app/[locale]/(dashboard)/dashboard/insights/_charts.tsx
index 262ce73a5..f85a18df3 100644
--- a/web/src/app/[locale]/(dashboard)/dashboard/insights/_charts.tsx
+++ b/web/src/app/[locale]/(dashboard)/dashboard/insights/_charts.tsx
@@ -27,6 +27,7 @@ import type {
SoVTrendPoint,
} from '@/lib/actions/tracking';
import { getFaviconUrl } from '@/lib/favicon';
+import { formatCompactNumber } from '@/lib/format';
// ─── Adaptive Y-axis ─────────────────────────────────────────────────────────
// Visibility scores are theoretically 0–100 but realistic values for most
@@ -683,8 +684,8 @@ function LeaderboardEntry({ entry, rank }: { entry: CompetitorComparisonEntry; r
{entry.isOwnBrand && <span className="text-[10px] font-medium text-primary">YOU</span>}
</div>
<div className="flex items-center gap-3 text-xs text-muted-foreground mt-0.5">
- <span>{entry.totalMentions} mentions</span>
- <span>{entry.totalCitations} citations</span>
+ <span>{formatCompactNumber(entry.totalMentions)} mentions</span>
+ <span>{formatCompactNumber(entry.totalCitations)} citations</span>
</div>
<div className="flex items-center gap-3 text-xs text-muted-foreground mt-0.5">
<span className="tabular-nums">
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx
index 5af0af2fe..3d33b26d2 100644
--- a/web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx
+++ b/web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx
@@ -235,7 +235,7 @@ function CountDeltaBadge({
if (previous === 0 && current > 0) {
return (
<span className="text-xs font-medium text-emerald-600 dark:text-emerald-400">
- +{current} new
+ +{current.toLocaleString()} new
</span>
);
}
@@ -1531,7 +1531,7 @@ export default function InsightsPage() {
title={t('mentions')}
tooltip="How many times your brand was referenced by name in AI-generated responses."
icon={Zap}
- value={summary!.totalMentions}
+ value={summary!.totalMentions.toLocaleString()}
sub={
<CountDeltaBadge
current={summary!.totalMentions}
@@ -1550,7 +1550,7 @@ export default function InsightsPage() {
title={t('citations')}
tooltip="Times your brand's domain was cited as a source with a direct link in AI responses."
icon={Quote}
- value={summary!.totalCitations}
+ value={summary!.totalCitations.toLocaleString()}
sub={
<CountDeltaBadge
current={summary!.totalCitations}