AI review fixes

This commit is contained in:
Matej Bačo
2026-01-09 14:15:05 +01:00
parent 9189d00679
commit 7ab92afc4a
2 changed files with 7 additions and 12 deletions
+1 -11
View File
@@ -27,7 +27,6 @@ export function getEffectiveBuildStatus(
): string {
const originalStatus = deployment.status;
const createdAt = deployment.$createdAt;
const screenshots = [deployment.screenshotLight, deployment.screenshotDark];
const timeoutSeconds = getBuildTimeoutSeconds(consoleVariables);
if (isBuildTimedOut(createdAt, originalStatus, timeoutSeconds)) {
@@ -35,16 +34,7 @@ export function getEffectiveBuildStatus(
}
const isReady = originalStatus === 'ready';
let hasScreenshot = true;
if (screenshots.length === 0) {
hasScreenshot = false;
}
for (const screenshot of screenshots) {
if (!screenshot) {
hasScreenshot = false;
break;
}
}
const hasScreenshot = deployment.screenshotLight && deployment.screenshotDark;
if (isReady && !hasScreenshot) {
return 'finalizing';
@@ -26,6 +26,7 @@
const timeoutCleanup = () => {
if (skipScreenshotTimeout) {
clearTimeout(skipScreenshotTimeout);
skipScreenshotTimeout = null;
}
};
@@ -54,7 +55,11 @@
}
if (isReady && isFinished) {
clearTimeout(skipScreenshotTimeout);
if (skipScreenshotTimeout) {
clearTimeout(skipScreenshotTimeout);
skipScreenshotTimeout = null;
}
goToFinishScreen();
}
}