Repository navigation
fix(seed): give the demo answers mention positions and a run a day - #1087
Merged
Merged
Conversation
The demo's answers had no mention_position, so the Prompts table's Positions column read "—" everywhere and the panel had no position to show; and they were spaced exactly 6 hours apart, which the panel's run count (a new run per gap of more than 6 hours) folded into a single run. Each answer now names Acme Coffee among competitors in one of four orders, stores the position response-parser.js would compute from that text, and lands in a daily run of four answers 20 minutes apart. Prompt 807's recent rows keep a run a day too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
8 of 12 tasks
Collaborator
Author
|
@gkhngyk a seed fix for review: the demo answers had no |
7 of 12 tasks
gkhngyk
approved these changes
Oct 16, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Thanks, approving. The four answer texts match the stored positions (1 of 3, 2 of 2, 3 of 3, 1 of 2), and n comes from row_number(), so the day and 20-minute steps divide as integers.
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
The demo's answers get mention positions and a run a day, so the Prompts table's Positions column and the positions panel show something on a fresh install.
Two problems in the demo answers made the positions features look broken locally:
seed.sqlinserted every demo answer without amention_position. The Positions column read "—" for every prompt in every range, and the panel had no position to show.now() - n * 6 hours). The panel starts a new run only after a gap of more than 6 hours (feat(prompts): add a Positions column with a per-platform positions panel #1003), so a prompt with 40 answers over 11 days read "1 run".The positions code itself is fine. I checked it end to end on realistic answers: parser →
prompt_position_summaries→ table → panel.What changes in
supabase/seed.sqlmention_positionandmentioned_entity_countthatresponse-parser.js'scomputeMentionPositionreturns for its text. I checked this against the parser for every generated row: 166 rows, 0 mismatches.Mention and citation counts, competitor entries, regions and everything else are unchanged. That keeps the other demo pages (Insights, Competitors…) showing what they did.
Related issue
None. Found while checking the Positions column and panel; the UI changes from the same check are #1088, #1089 and #1090.
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
supabase db reset).#1.7.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): not run; no web code changedyarn typecheckpasses (run fromweb/): not run; no web code changedyarn format:checkpasses (run fromweb/): not run; no web code changedAlso checked:
computeMentionPosition, and runs equal days per prompt.Known, left as is: the seeded
competitor_mentionscounts and Acme'smention_countare arithmetic (n % 4,1 + n % 5), so they don't follow the answer text. That predates this PR; changing it would reshape the Competitors and Insights demo numbers.🤖 Generated with Claude Code