Skip to content

Fix some minor "gotchas" with the dashboard / review summation handling#7181

Merged
jmgasper merged 1 commit intomasterfrom
hotfix-review-summations
Feb 23, 2026
Merged

Fix some minor "gotchas" with the dashboard / review summation handling#7181
jmgasper merged 1 commit intomasterfrom
hotfix-review-summations

Conversation

@jmgasper
Copy link
Collaborator

No description provided.

@jmgasper jmgasper requested a review from kkartunov as a code owner February 23, 2026 22:05
@jmgasper jmgasper merged commit dea71b6 into master Feb 23, 2026
1 check was pending
if (!summation) {
return false;
}
const score = normalizeScoreValue(_.get(summation, 'aggregateScore'));

Choose a reason for hiding this comment

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

[⚠️ performance]
The normalizeScoreValue function is called multiple times for the same aggregateScore value within the same loop iteration. Consider storing the result in a variable to avoid redundant computations.

return;
}
const scoreType = getSummationScoreClassification(summation);
if (includeOnlyProvisional) {

Choose a reason for hiding this comment

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

[⚠️ performance]
The includeOnlyProvisional check is performed inside the loop for each summation. If includeOnlyProvisional is false, this check is unnecessary and could be moved outside the loop to avoid redundant evaluations.

let tokenV2 = cookies.tcjwt;
let tokenV3 = cookies.tcjwt;
// Support both historical cookie names used across environments.
const authToken = cookies.tcjwt || cookies.tcJwt;

Choose a reason for hiding this comment

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

[⚠️ correctness]
The variable authToken is assigned the value of cookies.tcjwt || cookies.tcJwt. If both tcjwt and tcJwt are present, this will always prefer tcjwt. Ensure this behavior is intentional and aligns with the expected logic for handling these cookies.

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