Repository navigation
improvement(library): rank related posts by tag rarity, add backlinks, and widen comparison and pagination links - #9354
Conversation
…, and widen comparison and pagination links
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 15 files
Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.
Turn on auto-fix | Re-trigger cubic
[Medium impact] The PR appears safe to merge; no actionable issue was found. SummaryThe PR improves links between library posts and comparison pages.
Since the previous review, the only change excludes all referring posts from related results rather than just the six displayed backlinks. No actionable issue was found in that change or in the full diff’s rule check. No previous review threads were supplied.
|
…ust the six shown
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 15 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.
Turn on auto-fix | Re-trigger cubic
Summary
Simis on every library post andAI Agentson 120/123, so the list was effectively "the newest posts": 41/123 posts never appeared as related and one post held 46 of the 369 slotslib/content/links.tsbuilds a link index once per registry scan: related posts score shared tags and title terms weighted by rarity (a term on more than half the posts weighs zero), plus direct body links between posts, discounted for widely linked hubs. Equal scores break by a per-pair hash, then slug, so the result is deterministic and does not favor one post/comparisons/zapierand/comparisons/n8nlead with their alternatives articles (before, neither listed them). Posts whose body links to/comparisons/<id>now count as matches too. Matching the competitor name in body text was rejected because n8n appears in 113/123 bodies/libraryand/blogpagination shows numbered page links between Previous and Next. Page 1 links to the bare index instead of?page=1Link distribution across 123 published library posts (related-post blocks only, before → after):
For reference, the old algorithm at 6 slots would leave 25 posts never related and give one post 74 slots.
Follow-ups, not in this PR: indexable tag or hub pages, a curated guides block on the homepage, and a site-wide link index so blog posts count as referrers.
Type of Change
Testing
lib/content/links.test.ts(new): link extraction, rarity ranking, and inbound index. The ranking test fails with raw tag-count weights; the inbound test fails without the date sort or the self-link skipapp/(landing)/content-routing.test.tsx,lib/content/registry-factory.test.tspassbun run lint,check:comment-hygiene,check:unused-exports,check:source-conventions,check:file-names,check:boundaries,check:client-boundary,check:utils,check:library-content,check:test-patternscheck:audits, and the full test suite run in CIChecklist
test-auditauthoring gate)