-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Summary
The event stream channel filter dropdown uses 1-indexed display values ('1' through '16') as option values, but the backend sends 0-indexed channel numbers (0–15). The filteredEvents derived store compares String(e.channel) directly against the filter value, causing an off-by-one mismatch.
Current behavior
- Channel dropdown options:
<option value="1">Ch 1</option>...<option value="16">Ch 16</option> - Backend
MidiEventInfo.channel: 0-indexed (0–15) - Filter comparison:
String(e.channel) !== $channel— so selecting "Ch 1" matches events withchannel: 1(which is actually MIDI channel 2)
Expected behavior
Selecting "Ch 1" should show events on MIDI channel 1 (backend channel: 0).
Root cause
events.js line ~324:
if ($channel !== 'all' && String(e.channel) !== $channel) return false;This compares raw 0-indexed backend values against 1-indexed UI values.
Fix options
- Store 0-indexed values in the select (
value={String(ch - 1)}) — display stays 1-indexed - Adjust the comparison:
String((e.channel ?? -1) + 1) !== $channel
Option 1 is cleaner as it keeps the comparison simple.
Affected code
conductor-gui/ui/src/lib/stores/events.js—filteredEventsderived store (two places: raw events and mapping_fired events)conductor-gui/ui/src/lib/components/EventFilter.svelte— channel select option values
Notes
This is pre-existing behavior, not introduced by #711. Discovered during Copilot code review of #715.
Reactions are currently unavailable