Skip to content

Add effortCheck config parameter to control attention check display#1066

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-6c7f62a5-737c-411d-bd60-142851763686
Draft

Add effortCheck config parameter to control attention check display#1066
Copilot wants to merge 2 commits intomainfrom
copilot/fix-6c7f62a5-737c-411d-bd60-142851763686

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 1, 2025

Overview

This PR implements a new optional effortCheck configuration parameter that gives experiment designers control over the sentence typing effort check (attention check) during intro steps. This addresses the feature request to allow skipping the effort check when prioritizing speed in the intro stages.

Changes

Configuration Options

The new effortCheck parameter supports three configurations:

  1. effortCheck: true (default) - Shows the effort check with the default sentence: "I agree to participate in this study to the best of my ability."
  2. effortCheck: false - Completely skips the attention check step in the intro sequence
  3. effortCheck: "Custom sentence text" - Shows the effort check with a custom sentence that participants must type exactly

Example Usage

Skip the effort check to prioritize intro speed:

{
  "batchName": "fast-intro-experiment",
  "effortCheck": false,
  ...
}

Use a custom sentence for domain-specific context:

{
  "batchName": "custom-attention-experiment",
  "effortCheck": "The quick brown fox jumps over the lazy dog",
  ...
}

Existing configs continue to work unchanged (defaults to true):

{
  "batchName": "standard-experiment",
  // effortCheck not specified - shows default attention check
  ...
}

Implementation Details

  • Server validation (validateBatchConfig.ts): Added optional schema field accepting boolean or string values
  • Client intro logic (App.jsx): Modified introSteps() to conditionally include AttentionCheck component based on config
  • Attention check component (AttentionCheck.jsx): Updated to read and display custom sentence text from config
  • Tests: Added 4 new test cases covering all configuration scenarios (68 tests passing)
  • Documentation (batchConfig.md): Added comprehensive documentation with examples and use cases

Backwards Compatibility

This change is fully backwards compatible:

  • The effortCheck parameter is optional
  • If not specified, it defaults to true (existing behavior)
  • All existing batch configurations will continue to work without modification
  • Follows the same pattern as existing checkVideo and checkAudio config parameters

Testing

  • ✅ All 68 unit tests passing (including 4 new tests for effortCheck)
  • ✅ Client builds successfully without errors
  • ✅ Server validation working correctly for all config scenarios

Fixes #[issue-number]

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • o1.ingest.sentry.io
    • Triggering command: node /home/REDACTED/work/deliberation-empirica/deliberation-empirica/client/node_modules/.bin/vite build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[FEATURE]: Make the effort check a config parameter</issue_title>
<issue_description>### User Story

As an experiment designer, I want control over whether to show the sentence typing effort check during the intro steps, so that if I strongly prioritize speed in the intro stages, I can skip it.

Feature description

Add an option to the batch config to make that step optional.

What would this feature enable?

Adjusting experiment designs with more control

Is this a front end or back end feature?

  • Front end
  • Back end

Priority

None

Syntax Suggestion

add a config option:
json { ... effortCheck: false }
or
json { ... effortCheck: true }
or
json { ... effortCheck: "The quick brown fox jumps over the lazy dog". }
This last one might substitute in the text for what is currently shown in the effort check. (Is it an acceptable pattern?)</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #1065

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: JamesPHoughton <4304478+JamesPHoughton@users.noreply.github.com>
Copilot AI changed the title [WIP] [FEATURE]: Make the effort check a config parameter Add effortCheck config parameter to control attention check display Oct 1, 2025
Copilot AI requested a review from JamesPHoughton October 1, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Make the effort check a config parameter

2 participants