Repository navigation
fix(mentions): take Copy summary's Total mentions change on the same prompts as its card - #1628
Merged
gkhngyk merged 1 commit intoOct 28, 2026
Conversation
…prompts as its card Since ansvisor#1230 the Mentions page takes every change on the prompts both windows answered, as Insights does, so adding or removing prompts doesn't read as a rise or a fall. Copy summary still took the Total mentions change on all of each window's responses: the copied text could say +30% under a card that said +10%. It now takes it on the same basis (changeBasis), as the card does. The other lines of the summary carry no change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
approved these changes
Oct 28, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good.
What I checked:
- Same basis as the card.
summaryTextnow takeschangeBasis(overview), which is whatOverviewKpisuses for Total mentions:relativeChange(base.occurrences, prev.occurrences), rounded to a whole percent. When there's nosame(before 00195), it falls back to all of each window, as the card does. The value on the line is still the whole window'scur.occurrences, the same as the card's. - The rest of the summary. The headline sentences already go through
changeBasis(mentions-headline.ts), and so does the MCP tool (mcp/mentions.ts). The other KPI lines carry no change. Nothing else in the export computes one. - Tests. The mentions folder's 5 test files pass (51 tests). With main's
_use-mentions-export.tsunder the same tests, the new test fails (+30% instead of +10%). - Merge. Clean on main 3f6a4d4.
Before the API deploy: web only. Nothing depends on the API.
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
Since #1230 the Mentions page takes every change on the prompts both windows answered, as Insights does. So adding or removing prompts doesn't read as a rise or a fall. Copy summary still took the Total mentions change on all of each window's responses. The copied text could say +30% under a card that said +10%.
It now takes it on the same basis (
changeBasis) as the card. The summary's other lines carry no change.Related issue
None. Ansvisor asked that the Insights and Mentions changes agree on the right basis: the prompts both windows answered (#1226, #1230).
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
cd web && yarn vitest run "src/app/[locale]/(dashboard)/dashboard/mentions"Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Checked together with the other PRs from the same test (one integration tree of all eleven on main 3f6a4d4):
server/:npm run format,npm run lintandnpm test(3,349 tests).web/:yarn format,yarn lint(0 errors, the 7 earlier warnings),yarn typecheck,yarn test(4,385 tests) andyarn build.🤖 Generated with Claude Code