From 4b2aeaa4c6b17c1bc9e44b06678043b76f51f41c Mon Sep 17 00:00:00 2001 From: Henry Burgess Date: Fri, 10 Oct 2025 14:44:21 -0500 Subject: [PATCH 1/2] INT-80 Fix test responses being used * Test responses were being used for all computations rather than ONLY for testing purposes --- src/classes/Compute.ts | 1 + src/view/screens/Loading/index.tsx | 2 +- src/view/screens/Trial/index.tsx | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/classes/Compute.ts b/src/classes/Compute.ts index f88789e..7931bd4 100644 --- a/src/classes/Compute.ts +++ b/src/classes/Compute.ts @@ -1079,6 +1079,7 @@ class Compute { */ public async submit(data: any[], useTestResponses=false): Promise { if (useTestResponses) { + consola.warn("Using test responses to generate partner behavior"); data = TEST_RESPONSES; } diff --git a/src/view/screens/Loading/index.tsx b/src/view/screens/Loading/index.tsx index f95a341..7644b70 100644 --- a/src/view/screens/Loading/index.tsx +++ b/src/view/screens/Loading/index.tsx @@ -110,7 +110,7 @@ const Loading: FC = ( // Launch model computation consola.info(`Running model computation...`); - const response = await window.Compute.submit(requestResponses, true); + const response = await window.Compute.submit(requestResponses, false); // INT-80: Should be `false` in production // Parse and store the JSON content try { diff --git a/src/view/screens/Trial/index.tsx b/src/view/screens/Trial/index.tsx index 88db994..a42f43c 100644 --- a/src/view/screens/Trial/index.tsx +++ b/src/view/screens/Trial/index.tsx @@ -169,6 +169,9 @@ const Trial: FC = ( DEFAULT_POINTS.options.one.partner = trialData["par1"]; DEFAULT_POINTS.options.two.participant = trialData["ppt2"]; DEFAULT_POINTS.options.two.partner = trialData["par2"]; + + // Update the correct answer (from `Ac`) + trialState.answer = trialData["Ac"] === 1 ? "Option 1" : "Option 2"; } else { consola.warn(`'playerGuess' trial state data incomplete, using defaults`); } From ee8ac074f52af7c3d79a28aa608eee48964ef5fa Mon Sep 17 00:00:00 2001 From: Henry Burgess Date: Thu, 16 Oct 2025 17:05:57 -0500 Subject: [PATCH 2/2] INT-80 Update version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e3501a5..06b13ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "task_intentions", - "version": "1.7.11", + "version": "1.7.12", "description": "Intentions Game", "private": true, "main": "dist/index.js",