Repository navigation
WS6: integrate the approved Clean design - #285
Merged
Merged
Conversation
…delete and title paths, block saves before load and edits during save
…used container props, refresh stale docs
…liases path to pathe)
…to feat/ws6-clean-integration # Conflicts: # .llms/learnings.md # src/renderer/components/CleanComponent/index.tsx
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.
Summary
The Clean route now renders the approved design from #280 (
components/Clean/). A student:Ended-early recordings stay hidden until revealed. Revealed ones are labelled, can't be selected, and can be moved to the Trash after an in-app confirm. The workflow badges update as soon as a save lands.
Commits (one per plan task):
feat(main): two new IPC channels,fs:readWorkspaceIncompleteEEGDataandfs:deleteIncompleteRecording. The path check and the behavior-file pairing live in the pureincompleteRecordingFilesinrecordings.ts. Main only callsshell.trashItemon its result.fix(analysis):apply_rejectionalways assignsinfo['bads'], so un-flagging a sensor reaches the saved file.refactor(pyodide):LoadEpochstakes one path (createAction<string>). The epic reads[path]. The reducer'sLoadEpochscase clearsepochArraysandsuggestedRejections.feat(clean): the panes say "trials", including the aria labels.FitPanestays, with aponytail:note on its ceiling.feat(clean):CleanComponent/index.tsxis rewritten as the container-facing screen aroundCleanDatasetSelectandCleanReview. Removed from the screen:<select multiple>, the auto-merge effect,showMessageBox,CleanExplainer,renderAnalyzeButtonandduration.feat(shell):useWorkspaceProgress(…, refresh).AppShellContainerpassescleanedEpochsSave.revision;WorkspaceAreaGatepasses0.test(clean):CleanRejections.test.tsxis rewritten against the new contract.chorecommit formats the files I changed (unrelated reformatting reverted) and adds a learnings entry.Decisions followed
All 16 decisions are implemented as written. Notes on a few:
accepted = rejected.has(index). The "N by you" count isCleanReview's ownrejected.size - acceptedCount, which equals "rejected indices that are not suggestions".CleanEpochs({ dropIndices: [], badChannels: [...] }).rejectedis reset during render when theepochArraysidentity changes (React's pattern for adjusting state when a prop changes). No effect is involved, so dropped trials never flash back as un-rejected for a frame.badChannelspersists across saves and is reset only by Start cleaning.get_epochs_arrayshandles 0 epochs (it returnsn_epochs: 0and writes a 0-byte buffer, with an MNE warning), so no Python fix or extra test was needed.Deviations, with reasons
Clean.stories.tsx(onSaveuseselse if) and the old "exactly one prompt" behavior. Main was told.Propsno longer declarestype,deviceType,epochsInfoorsession. The screen doesn't use them, andCleanContaineris unchanged.epochsInfoline ofPropstoEpochInfoRow[]. My rewrite removes that line, so keep this branch's version when resolving.Verification
npm run typecheck: clean. It was also clean after every task.npx vitest run src/renderer/components/CleanComponent src/renderer/components/AppShell src/main: 9 files, 51 tests passed.python -m pytest tests/analysis/test_apply_rejection.py tests/analysis/test_epoch_arrays.py(native MNE 1.12.1): 9 passed.composeStoriesrender of all 13Domain/Cleanstories passed. The file was deleted afterwards.Electron playtest. This ran in the Electron window over CDP port 9366 (never
:5173), using the fixture headset and the throwaway workspaceWS6-Playtest-2026-09-27.-raw.incomplete.csvand-behavior.incomplete.csv./tmp/ws6-integration/. Each state was captured at1366x768and1280x720, at device pixel ratio 1:rejectedunchanged#/analyzeP01-A-1-raw.incomplete.csvandP01-A-1-behavior.incomplete.csvshow up in Finder's Trash (checked withosascript).P01-cleaned-epo.fifhas 51 epochs (54 − 2 − 1) andbads == ['AF7'].Known ceilings
FitPanezoom makes the Live ERP canvas soft at about 0.6×. The upgrade path is resize-aware canvases (see theponytail:note).Delete leaves theFixed in f06f72a: Delete also trashes the sidecar.<stem>-events.jsonsidecar.acceptedis derived fromrejected.suggestedhighlight insideEpochReviewer.In-app verification of the fix round (7441b01)
An independent CDP playtest in the Electron window, at 1366×768 and 1280×720. Screenshots are in
/tmp/ws6-check/.bads == [](read with native MNE)./analyze.