Add delayed-reveal experimental condition with pre-reveal reflection#18
Open
Spbd1 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
RevealTimingConditionandPreRevealCommitmentand exposerevealTimingConditionandpreRevealCommitmentonResearchSessionandResearchExportintypes/research.tsand includedelayedRevealandstandByInitialInterpretationin computed metrics.assignRevealTimingConditioninutils/session.ts, updatecomponents/PreRevealSurveyForm.tsxto call it when needed and branch the next navigation to either/hidden-rule-revealor/pre-reveal-reflectionbased on the assigned condition.components/PreRevealReflectionForm.tsximplements the neutral message, required 1–7 Likert (standByInitialInterpretation) and optional trimmed text (<=500 chars), andapp/pre-reveal-reflection/page.tsxprovides the page shell;components/HiddenRuleReveal.tsxguards to redirect delayed participants to the reflection page if they try to open the reveal early.revealTimingConditionandpreRevealCommitmentin the final research export viautils/researchMetrics.ts, validate them inlib/researchExportSchema.ts, and add CSV columnsreveal_timing_condition,stand_by_initial_interpretation, andpre_reveal_commitment_textinlib/adminSubmissions.ts.Files changed (high-level):
types/research.ts,utils/session.ts,components/PreRevealSurveyForm.tsx,components/PreRevealReflectionForm.tsx(new),app/pre-reveal-reflection/page.tsx(new),components/HiddenRuleReveal.tsx,utils/researchMetrics.ts,lib/researchExportSchema.ts,lib/adminSubmissions.ts.Testing
npm run typecheckand it completed successfully with no new type errors.npm run lintand it completed; the run reported existingreact-hooks/exhaustive-depswarnings inParticipantBackgroundForm.tsxandPostRevealSurveyForm.tsxthat were present before this change.npm run buildand the Next.js production build completed successfully and generated the new static page for/pre-reveal-reflection.All automated checks passed; no new lint errors or type errors were introduced (only preexisting lint warnings remained).
Codex Task