From 57b613785463968840d5d219a282f2fadf16f40e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 00:11:59 +0000 Subject: [PATCH] Add Post-Task Reflection and Study Debrief screens. - Added `#screen-manipulation` and `#screen-debrief` to index.html before the outro screen. - Modified `code/experiment.js` to route through the new screens before executing the batch payload. - Appended `manipulation_noticed` to `STATE.results` for every trial row. Co-authored-by: hashexplaindata <221828969+hashexplaindata@users.noreply.github.com> --- code/experiment.js | 24 ++++++++++++++++++++++-- code/index.html | 23 +++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/code/experiment.js b/code/experiment.js index 651545b..ba42848 100644 --- a/code/experiment.js +++ b/code/experiment.js @@ -35,7 +35,8 @@ const STATE = { isTrialActive: false, justification: "", activeScreen: null, - pendingTransitionTimer: null + pendingTransitionTimer: null, + manipulation_noticed: null }; // Persist PID to localStorage @@ -379,8 +380,27 @@ function init() { DOM.btnFinalize.addEventListener('click', () => { DOM.btnFinalize.disabled = true; STATE.justification = DOM.textareaJustification.value.trim(); + showScreen('manipulation'); + }); + + // Route: Manipulation Check -> Debrief + document.querySelectorAll('.btn-manipulation').forEach(btn => { + btn.addEventListener('click', (e) => { + STATE.manipulation_noticed = parseInt(e.target.dataset.val); + + // Append this crucial metric to every trial row before sending + STATE.results.forEach(row => { + row.manipulation_noticed = STATE.manipulation_noticed; + }); + + showScreen('debrief'); + }); + }); + + // Route: Debrief -> Outro & Payload Execution + document.getElementById('btn-submit-final').addEventListener('click', () => { showScreen(10); - executeBatchPayload(); + executeBatchPayload(); // The data is securely transmitted ONLY after full informed consent is achieved }); } diff --git a/code/index.html b/code/index.html index f45d3e5..f183ea3 100644 --- a/code/index.html +++ b/code/index.html @@ -112,6 +112,29 @@

Strategic Rationalization

+ + + +