Repository navigation
Conversation
Award category strengths and recommendations only when one developer strictly leads; show equal/tie notes when metrics match. Fixes O2sa#268
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Repository overviewVortex generated this as context for automated review — expand for the architecture summary and data-flow diagram. Repository overview & data flowArchitecture
Key modules and data flow
Conventions and operations
Reviewer orientation
Data flowflowchart TD
Browser[Browser] --> Route[Localized route or profile API]
Route --> Service[Profile and comparison services]
Service --> Lookup{Redis or PostgreSQL profile available?}
Lookup -->|yes| Result[Profile result]
Lookup -->|no| GitHub[GitHub GraphQL]
GitHub --> Scoring[Scoring engine]
Scoring --> Result
Result --> UI[Profile or comparison UI]
Scoring --> Persist[Background cache and score persistence]
Persist --> Lookup
Reviews (1): Last reviewed commit: "fix(comparison): use strict score comparisons for insights ties" · |
There was a problem hiding this comment.
Vortex: 1 issue to fix at 05eeaf2 · 2/2 files reviewed
Actionable comment posted: 1
- 🟠 Important · `pickScoreLeader` compares raw floats with `===`/`>`, but the UI shows `Math.round(score)`. Score... ·
src/features/comparison/components/insights-list.tsx:42
🤖 Prompt for AI agents (1 finding)
Pull request Beehtrix/DevImpact#1: https://github.com/Beehtrix/DevImpact/pull/1 (head branch `cursor/insights-tie-handling-1798`)
Verify each finding against current code. Fix only still-valid concrete bugs, skip the
rest with a brief reason, keep changes minimal, and validate. Skip Decision required,
policy forks, and "consider X" alternatives. Do not add new features, refactors, or
architecture beyond the fix; prefer the smallest diff.
To dispute, defer or ask about a finding, reply in that finding's review thread, or
mention @mergestorm-vortex in a pull request comment. A fix needs no reply: Vortex
reviews the next push.
Findings to address:
1. In `@src/features/comparison/components/insights-list.tsx` (line 42, Important):
`pickScoreLeader` compares raw floats with `===`/`>`, but the UI shows `Math.round(score)`. Scores come from `score-engine.ts` unrounded (via `sanitizeNumber`), so e.g. repoScore 10.2 vs 10.4 yields a leader (Bob) and a `insights.recommendation.repo` for Alice, while the line reads "Bob 10 vs Alice 10". Similarly, finalScore 15.2 vs 15.4 renders `insights.summaryText` with `diff: 0` instead of the tie copy. Compare on the rounded values (or round the scores before comparing) so the displayed tie matches the logic.
| return null; | ||
| } | ||
|
|
||
| return score1 > score2 ? user1 : user2; |
There was a problem hiding this comment.
🟠 Important
pickScoreLeader compares raw floats with ===/>, but the UI shows Math.round(score). Score...
pickScoreLeader compares raw floats with ===/>, but the UI shows Math.round(score). Scores come from score-engine.ts unrounded (via sanitizeNumber), so e.g. repoScore 10.2 vs 10.4 yields a leader (Bob) and a insights.recommendation.repo for Alice, while the line reads "Bob 10 vs Alice 10". Similarly, finalScore 15.2 vs 15.4 renders insights.summaryText with diff: 0 instead of the tie copy. Compare on the rounded values (or round the scores before comparing) so the displayed tie matches the logic.
🤖 Prompt for AI agents
Pull request Beehtrix/DevImpact#1: https://github.com/Beehtrix/DevImpact/pull/1 (head branch `cursor/insights-tie-handling-1798`)
Verify each finding against current code. Fix only still-valid concrete bugs, skip the
rest with a brief reason, keep changes minimal, and validate. Skip Decision required,
policy forks, and "consider X" alternatives. Do not add new features, refactors, or
architecture beyond the fix; prefer the smallest diff.
To dispute, defer or ask about a finding, reply in that finding's review thread, or
mention @mergestorm-vortex in a pull request comment. A fix needs no reply: Vortex
reviews the next push.
In `@src/features/comparison/components/insights-list.tsx` (line 42, Important):
`pickScoreLeader` compares raw floats with `===`/`>`, but the UI shows `Math.round(score)`. Scores come from `score-engine.ts` unrounded (via `sanitizeNumber`), so e.g. repoScore 10.2 vs 10.4 yields a leader (Bob) and a `insights.recommendation.repo` for Alice, while the line reads "Bob 10 vs Alice 10". Similarly, finalScore 15.2 vs 15.4 renders `insights.summaryText` with `diff: 0` instead of the tie copy. Compare on the rounded values (or round the scores before comparing) so the displayed tie matches the logic.
|
Closing this fork PR: the matching upstream PR is O2sa#288 (open). The branch is kept. |
Summary
InsightsListused>=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
pickScoreLeaderhelper that returnsnullon equal scoresinsights.equal.*/banner.tiecopy for tied metrics and final scoresinsights-list.test.tsxcoverage for ties and strict leadsTesting
pnpm exec vitest run src/features/comparison/tests/insights-list.test.tsxFixes O2sa#268
Summary by cubic
Fixes tie handling in the insights comparison so User 1 is no longer always credited as the leader when scores are equal. Category leaders are now chosen with strict
>comparisons, and tied metrics display the existing equal notes without awarding strengths or improvement recommendations.pickScoreLeader, which returnsnullwhen scores are tied.insights-list.test.tsxcoverage for tied scores and strict category leads.Written for commit 05eeaf2. Summary will update on new commits.
Confidence Score: 5/5

The PR appears safe to merge.Summary
InsightsListnow treats equal scores as ties instead of crediting the first developer.No actionable issues found. Tests were not run because dependencies are not installed.
Reviews (1) · Last reviewed commit: "fix(comparison): use strict score compar..." · Reviewed by Greptile