Commit ea2ec42
fix(peripheral): attach trial metadata before mouseup fires
The hold-duration table was all dashes because ClickSense's onCapture
callback fires on mouseup — which is BEFORE the DOM click event
where I was populating currentTrialMeta. Events were being pushed to
clicksenseData without target_color / target_ecc attached, and the
result-page aggregator filter (require both fields) skipped them.
Fix: populate currentTrialMeta in showTarget() (before target is
clickable), then enrich with click-dependent fields (rt, click error,
was_hit) in onCanvasClick(). Same pattern for the timeout branch.
Also adds a `phase: 'target'` marker so downstream PostHog analysis
can filter target clicks from fixation clicks (fixation clicks still
produce ClickSense events but with currentTrialMeta null).
TODO.md: add PostHog data-pull analysis entry — cross-participant
aggregation of peripheral_click events to test the cyan × far
advantage hypothesis once N is large enough to wash out single-
subject noise.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent db76de8 commit ea2ec42
1 file changed
Lines changed: 26 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
432 | 426 | | |
433 | 427 | | |
434 | 428 | | |
| |||
459 | 453 | | |
460 | 454 | | |
461 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
462 | 471 | | |
463 | 472 | | |
464 | 473 | | |
465 | 474 | | |
466 | 475 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
| |||
0 commit comments