Repository navigation
feat(prompts): add a Positions column with a per-platform positions panel - #1003
Merged
Merged
Conversation
…anel The Tracked Prompts table gets a Positions column. When the brand was mentioned or cited for a prompt in the selected window and location, a "See" button opens a right-side panel with that prompt's results per AI platform. Otherwise the cell shows "—". The panel reads the table's own window and location: - 24h shows each platform's latest answer: mention (position, sentiment) and citation (position), with "Detected earlier in this period" when an earlier answer in the window had what the latest one lacks. - 7d/30d/90d/custom show runs, tracked/mentioned/cited days, best/worst/avg mention position and a block per UTC day; opening a platform lists every run by day. A "Daily history" tab lists all platforms by day. - A day without an answer is "not tracked", never "not mentioned"; several answers on one day count that day once. - Mention position is the brand's rank among tracked brands (mention_position of mentioned_entity_count). Citation position is the brand's first source among the answer's sources, matched on the same own-domain rule as citation_count. Missing values read "Position unavailable", never a made-up number. Platforms the org's plan doesn't include show "Available on Growth" with Upgrade, or Contact us. They are never queried. Grok is offered through sales on every cloud plan: it is paused for everyone, and an included but empty card would look broken. Also: - The Early/Mid/Late rule and label move to shared modules; the Citation URL page uses them, unchanged. - The contact-sales URL becomes a constant shared with the plan switcher. - The Perplexity logo is centred in its viewBox (it sat to the left everywhere). The avatar gets a plain variant, used in the panel, that shows the ChatGPT mark black on light backgrounds. Claude-Session: https://claude.ai/code/session_0121amRjX7UFrgmGELAtkc7A
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Positions column to Prompts → Tracked Prompts. A See button opens a right-side panel that shows, per AI platform, where the brand was mentioned and cited for that prompt.
The column
mention_answersandcitation_answersper prompt, so the column needs no extra query.The panel uses the table's own window and location. It loads lazily through a new server action,
getPromptPositions.Counting rules
mention_positionout ofmentioned_entity_count, i.e. the brand's rank among tracked brands.citation_count. Over 3,000 recent cited answers, every one had a matching source.Plans
getOrgPlan), so Enterprise overrides apply.UNAVAILABLE_PLATFORMSin the tracking worker), so an included but empty card would look broken. The plan lists keep Grok, because removing it there would strip it from stored prompts. Self-hosted keeps it.Also
lib/position-tone.ts) and label (components/position-label.tsx) are shared now. The Citation URL page uses them and renders the same as before.CONTACT_SALES_URL, which the plan switcher shares.AIProviderAvatargets aplainvariant for the panel. It drops the round badge and shows the ChatGPT mark black on light backgrounds.No migration: everything comes from
prompt_results,brand_domainsand the plan.Related issue
None. This implements the team's Positions spec and mockup.
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
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)yarn test(466) andyarn buildalso pass.🤖 Generated with Claude Code
https://claude.ai/code/session_0121amRjX7UFrgmGELAtkc7A