Files
Experiments DB Dev daf36908ef feat: session file registry with drag-and-drop on day view
Adds a FileDropZone at the bottom of the day view where users can
drop all session files at once. Filenames are regex-matched to
subjects using their animal_id_string (word-boundary aware, so
"2852" won't match "28520"). Only metadata is recorded — files
are never uploaded.

Backend: new session_files table (id, daily_status_id, filename,
file_size BIGINT, file_type, last_modified, notes). Routes:
  POST /api/daily-statuses/:id/files  (batch create)
  GET  /api/daily-statuses/:id/files
  DELETE /api/session-files/:id

Frontend: FileDropZone shows per-subject match groups, unmatched
files, and a warning for subjects with no match. After saving,
registered files are displayed with delete capability.

test-files/: generate_test_files.sh creates 4 dummy files per
subject (2×bin, 2×csv) with correct naming for drag-and-drop
testing. Pre-generated for 2026-04-23 with IDs 2852/3076/3077/3078.

Tests: 19 tests covering drag state, regex matching, save payload,
partial-overlap prevention, multi-subject batching, and delete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 13:12:45 -04:00

22 lines
511 B
CSV

trial_num,timestamp,outcome,reaction_time_ms,reward
1,1.823,Failure,169,1
2,2.646,Success,127,0
3,3.469,Failure,265,0
4,4.292,Failure,266,1
5,5.115,Success,295,1
6,5.938,Success,94,1
7,6.761,Failure,78,1
8,7.584,Success,182,1
9,8.407,Success,249,1
10,9.230,Success,201,0
11,10.053,Failure,167,0
12,10.876,Failure,124,0
13,11.699,Failure,361,0
14,12.522,Success,306,1
15,13.345,Failure,311,0
16,14.168,Success,186,0
17,14.991,Success,289,0
18,15.814,Failure,152,0
19,16.637,Failure,379,1
20,17.460,Success,332,0