feat(prepare): WS4 Prepare integration - #281
Merged
Merged
Conversation
jdpigeon
force-pushed
the
feat/ws4-prepare-integration
branch
from
September 25, 2026 20:35
52b1a4c to
34b5d31
Compare
…gration # Conflicts: # TODOS.md
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.
Implements
docs/superpowers/plans/2026-09-25-ws4-prepare-integration.md. The approved Prepare screens (#276) are now the real Design screen for Faces/Houses, Stroop, Visual Search and Multitasking. Custom and Imported keep their own authoring flows.What changed
experiments/<name>/prepare.ts): keys, stimuli and the trial timeline.flowFromStructurebuilds the timeline from the real loops, neverparams.nbTrials. The timelines read Faces/Houses 6/120, Stroop 8/96, Visual Search 8/80. Multitasking reads 3 practice blocks, then 3 recorded blocks, with no study-wide total.PrepareSteps/fixtures.tsre-exports these modules, so Storybook shows what runs.experiments/__tests__/prepareContent.test.tscompares each diagram with its real study. It checks every key the study accepts, and runs each loop'sbefore:preparehook to count trials. For Multitasking it also checks that each rule's key is the oneinitTasksscores as correct.DesignComponentrendersPrepareStepswhenever the experiment haspreparedata. The EEG switch and Customize are now in the step's action row (Ruling 2). The unused Protocol condition cards and their data were removed: thecondition_*fields andmultiConditionShape/Dots.png. The Shape image showed diamond → n, but the task scores diamond → b.PreviewButtonComponentnow usesPreviewLabel, so Custom, Imported and Collect all show the same "PREVIEW · not recording" status.zoom: 0.55. The whole first screen, keys and Space line included, shows without scrolling at both sizes. See "Deviations" below.typeat render time.Verification
npm run typecheck: 0 errors.npm run lint: 0 errors. 121 warnings, all already on main; the two in touched files are old lines.npm test: 60 files, 319 passed, 1 skipped.node tests/electron-smoke.mjs: PASS.Rule A: Electron app, both sizes
For every step at both 1366×768 and 1280×720:
mainscrolls 0 pxStorybook (
PreviewRunningFull,PreviewRunningFull720) gives the same numbers. Theirplayfunctions assert that neither the participant screen nor the page scrolls.Electron playtest (Fixture headset)
Screenshots are in
/tmp/ws4-integration/. The full checklist is in the agent report.Checklist (✓ = exercised in the Electron window):
PreviewLabelsits besideStop preview, the participant screen shows whole, and one practice trial was stepped into.Run & record →appears after a preview and goes to /collect. The Collect preview shows the same label (Fixture headset connected).Deviations from the plan
min-h-[420px]growing with content made the page scroll for all four experiments. Measured page overflow was 70–385 px, because at the 800px column width a participant screen is 550–750 px tall. The box now fills the free height (at least 420px), and the participant screen is drawn atzoom: 0.55in anabsolute inset-0stage.'Preview'.isPreviewingtrue, then false) beforeRun & recordcan appear.Run & recordgoes to /collect.SACKS_STAND_INmoved into Faces/Houses'prepare.tsasmediaFallback, so Design no longer checkstype === N170. P02 Background now uses Stroop, to keep the video-link variant in Storybook.SecondaryNavComponentlost its now-unusedonCustomize. Its docstring says it serves Custom, Imported and Analyze.label, because Multitasking uses each key twice.