feat(gui): Add Fired toggle and quick filters to EventFilter (#486)#518
feat(gui): Add Fired toggle and quick filters to EventFilter (#486)#518amiable-dev merged 1 commit intomainfrom
Conversation
Add independent "⚡ Fired" toggle for mapping_fired event visibility, quick filter buttons (All/Raw Only/Fired Only), and 'fired' type filter value in the events store. Includes 14 component tests and 1 store test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds “Fired” visibility controls to the GUI EventFilter, including quick presets, by extending the events store to support a fired-only mode and updating component/store tests accordingly.
Changes:
- Add independent “⚡ Fired” toggle plus “All / Raw Only / Fired Only” quick-filter buttons in
EventFilter. - Extend
filteredEventsto supporteventTypeFilter === 'fired'(hide raw events, show only mapping_fired). - Add/expand tests for the new filter behaviors (component + store).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| conductor-gui/ui/src/lib/stores/events.js | Adds eventTypeFilter === 'fired' handling to hide raw events in “Fired Only” mode. |
| conductor-gui/ui/src/lib/stores/events.test.ts | Adds store-level test asserting raw events are hidden when type filter is fired. |
| conductor-gui/ui/src/lib/components/EventFilter.svelte | Adds Fired toggle UI, quick filters, and state-consistency behavior. |
| conductor-gui/ui/src/lib/components/EventFilter.test.ts | Adds comprehensive component tests for fired toggle, quick filters, and consistency rules. |
You can also share your feedback on Copilot code review. Take the survey.
| // "fired" type filter = show only fired events, hide raw | ||
| if ($type === 'fired') return false; | ||
| if ($type !== 'all' && normalizeEventType(e) !== $type) return false; |
There was a problem hiding this comment.
Introducing eventTypeFilter === 'fired' adds a new valid filter value, but the eventTypeFilter store’s doc comment earlier in this file still lists only 'all' | 'cc' | 'note' | 'bend' | 'aftertouch'. Update that documentation to include 'fired' so the store’s public contract stays accurate.
| import { eventTypeFilter, eventFiredFilter } from '$lib/stores/events.js'; | ||
|
|
There was a problem hiding this comment.
EventFilter now imports eventFiredFilter from $lib/stores/events.js. Several existing Vitest mocks of that module (e.g. EventStreamPanel.test.ts) don’t export eventFiredFilter, which will cause runtime import errors when those tests render components that include EventFilter. Update those mocks to include an eventFiredFilter writable store (and reset it in test cleanup as needed).
| import { eventTypeFilter, eventFiredFilter } from '$lib/stores/events.js'; | |
| import * as events from '$lib/stores/events.js'; | |
| import { writable } from 'svelte/store'; | |
| const eventTypeFilter = events.eventTypeFilter; | |
| const eventFiredFilter = events.eventFiredFilter ?? writable(true); |
…sing mock exports Update eventTypeFilter JSDoc to include 'fired' value. Add eventFiredFilter to 4 test mocks (EventRow, DeviceStatusPills, EventStreamPanel, App) for completeness. Add CHANGELOG entry for #486. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
'fired'type filter value in events store to support "Fired Only" mode (hides raw events)Closes #486
Test plan
'fired'type filter value🤖 Generated with Claude Code