From 85b1e2f3d75584a8ea91310d38c709a27367ffd1 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 8 Mar 2026 08:57:46 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20Address=20PR=20#518=20review=20=E2=80=94?= =?UTF-8?q?=20update=20eventTypeFilter=20docs=20and=20add=20missing=20mock?= =?UTF-8?q?=20exports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- CHANGELOG.md | 1 + conductor-gui/ui/src/App.test.ts | 1 + conductor-gui/ui/src/lib/components/DeviceStatusPills.test.ts | 1 + conductor-gui/ui/src/lib/components/EventRow.test.ts | 1 + conductor-gui/ui/src/lib/panels/EventStreamPanel.test.ts | 1 + conductor-gui/ui/src/lib/stores/events.js | 2 +- 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d62d28e1..03a8ac50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **GUI**: Removed redundant compact MappingStateView from 6 workspace views (History, Raw Config, Devices, Profiles, Settings, Plugins) where mapping context is irrelevant (#460). Kept for Config Diff and MIDI Learn views. ### Added +- **GUI**: EventFilter Fired toggle and quick filters (#486). Independent "⚡ Fired" toggle for mapping_fired event visibility, quick filter buttons (All/Raw Only/Fired Only), and state consistency guard preventing contradictory filter states. - **GUI v2 Phase 1 — Layout Shell**: Rewrote `App.svelte` from router-based 8-view layout to three-zone unified workspace (Chat | Workspace | Events). Created `ChatPanel`, `WorkspacePanel`, `EventStreamPanel` panel components. Created `TitleBar` with device/profile dropdowns and settings gear. Created `workspace.js` store (9 workspace views, config diff/MIDI learn action routing) and `events.js` store (ring buffer, filters, app-level Tauri event listener). Added `theme.css` with full navy/indigo CSS variable palette. Updated `StatusBar` with CSS variables and dynamic version. Deleted old `views/` directory and `Sidebar.svelte`. - **GUI v2 Phase 2 — Config Approval Flow**: Replaced modal-based config approval with workspace-integrated diff view. Created `ConfigDiffView` (pending change review with approve/edit/reject buttons, expiration countdown, change descriptions, diff preview), `MappingStateView` (mode tabs + mapping list, compact mode), `MappingRow` (trigger→action display with colored event-type dots and NEW/UPD badges), `DiffBlock` (simplified diff renderer). Created `diff-helpers.ts` utility with `formatTriggerText`, `formatActionText`, `getTriggerDotColor`. Wired LLM plan creation to workspace via `showConfigDiff()`. Non-mapping workspace views show compact mapping list below. **Spec deviation**: Reused existing `llm_apply_plan`/`llm_reject_plan` Rust commands instead of adding 3 new backend commands (same functionality, avoids duplication). - **GUI v2 Phase 3 — MIDI Learn Refinement**: Replaced MIDI Learn modal capture with workspace-integrated refinement card. Created `RefinementCard` (interpretation chips, editable parameter fields, advanced velocity range slider, confirm/relearn/cancel actions), `AlternativeChips` (interpretation selector), `RangeSlider` (dual-thumb velocity range slider), `MidiLearnRefinement` (workspace view container). Created `refinement-helpers.ts` utility with `getAlternativeInterpretations`, `getParameterFields`, `buildTriggerFromParams`. Added `Refining` state to `LearnSessionState` in Rust backend. Wired event selection to workspace refinement via `showMidiLearnRefinement()`. **Spec deviation**: Refinement logic implemented as pure TypeScript functions instead of new Rust Tauri commands — event data from existing `stop_midi_learn` response is sufficient, avoids unnecessary IPC round-trips. diff --git a/conductor-gui/ui/src/App.test.ts b/conductor-gui/ui/src/App.test.ts index a0c0217b..f477abcd 100644 --- a/conductor-gui/ui/src/App.test.ts +++ b/conductor-gui/ui/src/App.test.ts @@ -107,6 +107,7 @@ vi.mock('$lib/stores/events.js', async () => { clearEvents: vi.fn(), initEventListener: vi.fn(() => Promise.resolve(() => {})), restartEventMonitoring: vi.fn(() => Promise.resolve(() => {})), + eventFiredFilter: writable(true), eventMonitorStatus: writable('connecting'), eventStreamPanelVisible: writable(true), }; diff --git a/conductor-gui/ui/src/lib/components/DeviceStatusPills.test.ts b/conductor-gui/ui/src/lib/components/DeviceStatusPills.test.ts index 2678359e..12d660b2 100644 --- a/conductor-gui/ui/src/lib/components/DeviceStatusPills.test.ts +++ b/conductor-gui/ui/src/lib/components/DeviceStatusPills.test.ts @@ -39,6 +39,7 @@ vi.mock('$lib/stores/events.js', async () => { eventTypeFilter: writable('all'), eventChannelFilter: writable('all'), eventDeviceFilter: mockEventDeviceFilter, + eventFiredFilter: writable(true), eventStreamVisible: writable(true), learnSessionActive: writable(false), autoScroll: writable(true), diff --git a/conductor-gui/ui/src/lib/components/EventRow.test.ts b/conductor-gui/ui/src/lib/components/EventRow.test.ts index af9da7ad..15f4aaba 100644 --- a/conductor-gui/ui/src/lib/components/EventRow.test.ts +++ b/conductor-gui/ui/src/lib/components/EventRow.test.ts @@ -31,6 +31,7 @@ vi.mock('$lib/stores/events.js', async () => { eventTypeFilter: writable('all'), eventChannelFilter: writable('all'), eventDeviceFilter: writable('all'), + eventFiredFilter: writable(true), eventStreamVisible: writable(true), learnSessionActive: writable(false), autoScroll: writable(true), diff --git a/conductor-gui/ui/src/lib/panels/EventStreamPanel.test.ts b/conductor-gui/ui/src/lib/panels/EventStreamPanel.test.ts index ed874461..84385e02 100644 --- a/conductor-gui/ui/src/lib/panels/EventStreamPanel.test.ts +++ b/conductor-gui/ui/src/lib/panels/EventStreamPanel.test.ts @@ -40,6 +40,7 @@ vi.mock('$lib/stores/events.js', () => { eventChannelFilter: writable('all'), eventDeviceFilter: writable('all'), eventBuffer: writable([]), + eventFiredFilter: writable(true), eventStreamVisible: writable(true), pushEvent: vi.fn(), pushEvents: vi.fn(), diff --git a/conductor-gui/ui/src/lib/stores/events.js b/conductor-gui/ui/src/lib/stores/events.js index 1efe1f62..2ea3e9a6 100644 --- a/conductor-gui/ui/src/lib/stores/events.js +++ b/conductor-gui/ui/src/lib/stores/events.js @@ -37,7 +37,7 @@ export const eventBuffer = writable([]); /** * Event type filter - * Values: 'all' | 'cc' | 'note' | 'bend' | 'aftertouch' + * Values: 'all' | 'cc' | 'note' | 'bend' | 'aftertouch' | 'fired' */ export const eventTypeFilter = writable('all');