Repository navigation
feat(prompts): label Similar Topics, Prompt Suggestions and the prompt page's AI volume as estimates - #1362
Conversation
…adge and method note PROMPT-013, part 1. A prompt's AI volume is the median Google volume of its keywords x the AI adoption rate; how far to trust it follows from how many keywords have data and how closely they agree. lib/volume-estimate.ts turns each stored estimate into a range and a confidence (high, medium, low; a level less when over six months old), and adds them up for the Insights cards. The Prompts page shows ranges with a dashed Estimate badge and a method note (sources, month, confidence, date), greys low-confidence estimates, leaves them out of High Opportunity on their own and sorts them after the confident ones by Volume. The Tracked Prompts CSV gains volume_type, volume_confidence, the range and volume_date. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t page's AI volume as estimates PROMPT-013, part 2. Two more kinds of estimate: one keyword's AI share (its Google volume is measured, only the adoption rate assumed: medium, ±25%) for Similar Topics' rows, and an AI's guess (always low, half to twice) for Prompt Suggestions' volume badge. The method note words each. Similar Topics' Est. AI Volume card shows the prompts' summed range with the Estimate badge, and a prompt's detail page gains an "AI searches a month" card, read through getPromptVolume (the prompt is checked with the user's client before prompt_volumes is read with the admin client). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk PROMPT-013 part 2, stacked on #1361 (own change 3b84ff0). Similar Topics' rows use a keyword-level estimate (measured Google volume × the assumed rate: medium, ±25%), Prompt Suggestions' volume is labelled an AI's guess (always low), and the prompt detail page gets an "AI searches a month" card. That card reads |
…an, one note per table Review fixes for PROMPT-013 part 1. The keywords are head terms that spread widely by design, so agreement is now the upper over the lower quartile of the measured volumes (as percentile_cont): high at three or more within 4x, medium at two or more within 15x. The range is the AI share of that middle half, clamped to half to twice. The note calls the 45% the share of Google searches that now get an AI answer. Long tables share one tooltip through createEstimateNoteHandle, the Prompt Volumes chart shows each platform's share of the range, rankable is used by both ranking rules, and perMonth waits for part 2. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lume-pages # Conflicts: # web/messages/en.json # web/src/components/prompts/volume-estimate.test.tsx # web/src/components/prompts/volume-estimate.tsx
…t Suggestions As ansvisor#1361's tables do: each long list mounts one method note through createEstimateNoteHandle rather than one per row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk merged #1361's review fixes (d297d95) forward (eaa42e0): the quartile rule, the "AI answer" wording (also in this PR's |
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good. I reviewed part 2 on top of #1361 (3b84ff0, eaa42e0 and 78dacca).
- The merge of #1361 (eaa42e0) hides no changes.
- Only the three conflicted files differ from a plain re-merge.
- Those take #1361's side, carry its new wording into
methodKeywordand its test, and keepperMonth("/mo"), which this PR uses.
getPromptVolumeis scoped to the caller's org. It reads the prompt with the user's client first, so theprompts: member selectpolicy limits it to the caller's org before the admin read. A test covers it.- Merge state: it merges cleanly on main and adds no migration.
Two small follow-ups, neither blocking:
- Unused field:
PromptVolumeCluster.estimatedAiVolume(web/src/lib/prompt-volume-clusters.ts:7,:59,:72) has no reader left. Similar Topics now rebuilds the same number fromvolume × aiVolumeMultiplier(similar-topics/page.tsx:205). Either build the keyword estimate from the field, or drop it along with its test expectation (prompt-volume-clusters.test.ts:40). - PR body: it still quotes the old note ("the share of searches that now happen in AI assistants") for the keyword estimate. It also names only 3b84ff0 as this PR's own change, but 78dacca is this PR's too.
gkhngyk
left a comment
There was a problem hiding this comment.
Re-approving after merging main into the branch. The merge only brings in the squashed parent PR; the tree matches the one tested (web and server tests, typecheck, lint, format).
Summary
PROMPT-013, part 2 of 3: the estimate label reaches Similar Topics, Prompt Suggestions and the prompt detail page.
Two kinds of estimate join the prompt-level one from #1361 (
lib/volume-estimate.ts). Each is marked with abasis, and the method note words each kind its own way.One keyword's AI share (
keywordVolumeEstimate, Similar Topics rows)An AI's guess (
guessedVolumeEstimate, Prompt Suggestions)prompt_suggestions.est_volumeis an LLM figure scaled to the brand's tracked prompts. No keyword behind it is measured.Where
prompts/similar-topics/page.tsx):PromptVolumeClusternow carries theaiVolumeMultiplierbehind its estimate and the latestfetchedAtamong its prompts._suggestions-card.tsx): the "~1,200/mo" badge becomes a grey "600–2.4k/mo" with the note. Search Console and Analytics rows keep their measured figures, as before.prompts/[id]/page.tsx): a fourth card, "AI searches a month", shows the prompt's range and Estimate badge (mockup screen 2). It appears only when the prompt has a volume.prompt_volumesis server-only, so the newgetPromptVolume(promptId)action (lib/actions/prompt-volume.ts, its own module sovolumes.tsstays free of the admin client) first reads the prompt with the signed-in user's client (RLS). Only for a prompt they can see does it read the volume with the admin client, asreadPromptDemanddoes.Strings:
prompts.similarTopics.aiTitle/aiSub,prompts.volumeInsights.detailTitle, and the newvolumeEstimatenote keys.perMonthnow reads "/mo".Related issue
ROADMAP plan item 03 (PROMPT-013), queued by the user on 2026-10-22. No issue.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
Checked locally on the demo brand at 1024 px, in light and dark:
Tests:
lib/volume-estimate.test.ts(+3): the keyword estimate, its stale or empty case, and the guess.components/prompts/volume-estimate.test.tsx(+2): the notes for a keyword and a guess.prompt-volume-clusters.test.ts(+1): rate and latest fetch.lib/actions/prompt-volume.test.ts(2, new): reads only a prompt the caller can see; null without a volume._suggestions-card.test.tsx(+1): the grey range instead of "~1,200".Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/) (0 errors; the 6 warnings are in untouched files, as on main)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run: web
yarn test(2,746 tests) andyarn build.🤖 Generated with Claude Code