Skip to content

Label Node#94

Open
MaddieWright wants to merge 9 commits intomainfrom
feature/label/redo
Open

Label Node#94
MaddieWright wants to merge 9 commits intomainfrom
feature/label/redo

Conversation

@MaddieWright
Copy link
Copy Markdown
Collaborator

What?

Implemented the Label Node. A terminal pipeline node that lets users mark and name time-windowed events during EEG streaming sessions.


How?

Frontend (label-node, label-combo-box, label-timeline-panel):

  • Trigger button starts/stops a labeled time window using live backend EEG timestamps (rawTime) to avoid UTC/local timezone drift
  • Label popup with name input and color picker; duplicate label names are blocked with an inline error
  • Timeline view: filled, lane-packed bars showing all labeled events on a scrollable horizontal axis
  • Graph view: Recharts LineChart with a numeric timeMs XAxis; teal ReferenceArea highlights the selected event's time range; fetches event EEG data via the CSV export endpoint
  • Labels persist across page reloads -> saved to and loaded from activeSessionId on mount
  • Right-side output handle removed -> label node is end-of-pipeline only (no downstream connections)
  • Sub-millisecond (nanosecond) timestamp truncation added to all timestamp parsers for backend compatibility

Backend:

  • New /api/sessions/:id/time-label GET/POST routes for reading and writing time labels
  • New /api/sessions/:id/eeg_data/export POST route returning CSV with optional start_time/end_time filtering
  • DB migrations for time_labels table and session-scoped EEG data
  • Reordered migrations to fix ordering conflict; fixed label session name uniqueness; added sqlx offline cache

Testing

  • Triggered labels during live streaming; verified start/end timestamps stored correctly
  • Timeline bars render with correct positions and lane-packing for overlapping events
  • Graph view jumps to event data and shows teal highlight over the correct time range
  • Labels reload on page refresh and when switching sessions
  • Duplicate label names are blocked with inline error
  • No node can be connected after the label node
Screenshot 2026-04-11 at 6 44 15 PM Screenshot 2026-04-11 at 6 44 52 PM Screenshot 2026-04-11 at 6 44 34 PM Screenshot 2026-04-11 at 6 45 18 PM

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 12, 2026

❌ PR approval conditions NOT satisfied. At least 1 team lead OR 2 team members must approve before merging.
[Last checked: 2026-04-12T02:02:11.575Z]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants