Skip to content

fix(comparison): use strict score comparisons for insights ties - #288

Open
Beehtrix wants to merge 1 commit into
O2sa:mainfrom
Beehtrix:cursor/insights-tie-handling-1798
Open

Beehtrix wants to merge 1 commit into
O2sa:mainfrom
Beehtrix:cursor/insights-tie-handling-1798

Conversation

@Beehtrix

@Beehtrix Beehtrix commented Dec 2, 2026

Copy link
Copy Markdown

Summary

InsightsList used >= when picking category leaders, so User 1 was always credited on ties. Leaders are now chosen with strict >; tied metrics show the existing equal notes and do not award strengths or improvement recommendations.

Changes

  • Add pickScoreLeader helper that returns null on equal scores
  • Award strengths only when a developer strictly leads a category
  • Show insights.equal.* / banner.tie copy for tied metrics and final scores
  • Skip category recommendations when scores are tied
  • Add insights-list.test.tsx coverage for ties and strict leads

Testing

  • pnpm exec vitest run src/features/comparison/tests/insights-list.test.tsx

Fixes #268

Award category strengths and recommendations only when one developer
strictly leads; show equal/tie notes when metrics match.

Fixes O2sa#268
Copilot AI lite review requested due to automatic review settings December 2, 2026 00:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Thank you for the pull request! ✅

A maintainer will review this soon. Please be patient while we take a look. 🙌

This branch has not been deployed

No deployments
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.

bug: InsightsList incorrectly favors User 1 when metrics are tied

2 participants