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.
TypeScript aeoai-agentai-searchanswer-engine-optimizationbrand-monitoringchatgptclaudecopilotdockergeminigeogoogle-ai-overviewsgrokmcpnextjsopen-sourceperplexityseosupabasetypescript
feat(plans): track Microsoft Copilot instead of Perplexity on Starter (#1040)
Cihanb15e20313413
diff --git a/docs/guides/add-your-first-brand.mdx b/docs/guides/add-your-first-brand.mdxindex 23eaf85ff..2a6026055 100644--- a/docs/guides/add-your-first-brand.mdx+++ b/docs/guides/add-your-first-brand.mdx@@ -52,7 +52,7 @@ The onboarding wizard has **5 steps for self-hosted** instances and **6 steps fo- Add custom prompts at the bottom<Note>- These prompts will run on every AI platform allowed by your plan. Self-hosted unlocks all 8 (ChatGPT, Google AI Overview, Google AI Mode, Google Gemini, Perplexity, Microsoft Copilot, Grok, Claude). Starter plan runs ChatGPT + Perplexity by default; Growth and Enterprise unlock the rest.+ These prompts will run on every AI platform allowed by your plan. Self-hosted unlocks all 8 (ChatGPT, Google AI Overview, Google AI Mode, Google Gemini, Perplexity, Microsoft Copilot, Grok, Claude). Starter plan runs ChatGPT + Microsoft Copilot by default; Growth and Enterprise unlock the rest.</Note><Tip>@@ -124,9 +124,9 @@ Visits start logging immediately; the dashboard updates near-realtime.properly.</Accordion><Accordion title="Why is Google AI Overview missing from my plan?">- Starter plan runs only ChatGPT and Perplexity. Google AI Overview, Google AI- Mode, Gemini, Copilot, Grok, and Claude unlock on Growth and Enterprise- plans (cloud), or are all available immediately on self-hosted.+ Starter plan runs only ChatGPT and Microsoft Copilot. Google AI Overview,+ Google AI Mode, Gemini, Perplexity, Grok, and Claude unlock on Growth and+ Enterprise plans (cloud), or are all available immediately on self-hosted.</Accordion><Accordion title="Can I add more topics later?">Yes. From the **Topics** page or the **Suggestions** card in **Prompts →diff --git a/server/src/config/plans.js b/server/src/config/plans.jsindex f594996c1..9484beff0 100644--- a/server/src/config/plans.js+++ b/server/src/config/plans.js@@ -55,7 +55,7 @@ export const PLANS = {maxSiteAudits: 100,maxDailyOnDemand: 3,onDemandCooldownMinutes: 15,- allowedScrapers: ['chatgpt-web', 'perplexity-web'],+ allowedScrapers: ['chatgpt-web', 'copilot-web'],allowedModels: [],features: ['basic_insights',diff --git a/supabase/migrations/00134_starter_copilot.sql b/supabase/migrations/00134_starter_copilot.sqlnew file mode 100644index 000000000..099b8896e--- /dev/null+++ b/supabase/migrations/00134_starter_copilot.sql@@ -0,0 +1,26 @@+-- Starter tracks ChatGPT and Microsoft Copilot, no longer ChatGPT and+-- Perplexity.+--+-- The plan's engine list lives in config/plans (web and server), and new or+-- edited prompts follow it. The tracking worker, though, runs each prompt's+-- stored `platforms`, so prompts saved under the old list would keep running+-- Perplexity and never get Copilot. This swaps the engine on the prompts of+-- every organization on the Starter plan, as alignPromptsToPlanForOrg does on+-- a plan change. Past Perplexity results stay as they are.+--+-- Only cloud organizations are touched: a Stripe customer exists only there.+-- Self-hosted installs run every engine, whatever `plan` holds.++update public.prompts p+set platforms = case+ -- Already tracking Copilot: drop Perplexity rather than list Copilot twice.+ when 'copilot-web' = any (p.platforms) then array_remove(p.platforms, 'perplexity-web')+ else array_replace(p.platforms, 'perplexity-web', 'copilot-web')+ end+from public.prompt_sets ps+join public.brands b on b.id = ps.brand_id+join public.organizations o on o.id = b.organization_id+where p.prompt_set_id = ps.id+ and o.plan = 'starter'+ and o.stripe_customer_id is not null+ and 'perplexity-web' = any (p.platforms);diff --git a/supabase/schema.sql b/supabase/schema.sqlindex 2610e1634..fd4a847ca 100644--- a/supabase/schema.sql+++ b/supabase/schema.sql@@ -16489,6 +16489,36 @@ as $$);$$;+-- ─────────────────────────────────────────────────────────────────────────+-- migrations/00134_starter_copilot.sql+-- ─────────────────────────────────────────────────────────────────────────+-- Starter tracks ChatGPT and Microsoft Copilot, no longer ChatGPT and+-- Perplexity.+--+-- The plan's engine list lives in config/plans (web and server), and new or+-- edited prompts follow it. The tracking worker, though, runs each prompt's+-- stored `platforms`, so prompts saved under the old list would keep running+-- Perplexity and never get Copilot. This swaps the engine on the prompts of+-- every organization on the Starter plan, as alignPromptsToPlanForOrg does on+-- a plan change. Past Perplexity results stay as they are.+--+-- Only cloud organizations are touched: a Stripe customer exists only there.+-- Self-hosted installs run every engine, whatever `plan` holds.++update public.prompts p+set platforms = case+ -- Already tracking Copilot: drop Perplexity rather than list Copilot twice.+ when 'copilot-web' = any (p.platforms) then array_remove(p.platforms, 'perplexity-web')+ else array_replace(p.platforms, 'perplexity-web', 'copilot-web')+ end+from public.prompt_sets ps+join public.brands b on b.id = ps.brand_id+join public.organizations o on o.id = b.organization_id+where p.prompt_set_id = ps.id+ and o.plan = 'starter'+ and o.stripe_customer_id is not null+ and 'perplexity-web' = any (p.platforms);+-- ─────────────────────────────────────────────────────────────────────────-- migrations/00147_insights_same_prompts_definer.sql-- ─────────────────────────────────────────────────────────────────────────diff --git a/web/src/app/[locale]/(onboarding)/dashboard/onboarding/page.tsx b/web/src/app/[locale]/(onboarding)/dashboard/onboarding/page.tsxindex 6b8871bd5..7e6b55d44 100644--- a/web/src/app/[locale]/(onboarding)/dashboard/onboarding/page.tsx+++ b/web/src/app/[locale]/(onboarding)/dashboard/onboarding/page.tsx@@ -224,7 +224,7 @@ const PLAN_STEP_COPY: Partial<starter: {tagline: 'Essential AI visibility tracking.',platformFeatures: 'Core Platform Features',- engines: 'ChatGPT & Perplexity',+ engines: 'ChatGPT & Microsoft Copilot',},growth: {tagline: 'Advanced AI insights to accelerate growth.',diff --git a/web/src/config/plans.ts b/web/src/config/plans.tsindex 889285879..3a7f44449 100644--- a/web/src/config/plans.ts+++ b/web/src/config/plans.ts@@ -146,7 +146,7 @@ export const PLANS: Record<PlanId, Plan> = {maxSiteAudits: 100,maxDailyOnDemand: 3,onDemandCooldownMinutes: 15,- allowedScrapers: ['chatgpt-web', 'perplexity-web'],+ allowedScrapers: ['chatgpt-web', 'copilot-web'],allowedModels: [],features: ['basic_insights',diff --git a/web/src/lib/plan-engines.test.ts b/web/src/lib/plan-engines.test.tsindex ba442ec08..352ff474a 100644--- a/web/src/lib/plan-engines.test.ts+++ b/web/src/lib/plan-engines.test.ts@@ -12,7 +12,7 @@ vi.mock('@/lib/supabase/admin', () => ({ supabaseAdmin: {} }));const ALL_SCRAPER_IDS = ALL_SCRAPERS.map((s) => s.id);const ALL_MODEL_IDS = ALL_MODELS.map((m) => m.id);-const STARTER_SCRAPER_IDS = ['chatgpt-web', 'perplexity-web'];+const STARTER_SCRAPER_IDS = ['chatgpt-web', 'copilot-web'];/*** getPlan() short-circuits to the self-hosted plan unless the instance isdiff --git a/web/src/lib/plan-engines.ts b/web/src/lib/plan-engines.tsindex 3443a2fc8..4691d2794 100644--- a/web/src/lib/plan-engines.ts+++ b/web/src/lib/plan-engines.ts@@ -10,7 +10,7 @@ import { ALL_MODELS, ALL_SCRAPERS } from '@/config/prompt-options';* `allowedModels` is **absent** on the plan, every engine / model is allowed* (Growth, Enterprise, Self-hosted). If it's an **array** — even an empty* one — only the listed ids are allowed (Starter ships- * `allowedScrapers: ['chatgpt-web', 'perplexity-web']` and+ * `allowedScrapers: ['chatgpt-web', 'copilot-web']` and* `allowedModels: []`).** Used by the Stripe success route to align onboarding-created prompts to@@ -44,7 +44,7 @@ export function getActiveEngineIdsForPlan(planId: PlanId | string | null | undef* so every prompt's platforms array becomes all 8 engine ids. Without* this an upgraded Growth customer keeps tracking only 2 engines (#79).* - **Contraction** (Growth → Starter on downgrade / cancellation):- * Starter restricts to `['chatgpt-web', 'perplexity-web']`, so prompts+ * Starter restricts to `['chatgpt-web', 'copilot-web']`, so prompts* get trimmed down. Without this a downgraded org would keep paying* scraper cost on engines the plan no longer covers.*diff --git a/web/src/lib/prompt-positions.test.ts b/web/src/lib/prompt-positions.test.tsindex cfb3e71ef..dcf653cce 100644--- a/web/src/lib/prompt-positions.test.ts+++ b/web/src/lib/prompt-positions.test.ts@@ -16,11 +16,11 @@ const accessFor = (plan: Plan) =>Object.fromEntries(POSITION_PLATFORMS.map((p) => [p.id, platformAccess(plan, p.id)]));describe('platformAccess', () => {- it('locks Starter to ChatGPT and Perplexity, with Grok and Claude behind sales', () => {+ it('locks Starter to ChatGPT and Microsoft Copilot, with Grok and Claude behind sales', () => {const access = accessFor(PLANS.starter);expect(access['chatgpt-web']).toEqual({ state: 'included' });- expect(access['perplexity-web']).toEqual({ state: 'included' });- for (const id of ['google-aio', 'google-aimode', 'gemini-web', 'copilot-web']) {+ expect(access['copilot-web']).toEqual({ state: 'included' });+ for (const id of ['google-aio', 'google-aimode', 'gemini-web', 'perplexity-web']) {expect(access[id]).toEqual({ state: 'locked', requiredPlan: 'growth' });}expect(access['grok-web']).toEqual({ state: 'locked', requiredPlan: 'enterprise' });