Skip to content

fix: combine competitor evidence improvements#201

Merged
arberx merged 3 commits intomainfrom
ax/combine-competitor-evidence
Mar 30, 2026
Merged

fix: combine competitor evidence improvements#201
arberx merged 3 commits intomainfrom
ax/combine-competitor-evidence

Conversation

@arberx
Copy link
Copy Markdown
Member

@arberx arberx commented Mar 30, 2026

Supersedes #197 and #199.

What Changed

  • combines the tabbed evidence sidebar from feat: tabbed sidebar — Competitors + Sources #197 with the recommendedCompetitors storage/API path from feat: extract and display AI-recommended company names in runs #199
  • keeps cited domains visible as canonical evidence instead of replacing them when heuristic company names are present
  • tightens competitor-name extraction so it only emits names that line up with cited or matched competitor domains and filters generic headings / the target brand more reliably
  • propagates recommendedCompetitors consistently through run detail, project snapshots, contracts, and tests

Why

  • #197 had the correct UI separation between competitors and sources
  • #199 added useful backend data but replaced cited-domain evidence in the modal and exposed the new field inconsistently across snapshot endpoints
  • this PR preserves the evidence model: groundingSources remain raw source records, citedDomains remain canonical citation evidence, and recommendedCompetitors is an additional interpretive layer

Validation

  • pnpm exec vitest run packages/canonry/test/job-runner-competitors.test.ts packages/contracts/test/index.test.ts packages/db/test/index.test.ts packages/api-routes/test/index.test.ts
  • pnpm --filter @ainyc/canonry-web run typecheck
  • pnpm --filter @ainyc/canonry run typecheck
  • pnpm --filter @ainyc/canonry-api-routes run typecheck
  • pnpm --filter @ainyc/canonry-contracts run typecheck
  • pnpm --filter @ainyc/canonry-db run typecheck
  • matching lint runs for those same packages

@arberx arberx marked this pull request as ready for review March 30, 2026 18:19
@arberx arberx merged commit 6d1bd4a into main Mar 30, 2026
2 checks passed
@arberx arberx deleted the ax/combine-competitor-evidence branch March 30, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant