History

Require core renderer interactions in perf gate

Cursor Agent committed 9 months ago

Commit 142b7281 parent 13149801 file · +0 −8Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/desktop-perf-trace.mjs+0−8
@@ -671,20 +671,12 @@ async function main() { · 670 unmodified lines
671 const interactionChecks = [];671 const interactionChecks = [];
672 const threadClicks = Number(donePayload.interactions?.threadClicks ?? 0);672 const threadClicks = Number(donePayload.interactions?.threadClicks ?? 0);
673 const typedChars = Number(donePayload.interactions?.typedChars ?? 0);673 const typedChars = Number(donePayload.interactions?.typedChars ?? 0);
674 const terminalOpened = donePayload.interactions?.terminal?.openedByShortcut === true;
675 const terminalCommandTouched = donePayload.interactions?.terminal?.commandFileTouched === true;
676 if (threadClicks <= 0) {674 if (threadClicks <= 0) {
677 interactionChecks.push("thread clicks");675 interactionChecks.push("thread clicks");
678 }676 }
679 if (typedChars <= 0) {677 if (typedChars <= 0) {
680 interactionChecks.push("typed chars");678 interactionChecks.push("typed chars");
681 }679 }
682 if (!terminalOpened) {
683 interactionChecks.push("terminal shortcut open");
684 }
685 if (!terminalCommandTouched) {
686 interactionChecks.push("terminal command execution");
687 }
688 if (interactionChecks.length > 0) {680 if (interactionChecks.length > 0) {
689 throw new Error(681 throw new Error(
690 `Desktop perf automation completed without required scripted interactions: ${interactionChecks.join(", ")}`,682 `Desktop perf automation completed without required scripted interactions: ${interactionChecks.join(", ")}`,