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(citations): drop the type re-export that kills every citation action in prod

Gökhan Geyik55373fa864c3
diff --git a/web/src/lib/actions/citations.ts b/web/src/lib/actions/citations.ts
index 15177eb4a..6fa23971e 100644
--- a/web/src/lib/actions/citations.ts
+++ b/web/src/lib/actions/citations.ts
@@ -17,7 +17,13 @@ import { citationUrlMatchKey, normalizeCitationUrl } from '@/lib/citations/norma
export type CitationsDatePreset = '24h' | '7d' | '30d' | '90d' | 'all' | 'custom';
-export type { CitationsSourceScope };
+// Do NOT re-export types from this file with `export type { ... }`. This is a
+// 'use server' module, and Turbopack's production transform lists every export
+// clause in ensureServerEntryExports as a runtime value — a re-exported type
+// becomes a bare undefined identifier there, and the whole module (every
+// citation server action with it) dies at evaluation with a ReferenceError.
+// Import CitationsSourceScope from '@/lib/citations/scope' instead.
+// Declarations (`export type X = ...`, `export interface`) are erased fine.
export interface CitationsFilters {
datePreset: CitationsDatePreset;