Skip to content

fix: resolve 15 frontend and backend review issues#12

Merged
Detair merged 3 commits into
masterfrom
fix/frontend-review-issues
Feb 7, 2026
Merged

fix: resolve 15 frontend and backend review issues#12
Detair merged 3 commits into
masterfrom
fix/frontend-review-issues

Conversation

@Detair

@Detair Detair commented Feb 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • 15 issues fixed across frontend UI, audio engine, and plugin layers identified during a full implementation review
  • Focus on frontend correctness, performance optimizations, and runtime feature toggling
  • All tests pass, clean compile across all 5 crates

Changes

Frontend - High Priority

  • Dark mode toggle now uses theme::setup_custom_style() instead of applying a different inline theme (visual regression fix)
  • Mini mode only sends viewport resize command once on transition, not every frame (~30 wasted commands/sec)
  • Repaint rate reduced to 0.5fps when engine is idle (was 30fps unconditionally — saves CPU/battery)
  • ScrollArea wraps main panel content to prevent overflow on small screens or large font scaling
  • Feature toggles (EQ, output filter, echo cancel) now update the running engine without requiring restart

Frontend - Medium Priority

  • Spectrum send skips Vec::clone() when channel is full (avoids wasted allocation on audio thread)
  • pactl poll interval increased from 2s to 5s (reduces subprocess spawn overhead)
  • Wizard device lists no longer cloned every frame (eliminates per-frame Vec allocation)
  • Config auto-save every 5 seconds when dirty to prevent data loss on crash
  • Duplicate docstring removed from render_volume_meter

Backend

  • OutputFilterEngine suppression_strength now uses an atomic, responds to slider changes at runtime
  • LV2 plugin validates 48kHz sample rate on init, rejects with error message at wrong rate
  • Audio thread busy-wait replaced with thread::yield_now() + continue (reduces latency spikes)
  • unsafe Send safety comment updated to follow // SAFETY: Rust convention with improved explanation
  • Jitter measurement uses EWMA (alpha=0.1) instead of max-over-window for smoother, more responsive display

Test plan

  • cargo check — clean compile across all 5 crates
  • cargo test — all 16 tests pass
  • Manual: toggle dark mode at runtime, verify premium theme applies correctly
  • Manual: enter/exit mini mode, verify no flickering or repeated resizes
  • Manual: toggle EQ/output filter/echo cancel while engine is running
  • Manual: verify idle CPU usage is reduced when engine is stopped

🤖 Generated with Claude Code

Detair and others added 3 commits February 7, 2026 19:59
Frontend (high priority):
- Dark mode toggle now uses custom theme instead of generic visuals
- Mini mode only sends resize command once, not every frame
- Repaint rate reduced to 0.5fps when engine is idle (saves CPU/battery)
- ScrollArea wraps main panel to prevent content overflow
- EQ/output filter/echo cancel toggles now update running engine

Frontend (medium priority):
- Spectrum send skips clone when channel is full
- pactl poll interval increased from 2s to 5s
- Wizard device lists no longer cloned every frame
- Auto-save dirty config every 5s to prevent crash data loss
- Removed duplicate docstring on render_volume_meter

Backend:
- OutputFilterEngine suppression_strength uses atomic for live updates
- LV2 plugin validates 48kHz sample rate on init
- Audio thread busy-wait replaced with yield_now + continue
- Improved unsafe Send safety comment to follow Rust conventions
- Jitter measurement uses EWMA instead of max-over-window

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix frame drop: replace yield+continue with retry loop (up to 100
  yields) in both AudioEngine and OutputFilterEngine to prevent silent
  audio frame loss under buffer-full conditions
- Fix echo cancel toggle: revert checkbox on engine restart failure so
  UI matches actual state
- Fix output filter toggle: revert checkbox and escalate to log::error
  when OutputFilterEngine::start fails
- Fix jitter measurement: clamp loop_delta to <100ms to ignore system
  suspend/resume spikes that skew the EWMA

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace reference stream .ok() with match to log actual cpal errors
- Handle spectrum sender Disconnected by clearing sender to stop wasted clones
- Add status message and config revert for output filter failure in start_engine()
- Rename jitter_max_us → jitter_ewma_us to match EWMA semantics

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Detair Detair merged commit bffd6ab into master Feb 7, 2026
1 of 3 checks passed
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.

1 participant