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(prompts): drop the progress count when it cannot move (#752)

Gökhan Geyik0faf9320174c
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx
index e4ad29f42..5439829c3 100644
--- a/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/page.tsx
@@ -1142,7 +1142,7 @@ export default function PromptsPage() {
if (analysisGenRef.current !== gen) return { finished: false, superseded: true };
if (!status) break;
- setAnalysisProgress({ done: status.done, total: status.total });
+ setAnalysisProgress(status.done === null ? null : { done: status.done, total: status.total });
if (!status.running) {
finished = true;
break;
@@ -1173,7 +1173,7 @@ export default function PromptsPage() {
if (analysisGenRef.current !== gen || !status?.running) return;
setAnalyzing(true);
- setAnalysisProgress({ done: status.done, total: status.total });
+ setAnalysisProgress(status.done === null ? null : { done: status.done, total: status.total });
const { finished, superseded } = await watchVolumeAnalysis(brandId, gen);
if (superseded || analysisGenRef.current !== gen) return;
@@ -1317,7 +1317,9 @@ export default function PromptsPage() {
const quotaExhausted = quota !== null && quota.limit !== -1 && quota.remaining <= 0;
// Reads "Analyzing 32/100..." once the first poll lands, so a run measured in
- // minutes shows movement instead of an indefinite spinner.
+ // minutes shows movement instead of an indefinite spinner. A count is only
+ // shown while it is one: a server that does not report live progress leaves
+ // it out rather than parking on 0/100, which says less than no number at all.
const analyzingLabel = analysisProgress
? `Analyzing ${analysisProgress.done}/${analysisProgress.total}...`
: 'Analyzing...';
diff --git a/web/src/lib/actions/volumes.ts b/web/src/lib/actions/volumes.ts
index 43e199ea0..1f568a8a9 100644
--- a/web/src/lib/actions/volumes.ts
+++ b/web/src/lib/actions/volumes.ts
@@ -69,8 +69,15 @@ export interface VolumeAnalysisStatus {
total: number;
/** Rows on disk. During a run these are all written at the very end. */
analyzed: number;
- /** Prompts the run has finished with — what a progress readout counts. */
- done: number;
+ /**
+ * Prompts the run has finished with — what a progress readout counts.
+ *
+ * null when the server does not report live progress, which is any build
+ * that predates it. Rows on disk are not a stand-in: they all appear at the
+ * very end, so substituting them would show a count frozen at zero for the
+ * whole run and then jumping to the total.
+ */
+ done: number | null;
}
async function toErrorCode(res: Response): Promise<VolumeErrorCode> {
@@ -149,7 +156,7 @@ export async function getVolumeAnalysisStatus(
running: Boolean(body.running),
total: body.total ?? 0,
analyzed: body.analyzed ?? 0,
- done: body.done ?? body.analyzed ?? 0,
+ done: typeof body.done === 'number' ? body.done : null,
};
}