refactor(evidence): share call comparison coverage projection (#16522)
This commit is contained in:
1 parent
0c80c2fb0d
commit
47c6be04ee
1 file changed
+22
-32
@@ -563,38 +563,28 @@ const compareCalls = (
|
||||
right.callDiscoveryStatus === "complete"
|
||||
? "complete"
|
||||
: "unknown";
|
||||
if (coverageLimitations.length > 0)
|
||||
return {
|
||||
...unresolvedDimension({
|
||||
dimension: "calls",
|
||||
links: context.links,
|
||||
leftCount: comparison.leftCount,
|
||||
rightCount: comparison.rightCount,
|
||||
limitations: [...coverageLimitations, ...coverageDiagnostics],
|
||||
}),
|
||||
discovery_status,
|
||||
};
|
||||
if (comparison.status === "unknown")
|
||||
return {
|
||||
...unresolvedDimension({
|
||||
dimension: "calls",
|
||||
links: context.links,
|
||||
leftCount: comparison.leftCount,
|
||||
rightCount: comparison.rightCount,
|
||||
limitations: [...comparison.limitations, ...coverageDiagnostics],
|
||||
}),
|
||||
discovery_status,
|
||||
};
|
||||
return {
|
||||
...dimensionResult({
|
||||
dimension: "calls",
|
||||
...comparison,
|
||||
...context,
|
||||
textDelta: null,
|
||||
limitations: [...comparison.limitations, ...coverageDiagnostics],
|
||||
}),
|
||||
discovery_status,
|
||||
};
|
||||
const limited = coverageLimitations.length > 0;
|
||||
const limitations = [
|
||||
...(limited ? coverageLimitations : comparison.limitations),
|
||||
...coverageDiagnostics,
|
||||
];
|
||||
const result =
|
||||
limited || comparison.status === "unknown"
|
||||
? unresolvedDimension({
|
||||
dimension: "calls",
|
||||
links: context.links,
|
||||
leftCount: comparison.leftCount,
|
||||
rightCount: comparison.rightCount,
|
||||
limitations,
|
||||
})
|
||||
: dimensionResult({
|
||||
dimension: "calls",
|
||||
...comparison,
|
||||
...context,
|
||||
textDelta: null,
|
||||
limitations,
|
||||
});
|
||||
return { ...result, discovery_status };
|
||||
};
|
||||
|
||||
const compareCfg = (
|
||||
|
||||
Reference in new issue
Block a user