Skip to content

feat(gui): Add Fired toggle and quick filters to EventFilter (#486)#518

Merged
amiable-dev merged 1 commit intomainfrom
feat/486-event-filter-fired-toggle
Mar 8, 2026
Merged

feat(gui): Add Fired toggle and quick filters to EventFilter (#486)#518
amiable-dev merged 1 commit intomainfrom
feat/486-event-filter-fired-toggle

Conversation

@amiable-dev
Copy link
Owner

Summary

  • Add independent "⚡ Fired" toggle button for mapping_fired event visibility in EventFilter
  • Add quick filter buttons: All / Raw Only / Fired Only for common filter presets
  • Add 'fired' type filter value in events store to support "Fired Only" mode (hides raw events)
  • Fix state consistency: toggling off Fired while in "Fired Only" mode resets type filter to prevent empty event list

Closes #486

Test plan

  • 15 EventFilter component tests (type chips, fired toggle, quick filters, state consistency)
  • 1 new store-level test for 'fired' type filter value
  • 53 total events store tests pass
  • Council verified: accuracy 10/10, no blocking issues

🤖 Generated with Claude Code

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>
@amiable-dev amiable-dev merged commit 18e7774 into main Mar 8, 2026
10 checks passed
@amiable-dev amiable-dev requested a review from Copilot March 8, 2026 08:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 filteredEvents to support eventTypeFilter === '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.

Comment on lines +158 to 160
// "fired" type filter = show only fired events, hide raw
if ($type === 'fired') return false;
if ($type !== 'all' && normalizeEventType(e) !== $type) return false;
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to 15
import { eventTypeFilter, eventFiredFilter } from '$lib/stores/events.js';

Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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);

Copilot uses AI. Check for mistakes.
amiable-dev added a commit that referenced this pull request Mar 8, 2026
…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>
amiable-dev added a commit that referenced this pull request Mar 8, 2026
…sing mock exports (#520)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ADR-014] Phase 3B: EventFilter — Fired toggle and quick filters

2 participants