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.

feat(prompts): say when a new prompt's first results come in the Table view, as the Locations view does (#1717)

Cihan086a12f95879
diff --git a/docs/guides/prompts.mdx b/docs/guides/prompts.mdx
index a48aedd32..8c3bb73a5 100644
--- a/docs/guides/prompts.mdx
+++ b/docs/guides/prompts.mdx
@@ -36,6 +36,8 @@ Each row in **Tracked Prompts** has a status:
- **Active** — tracked on its schedule.
- **Paused** — kept, but not tracked.
+A new prompt has no results until it's first asked. **Add prompt** and **Bulk import** start analyzing new prompts right away when they can; a prompt added from Prompt Suggestions, or one whose analysis couldn't start, gets its first results with the next daily run. Until then, for its first two days, the row says **Within 24h** in its first figure column, such as Visibility (**Paused** for a paused prompt when the Status column is hidden). An older prompt with no results in the range, such as days without a run, shows a dash, as does a range that ended before today.
+
The table opens on Active + New. The **Status** filter, or the cards above the table, show one status or all of them. The **Added** column shows when each prompt was added; click it to sort by it. **Track** on a suggestion in the Brand Visibility page's Opportunities opens Tracked Prompts in a new tab, with the new prompts on top.
Click a prompt's text to open its own page, with its visibility, mentions, citations and per-platform results.
diff --git a/web/messages/en.json b/web/messages/en.json
index b2e33b0ac..9c56cdcd3 100644
--- a/web/messages/en.json
+++ b/web/messages/en.json
@@ -7564,6 +7564,7 @@
"noAnswers": "No answers here in this period",
"pending": "Within 24h",
"pendingTip": "Tracked in {location} from the next daily run: its first results come within 24 hours.",
+ "promptPendingTip": "This prompt's first results come with the next daily run, within 24 hours.",
"paused": "Paused",
"pausedTip": "This prompt is paused, so it isn't asked anywhere until you resume it.",
"noEngine": "No engine here",
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/_location-matrix.test.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_location-matrix.test.tsx
index 66c3965b4..b5d419f84 100644
--- a/web/src/app/[locale]/(dashboard)/dashboard/prompts/_location-matrix.test.tsx
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_location-matrix.test.tsx
@@ -13,7 +13,7 @@ const getTrackingCountries = vi.hoisted(() => vi.fn());
vi.mock('@/lib/actions/tracking-countries', () => ({ getTrackingCountries }));
const { clearTrackingCountries } = await import('@/lib/use-tracking-countries');
-const { LocationMatrix, clearLocationMatrixCache, loadLocationMatrix } =
+const { LocationMatrix, LocationPending, clearLocationMatrixCache, loadLocationMatrix } =
await import('./_location-matrix');
/** Tracked Prompts' Locations view (PROMPT-015b). */
@@ -313,6 +313,94 @@ describe('a location with no answers yet', () => {
});
});
+describe('a prompt with no answers yet, in the Table view', () => {
+ async function renderPending(
+ p: Prompt,
+ region?: string,
+ window: { to?: string } = {},
+ awaiting = true,
+ ): Promise<{ shown: string; tip: string | null }> {
+ await act(async () => {
+ root.render(
+ <NextIntlClientProvider locale="en" messages={messages} timeZone="UTC">
+ <LocationPending prompt={p} region={region} window={window} awaiting={awaiting} />
+ </NextIntlClientProvider>,
+ );
+ });
+ const label = container.querySelector('button');
+ const described = label?.getAttribute('aria-describedby');
+ const shown = container.cloneNode(true) as HTMLElement;
+ shown.querySelectorAll('.sr-only').forEach((el) => el.remove());
+ return {
+ shown: shown.textContent ?? '',
+ tip: described ? (document.getElementById(described)?.textContent ?? null) : null,
+ };
+ }
+
+ it('says its first results come with the next daily run, for the keyboard and screen readers too', async () => {
+ const { shown, tip } = await renderPending(prompt('p1', 'new prompt', ['US']));
+ expect(shown).toBe('Within 24h');
+ expect(tip).toBe("This prompt's first results come with the next daily run, within 24 hours.");
+ });
+
+ it('says when the prompt is paused', async () => {
+ const { shown, tip } = await renderPending(
+ prompt('p1', 'paused prompt', ['US'], 'Coffee', { isActive: false }),
+ );
+ expect(shown).toBe('Paused');
+ expect(tip).toBe("This prompt is paused, so it isn't asked anywhere until you resume it.");
+ });
+
+ it("shows the plain dash for an older prompt with no answers in the range: it isn't waiting", async () => {
+ const { shown, tip } = await renderPending(
+ prompt('p1', 'older prompt', ['US']),
+ undefined,
+ {},
+ false,
+ );
+ expect(shown).toBe('—');
+ expect(tip).toBeNull();
+ // With a location picked, the dash says there were no answers there.
+ await renderPending(prompt('p1', 'older prompt', ['US']), 'US', {}, false);
+ expect(container.querySelector('span[title="No answers here in this period"]')).not.toBeNull();
+ });
+
+ it('says Paused, or No engine here, whatever its age', async () => {
+ // Copilot answers from Türkiye, not Kenya.
+ getTrackingCountries.mockResolvedValue([
+ { code: 'TR', models: ['chatgpt', 'copilot'] },
+ { code: 'KE', models: ['chatgpt'] },
+ ]);
+ const paused = prompt('p1', 'paused prompt', ['US'], 'Coffee', { isActive: false });
+ expect((await renderPending(paused, undefined, {}, false)).shown).toBe('Paused');
+ const copilot = prompt('p2', 'copilot only', ['KE'], 'Coffee', { platforms: ['copilot-web'] });
+ expect((await renderPending(copilot, 'KE', {}, false)).shown).toBe('No engine here');
+ });
+
+ it('shows the plain dash for a custom range that ended before today', async () => {
+ const { shown, tip } = await renderPending(prompt('p1', 'new prompt', ['US']), undefined, {
+ to: '2026-09-07T23:59:59Z',
+ });
+ expect(shown).toBe('—');
+ expect(tip).toBeNull();
+ expect(container.querySelector('span[title]')).toBeNull();
+ });
+
+ it('with a location picked, says it for that location', async () => {
+ getTrackingCountries.mockResolvedValue([
+ { code: 'TR', models: ['chatgpt', 'copilot'] },
+ { code: 'KE', models: ['chatgpt'] },
+ ]);
+ expect(await renderPending(prompt('p1', 'new prompt', ['US', 'TR']), 'TR')).toEqual({
+ shown: 'Within 24h',
+ tip: 'Tracked in Türkiye from the next daily run: its first results come within 24 hours.',
+ });
+ // None of its engines answers from there: no answers will come.
+ const copilot = prompt('p2', 'copilot only', ['KE'], 'Coffee', { platforms: ['copilot-web'] });
+ expect((await renderPending(copilot, 'KE')).shown).toBe('No engine here');
+ });
+});
+
describe('loadLocationMatrix', () => {
it('reads a location once a minute, and again after the cache is cleared', async () => {
const window = { from: '2026-10-21T00:00:00Z' };
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/_location-matrix.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_location-matrix.tsx
index 2015014c9..27874d1a9 100644
--- a/web/src/app/[locale]/(dashboard)/dashboard/prompts/_location-matrix.tsx
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_location-matrix.tsx
@@ -123,7 +123,8 @@ export function clearLocationMatrixCache() {
/**
* A location a prompt is tracked in that has no answers yet, and why: a
* paused prompt; none of its engines answering from there; or, usually,
- * just added: the next daily run asks it, within 24 hours.
+ * just added: the next daily run asks it, within 24 hours. Without a
+ * location, the same for the prompt in the Table view (pendingColumn).
*/
export function LocationPending({
prompt,
@@ -133,7 +134,8 @@ export function LocationPending({
className,
}: {
prompt: Pick<Prompt, 'isActive' | 'platforms' | 'models'>;
- region: string;
+ /** Undefined for the prompt across every location it's tracked in. */
+ region?: string;
/** The table's window: one that ended before today just had no answers there. */
window: { to?: string };
/**
@@ -146,7 +148,7 @@ export function LocationPending({
const t = useTranslations('prompts.locations');
const countries = useTrackingCountries();
const tipId = useId();
- const parsed = parseLocation(region);
+ const parsed = region ? parseLocation(region) : null;
const state = !reachesToday(window)
? null
: !prompt.isActive
@@ -158,12 +160,18 @@ export function LocationPending({
: null;
if (!state) {
return (
- <span className={cn('text-xs text-muted-foreground', className)} title={t('noAnswers')}>
+ <span
+ className={cn('text-xs text-muted-foreground', className)}
+ title={region ? t('noAnswers') : undefined}
+ >
—
</span>
);
}
- const tip = t(`${state}Tip`, { location: regionLabel(region) });
+ const tip =
+ !region && state === 'pending'
+ ? t('promptPendingTip')
+ : t(`${state}Tip`, { location: region ? regionLabel(region) : '' });
// Why, on hover and on keyboard focus; and for a screen reader, as the
// label's description.
return (
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx
index 85a6b47b3..f8c5cae87 100644
--- a/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx
@@ -210,6 +210,7 @@ import { getPromptTableViews, type PromptTableViews } from '@/lib/actions/prompt
import {
effectiveView,
parseLocationColumn,
+ pendingColumn,
visibleColumns,
type PromptColumnId,
} from '@/lib/prompt-table-columns';
@@ -4003,14 +4004,33 @@ function AllPromptsTab({
const vol = volumeByPromptId.get(p.id);
const vis = visibility[p.id];
const status = promptStatus(p, now);
- // Its empty location columns wait for their first answers only
- // while it's new, or answered elsewhere (a location just added).
+ // With no answers (in a location column, or at all), it waits for
+ // its first ones only while it's new, or answered elsewhere (a
+ // location just added); otherwise a dash.
const awaiting = awaitsFirstAnswers(
p,
Boolean(vis) ||
Object.values(locationMatrix?.[p.id] ?? {}).some((c) => c.runs > 0),
now,
);
+ // No answers in the window yet: when they come, or why not, said
+ // once in the first answer column shown, the others a dash.
+ const pendingAt = pendingColumn(p, {
+ hasAnswers: Boolean(vis),
+ region: regionFilter,
+ columns,
+ });
+ const noAnswers = (id: PromptColumnId) =>
+ pendingAt === id ? (
+ <LocationPending
+ prompt={p}
+ region={regionFilter || undefined}
+ window={positionsWindow}
+ awaiting={awaiting}
+ />
+ ) : (
+ <span className="text-xs text-muted-foreground">—</span>
+ );
const cells: Record<PromptColumnId, React.ReactNode> = {
topic: (
<TableCell key="topic">
@@ -4101,26 +4121,18 @@ function AllPromptsTab({
</div>
</div>
) : (
- <span className="text-xs text-muted-foreground">—</span>
+ noAnswers('visibility')
)}
</TableCell>
),
mentions: (
<TableCell key="mentions" className="text-right tabular-nums text-sm">
- {vis ? (
- formatNumber(vis.totalMentions)
- ) : (
- <span className="text-xs text-muted-foreground">—</span>
- )}
+ {vis ? formatNumber(vis.totalMentions) : noAnswers('mentions')}
</TableCell>
),
citations: (
<TableCell key="citations" className="text-right tabular-nums text-sm">
- {vis ? (
- formatNumber(vis.totalCitations)
- ) : (
- <span className="text-xs text-muted-foreground">—</span>
- )}
+ {vis ? formatNumber(vis.totalCitations) : noAnswers('citations')}
</TableCell>
),
positions: (
@@ -4128,7 +4140,11 @@ function AllPromptsTab({
{/* Fixed widths so the value, dots and See line up on every row. */}
<div className="inline-flex items-center gap-2">
<div className="w-[5.5rem] whitespace-nowrap">
- <PositionValue cell={positions[p.id]} vis={vis} />
+ {pendingAt === 'positions' ? (
+ noAnswers('positions')
+ ) : (
+ <PositionValue cell={positions[p.id]} vis={vis} />
+ )}
</div>
<div className="w-6">
{/* Whenever it has answers: a prompt never named is the one to open. */}
@@ -4173,11 +4189,7 @@ function AllPromptsTab({
),
runs: (
<TableCell key="runs" className="text-right tabular-nums text-sm">
- {vis ? (
- formatNumber(vis.runs)
- ) : (
- <span className="text-xs text-muted-foreground">—</span>
- )}
+ {vis ? formatNumber(vis.runs) : noAnswers('runs')}
</TableCell>
),
added: (
@@ -4194,7 +4206,9 @@ function AllPromptsTab({
),
lastRun: (
<TableCell key="lastRun" className="text-right text-xs text-muted-foreground">
- {formatRelative(vis?.lastRunAt, tCommon)}
+ {pendingAt === 'lastRun'
+ ? noAnswers('lastRun')
+ : formatRelative(vis?.lastRunAt, tCommon)}
</TableCell>
),
};
diff --git a/web/src/lib/prompt-table-columns.test.ts b/web/src/lib/prompt-table-columns.test.ts
index ba796ca5c..5cc24ad3c 100644
--- a/web/src/lib/prompt-table-columns.test.ts
+++ b/web/src/lib/prompt-table-columns.test.ts
@@ -5,6 +5,7 @@ import {
PROMPT_COLUMNS,
addLocationColumn,
parseLocationColumn,
+ pendingColumn,
removeColumn,
effectiveView,
moveColumn,
@@ -97,3 +98,50 @@ describe('location columns (PROMPT-015b)', () => {
expect(view?.order).not.toContain('loc:nope:TR');
});
});
+
+describe('pendingColumn', () => {
+ const active = { isActive: true, regions: ['US', 'TR'] };
+ const all = [...PROMPT_COLUMNS];
+
+ it('says it once, in the first answer column shown, for a row with no answers', () => {
+ expect(pendingColumn(active, { hasAnswers: false, region: '', columns: all })).toBe(
+ 'visibility',
+ );
+ // Visibility hidden, Runs moved ahead of Mentions.
+ expect(
+ pendingColumn(active, {
+ hasAnswers: false,
+ region: '',
+ columns: ['topic', 'status', 'runs', 'mentions', 'loc:visibility:TR'],
+ }),
+ ).toBe('runs');
+ // No answer column shown: nowhere.
+ expect(
+ pendingColumn(active, { hasAnswers: false, region: '', columns: ['topic', 'volume'] }),
+ ).toBeNull();
+ });
+
+ it('leaves a row with answers to its figures', () => {
+ expect(pendingColumn(active, { hasAnswers: true, region: '', columns: all })).toBeNull();
+ expect(pendingColumn(active, { hasAnswers: true, region: 'TR', columns: all })).toBeNull();
+ });
+
+ it('with a location picked, says it only for a prompt tracked there', () => {
+ expect(pendingColumn(active, { hasAnswers: false, region: 'TR', columns: all })).toBe(
+ 'visibility',
+ );
+ expect(pendingColumn(active, { hasAnswers: false, region: 'DE', columns: all })).toBeNull();
+ });
+
+ it("names a paused prompt only when the Status column doesn't already", () => {
+ const paused = { ...active, isActive: false };
+ expect(pendingColumn(paused, { hasAnswers: false, region: '', columns: all })).toBeNull();
+ expect(
+ pendingColumn(paused, {
+ hasAnswers: false,
+ region: '',
+ columns: all.filter((id) => id !== 'status'),
+ }),
+ ).toBe('visibility');
+ });
+});
diff --git a/web/src/lib/prompt-table-columns.ts b/web/src/lib/prompt-table-columns.ts
index 7e448325d..65d00f51b 100644
--- a/web/src/lib/prompt-table-columns.ts
+++ b/web/src/lib/prompt-table-columns.ts
@@ -150,6 +150,45 @@ export function sameView(a: PromptColumnsView, b: PromptColumnsView): boolean {
);
}
+/** The columns that read a prompt's answers in the window: each a dash until it has some. */
+export const ANSWER_COLUMNS: readonly PromptColumnId[] = [
+ 'visibility',
+ 'mentions',
+ 'citations',
+ 'positions',
+ 'runs',
+ 'lastRun',
+];
+
+/**
+ * Where a row with no answers in the window says when they come, or why
+ * not (LocationPending): once, in the first answer column shown, rather
+ * than in each. Null when it has answers; when the location picked is one
+ * it isn't tracked in, so none will come; when it's paused and the Status
+ * column already says so; or when no answer column shows.
+ */
+export function pendingColumn(
+ prompt: { isActive: boolean; regions: readonly string[] },
+ {
+ hasAnswers,
+ region,
+ columns,
+ }: {
+ hasAnswers: boolean;
+ /** The location picked; empty for every location. */
+ region: string;
+ columns: readonly TableColumnId[];
+ },
+): PromptColumnId | null {
+ if (hasAnswers) return null;
+ if (region && !prompt.regions.includes(region)) return null;
+ if (!prompt.isActive && columns.includes('status')) return null;
+ return (
+ columns.find((id): id is PromptColumnId => ANSWER_COLUMNS.includes(id as PromptColumnId)) ??
+ null
+ );
+}
+
/** The view a person sees: theirs, else the brand's, else the default. */
export function effectiveView(
mine: PromptColumnsView | null,