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(signals): show signal count changes in a neutral colour and say what each card counts (#1075)

Cihandd50eceed1fc
diff --git a/web/messages/en.json b/web/messages/en.json
index 26113f40a..19068728a 100644
--- a/web/messages/en.json
+++ b/web/messages/en.json
@@ -231,10 +231,15 @@
"subtitle": "Real-time signals from AI Search, your site, and the web. These signals drive your Action Center.",
"cards": {
"total": "Total Signals",
+ "totalPopulation": "active in the last {days, plural, one {day} other {# days}}",
"important": "Important Signals",
+ "importantPopulation": "high impact, active in the last {days, plural, one {day} other {# days}}",
"new": "New Signals",
+ "newPopulation": "detected in the last {days, plural, one {day} other {# days}}",
"resolved": "Resolved Signals",
+ "resolvedPopulation": "resolved in the last {days, plural, one {day} other {# days}}",
"avgImpact": "Avg. Signal Impact",
+ "avgImpactPopulation": "across signals active in the last {days, plural, one {day} other {# days}}",
"noPrev": "no previous data",
"vsRange": "vs {range}",
"impactSame": "Same as previous {days} days",
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/action-center/signals/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/action-center/signals/page.tsx
index 41d2bebb6..f681a792a 100644
--- a/web/src/app/[locale]/(dashboard)/dashboard/action-center/signals/page.tsx
+++ b/web/src/app/[locale]/(dashboard)/dashboard/action-center/signals/page.tsx
@@ -8,6 +8,7 @@ import {
AlertCircle,
Download,
Info,
+ Minus,
Radar,
Search,
TrendingDown,
@@ -55,6 +56,7 @@ import { cn } from '@/lib/utils';
import { toCsv } from '@/lib/csv';
import { readUrlChoice, readUrlParam, writeUrlParams } from '@/lib/url-state';
import type { KpiTrendPoint } from '@/lib/actions/kpis';
+import { signalChangeTone, signedPercent, type SignalMetric } from '@/lib/signals/metrics';
const SIGNAL_EXPORT_HEADERS = [
'title',
@@ -428,7 +430,9 @@ function SignalsContent({ brand }: { brand: Brand }) {
{summary && (
<div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-5">
<SummaryCard
+ metric="total"
label={t('cards.total')}
+ population={t('cards.totalPopulation', { days: windowDays })}
value={summary.total}
prev={summary.prevTotal}
rangeLabel={prevRangeLabel}
@@ -436,7 +440,9 @@ function SignalsContent({ brand }: { brand: Brand }) {
note={countsNote}
/>
<SummaryCard
+ metric="important"
label={t('cards.important')}
+ population={t('cards.importantPopulation', { days: windowDays })}
value={summary.important}
prev={summary.prevImportant}
rangeLabel={prevRangeLabel}
@@ -444,7 +450,9 @@ function SignalsContent({ brand }: { brand: Brand }) {
note={countsNote}
/>
<SummaryCard
+ metric="new"
label={t('cards.new')}
+ population={t('cards.newPopulation', { days: windowDays })}
value={summary.newCount}
prev={summary.prevNew}
rangeLabel={prevRangeLabel}
@@ -452,7 +460,9 @@ function SignalsContent({ brand }: { brand: Brand }) {
note={countsNote}
/>
<SummaryCard
+ metric="resolved"
label={t('cards.resolved')}
+ population={t('cards.resolvedPopulation', { days: windowDays })}
value={summary.resolved}
prev={summary.prevResolved}
rangeLabel={prevRangeLabel}
@@ -599,14 +609,19 @@ function SignalsContent({ brand }: { brand: Brand }) {
}
function SummaryCard({
+ metric,
label,
+ population,
value,
prev,
rangeLabel,
spark,
note,
}: {
+ metric: SignalMetric;
label: string;
+ /** What the count counts, in the selected range (AC-008). */
+ population: string;
value: number;
prev: number;
rangeLabel: string;
@@ -636,21 +651,26 @@ function SummaryCard({
</span>
)}
</div>
+ <p className="mt-0.5 text-xs text-muted-foreground">{population}</p>
<p className="mt-1 flex items-center gap-1 text-xs text-muted-foreground">
{change !== null ? (
<>
<span
className={cn(
'flex items-center gap-0.5 font-medium',
- change >= 0 ? 'text-green-600 dark:text-green-400' : 'text-red-500',
+ signalChangeTone(metric, change) === 'positive'
+ ? 'text-green-600 dark:text-green-400'
+ : 'text-foreground/80',
)}
>
- {change >= 0 ? (
- <TrendingUp className="h-3 w-3" />
+ {change > 0 ? (
+ <TrendingUp className="h-3 w-3" aria-hidden="true" />
+ ) : change < 0 ? (
+ <TrendingDown className="h-3 w-3" aria-hidden="true" />
) : (
- <TrendingDown className="h-3 w-3" />
+ <Minus className="h-3 w-3" aria-hidden="true" />
)}
- {Math.abs(change)}%
+ {signedPercent(change)}
</span>
{t('cards.vsRange', { range: rangeLabel })}
</>
@@ -685,6 +705,9 @@ function AvgImpactCard({ summary, days }: { summary: SignalsSummary; days: numbe
<CardContent className="p-4">
<p className="text-xs font-medium text-muted-foreground">{t('cards.avgImpact')}</p>
<p className="mt-1 text-2xl font-bold">{t(`impact.${level}`)}</p>
+ <p className="mt-0.5 text-xs text-muted-foreground">
+ {t('cards.avgImpactPopulation', { days })}
+ </p>
<div className="mt-1.5 flex gap-0.5" aria-hidden="true">
{Array.from({ length: 12 }, (_, i) => (
<span
diff --git a/web/src/lib/signals/metrics.test.ts b/web/src/lib/signals/metrics.test.ts
new file mode 100644
index 000000000..16291f61d
--- /dev/null
+++ b/web/src/lib/signals/metrics.test.ts
@@ -0,0 +1,23 @@
+import { describe, expect, it } from 'vitest';
+import { signalChangeTone, signedPercent, type SignalMetric } from './metrics';
+
+describe('signalChangeTone', () => {
+ it('shows a change in how many signals there are as neutral, either way', () => {
+ for (const metric of ['total', 'important', 'new'] as SignalMetric[]) {
+ expect(signalChangeTone(metric, 878)).toBe('neutral');
+ expect(signalChangeTone(metric, -40)).toBe('neutral');
+ }
+ });
+
+ it('shows more resolved as good, and fewer as neutral', () => {
+ expect(signalChangeTone('resolved', 1300)).toBe('positive');
+ expect(signalChangeTone('resolved', -25)).toBe('neutral');
+ expect(signalChangeTone('resolved', 0)).toBe('neutral');
+ });
+});
+
+describe('signedPercent', () => {
+ it('says which way the count went', () => {
+ expect([550, -40, 0].map(signedPercent)).toEqual(['+550%', '−40%', '0%']);
+ });
+});
diff --git a/web/src/lib/signals/metrics.ts b/web/src/lib/signals/metrics.ts
new file mode 100644
index 000000000..e1dc8c4ae
--- /dev/null
+++ b/web/src/lib/signals/metrics.ts
@@ -0,0 +1,28 @@
+/**
+ * The Signals page's summary cards (AC-008): which population each counts,
+ * and how a change against the previous period is coloured.
+ *
+ * More signals usually means more losses and gaps, so a change in how many
+ * there are is not good news by itself: it is shown neutral, whichever way it
+ * goes. Only more resolved is plainly good. Fewer resolved isn't plainly bad
+ * either (fewer problems may have come up), so it stays neutral too.
+ */
+
+export type SignalMetric = 'total' | 'important' | 'new' | 'resolved';
+
+export type ChangeTone = 'positive' | 'neutral';
+
+export function signalChangeTone(metric: SignalMetric, change: number): ChangeTone {
+ return metric === 'resolved' && change > 0 ? 'positive' : 'neutral';
+}
+
+/**
+ * "+550%", "−40%", "0%": a change against the previous period, with its
+ * direction in the text. With the colour neutral, an icon alone would leave
+ * it to shape, and screen readers would hear no direction at all.
+ */
+export function signedPercent(change: number): string {
+ if (change > 0) return `+${change}%`;
+ if (change < 0) return `−${Math.abs(change)}%`;
+ return '0%';
+}