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>
This commit is contained in:
Experiments DB Dev
2026-04-23 13:12:45 -04:00
parent dc46af8d31
commit daf36908ef
25 changed files with 1008 additions and 0 deletions
@@ -0,0 +1,21 @@
trial_num,timestamp,outcome,reaction_time_ms,reward
1,1.823,Failure,81,1
2,2.646,Success,243,0
3,3.469,Success,218,1
4,4.292,Success,348,1
5,5.115,Failure,418,0
6,5.938,Failure,249,1
7,6.761,Success,133,0
8,7.584,Success,386,1
9,8.407,Failure,116,1
10,9.230,Success,226,0
11,10.053,Success,438,1
12,10.876,Success,405,1
13,11.699,Success,419,1
14,12.522,Success,95,0
15,13.345,Failure,89,1
16,14.168,Success,360,1
17,14.991,Failure,424,1
18,15.814,Success,73,1
19,16.637,Failure,269,0
20,17.460,Success,236,0
1 trial_num timestamp outcome reaction_time_ms reward
2 1 1.823 Failure 81 1
3 2 2.646 Success 243 0
4 3 3.469 Success 218 1
5 4 4.292 Success 348 1
6 5 5.115 Failure 418 0
7 6 5.938 Failure 249 1
8 7 6.761 Success 133 0
9 8 7.584 Success 386 1
10 9 8.407 Failure 116 1
11 10 9.230 Success 226 0
12 11 10.053 Success 438 1
13 12 10.876 Success 405 1
14 13 11.699 Success 419 1
15 14 12.522 Success 95 0
16 15 13.345 Failure 89 1
17 16 14.168 Success 360 1
18 17 14.991 Failure 424 1
19 18 15.814 Success 73 1
20 19 16.637 Failure 269 0
21 20 17.460 Success 236 0