From 88e0adec5d6c70021f96092b4afc309f35d23d2a Mon Sep 17 00:00:00 2001 From: Mollusk Date: Sun, 14 Jun 2026 03:47:19 -0400 Subject: [PATCH] feat(ui): in-call echo-cancellation toggle, synced with Settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an "Echo cancellation" checkbox to the in-call control column (beside Push-to-Talk). It binds to the same config.echo_cancellation_enabled flag and ToggleEchoCancellation message as the Settings checkbox, so the two stay in sync automatically (single source of truth; iced re-renders from it). A tooltip is explicit that it applies on the NEXT room join — the current PipeWire-module AEC is wired at join time and isn't hot-swappable mid-call. (A true live in-call toggle falls out for free once the in-process EchoCanceller lands — AEC Stage E.) Co-Authored-By: Claude Opus 4.8 --- src/app/mod.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/app/mod.rs b/src/app/mod.rs index 80243ca..9722277 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1775,6 +1775,27 @@ fn view(state: &AppState) -> Element<'_, AppMessage> { column![] }, vertical_space(20.0), + // Echo cancellation — same flag + message as the Settings checkbox, so + // toggling here and there stay in sync automatically (single source of + // truth: config.echo_cancellation_enabled). Tooltip is explicit that it + // applies on the NEXT join (the PipeWire-module AEC is wired at join + // time, not hot-swappable mid-call). + tooltip( + checkbox(state.config.echo_cancellation_enabled) + .label("Echo cancellation") + .on_toggle(AppMessage::ToggleEchoCancellation), + container( + text("Cancels speaker echo + suppresses noise. Applies on your next room join.") + .size(11) + .color(color_text), + ) + .padding(8) + .max_width(260.0) + .style(c_style(color_crust, color_surface, 6.0)), + iced::widget::tooltip::Position::Top, + ) + .gap(8), + vertical_space(20.0), { let (rec_kind, rec_label, rec_bg, rec_hover, rec_fg) = if state.recording { (IconKind::Stop, "Stop Recording", color_red, color_maroon, color_crust)