feat(run): WS5 early exit and incomplete runs - #275
Merged
Merged
Conversation
…nt finalize steps
jdpigeon
added a commit
that referenced
this pull request
Sep 24, 2026
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-23-ws5-early-exit-incomplete-runs.md(spec §1.2, §1.5, §11 WS5).What changes
End experiment earlyand a 1 s Escape hold end the run with no confirm. A tap of Escape does nothing. Escape no longer ends lab.js studies.onAbort(csv), separate fromonFinish(csv), with the trials recorded so far.EndRun(RunBar orescapeHoldEpic) setsisEnding, the reducer keeps the firstStopasrunOutcome, andendRunFallbackEpicends a run no runtime reported. The result screen and RunBar say "EEG" only when a headset was connected (selectRecordsEEG).*.incomplete.csv(newfs:markRecordingIncomplete). Clean, Analyze and the badges skip it;recordingExistsstill counts it, so the session number isn't reused.RunResult(feat(design): WS5 participant screens + run outcome Storybook states #273) shows "Saving…", then the complete result or "Experiment ended early". The RunBar shows the Escape-held hint. The run screen fits under the RunBar.Fixes beyond the plan
end()doesn't stop the study. Aborts now usecontroller.jump('abort'), and the data is reported at once.post_trial_gapafter an abort, so its data is reported at once too.Verification
typecheck,lint(0 errors),npm test(285/285),electron-smokePASS.*.incomplete.csv(behavior rows, and a complete last raw row). A tap of Escape doesn't end the run. Clean doesn't list incomplete runs. The earlier incomplete session is left byte-identical. Preview writes nothing.TODOS.md.