Repository navigation
feat(prepare): students make a prediction, shown in Analyze - #337
Merged
Merged
Conversation
Built-ins offer 2-3 authored answers on the Protocol step; Custom builds one from its own conditions beside the hypothesis. Saved as params.prediction and shown in the matching Analyze tab's rail. SetParams now replaces params, so a new workspace never inherits the previous one's prediction.
Protocol stories start with a saved pick; a CustomPrediction story file covers picked, not picked, stale (renamed condition) and EEG-off; Analyze stories show the left-column section with and without a prediction. CustomPredictionCard copy uses <div>, not <p>, so the global p rule's 18px size does not apply.
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.
Why
Spec section 2 (
docs/superpowers/specs/2026-11-19-instructional-content-design.md): students never committed to a prediction, so Analyze turned into pattern-hunting. They now pick one before collecting, and it reappears beside the matching graph.Change
params.prediction. APredictionis the condition pair, the measure (rt/accuracy/erp) and a direction. It is saved with the workspace throughSetParamsandSaveWorkspace.prepare.tshas apredictionblock: question, condition pair, measure, 3 options and a "what to look for" sentence. Protocol shows a "Make a prediction" radio card after "What we compare and measure". It is optional and never blocks Preview or Collect.CustomPredictionCardsits under "Form a hypothesis" in the Overview step:utils/prediction.tsholds the logic: the offer, option wording, and the none / stale / set states.Verification
SetParams;SetStateround-trip keepsparams.prediction;npm testpasses,npx tsc --noEmitis clean, eslint has no errors.zz_predictions_fh, picked "Face dips lower than House around 170 ms".appState.jsonsaved{"conditions":["Face","House"],"measure":"erp","direction":"a<b"}.Not done