Commit f48acca
feat: Add multi-run support with per-run data grouping and run selector (#126)
When a tedana output folder contains files from multiple BIDS runs
(e.g. run-01, run-02), Rica now groups all per-run data into indexed
arrays and shows a run selector bar above the tabs.
- Add `parseRunLabel` / `deriveRunLabels` helpers to pathUtils.js
- Refactor both loaders in IntroPopUp.js to detect BIDS run entities
and accumulate per-run data (metrics, mixing matrix, NIfTIs, report,
decision tree, etc.) into run-indexed arrays instead of scalars
- Add `runs` / `selectedRunIndex` state to App (index.js); reset to 0
on every new dataset load
- Split the `info` state into separate `reportText[]` and `dirPath[]`
per-run arrays
- Render a sticky run selector bar (only when runs.length > 1) that
lets users switch between runs; all tabs reflect the selected run
- Update Info.js to accept explicit `info` + `dirPath` string props
- Add a useEffect in Plots.js to reset `selectedIndex` to 0 on run
change, preventing out-of-range component selection
- Carpets and QC Histograms/Time Series are unchanged — they already
display all runs' SVGs via their accumulated flat arrays
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent a4fb707 commit f48acca
5 files changed
Lines changed: 311 additions & 173 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
| |||
0 commit comments