fix(wfm): relocate WFM toggle to the DAX pan menu so frequency digits don't clip#3853
Conversation
Accessibility check findingsThis PR touches
See Findings are warnings only — the build is not blocked. |
There was a problem hiding this comment.
Thanks @ten9876 — the core change is clean and I verified it against the tree.
The code change looks correct ✅
- VFO flag is a real, sole surface.
VfoWidget::m_wfmBtnexists and is fully wired — toggle →wfmActivated(on, sliceId)(VfoWidget.cpp:2295), plus its ownsetWfmActive()reflector (VfoWidget.cpp:2952) thatreflectWfmButtons()still drives. So consolidating onto it is sound. - No dangling references.
RxApplet::setWfmActivehad exactly one caller (MainWindow_DigitalModes.cpp:1360, removed here) andm_wfmButtonwas RxApplet-local — creation, member, setter, and the lone call are all removed together. Build should be clean. - Teardown path preserved. The mode-combo still emits
wfmActivated(false, …), so theMainWindow.cpp:1397connect (RxApplet::wfmActivated→ activate/deactivate) stays valid and a real-mode selection still tears down a running demod, as the PR claims.
Two things to address
1. The design doc is out of scope for this PR. docs/aetherd-headless-engine-design.md (+295 lines) is essentially all 300 additions, and it's an unrelated headless-engine RFC. The doc itself states it's a Draft RFC that "requires an approved RFC before a PR is opened" per GOVERNANCE.md. Bundling it into a UI-clipping bugfix means it can't get the RFC review it asks for, and it makes this otherwise-tiny fix hard to evaluate. Please split it out into its own RFC PR.
2. WFM reachability changes — please confirm it's intended. The removed RxApplet button was always visible. The VFO flag button it consolidates onto is FM-mode-gated — m_wfmBtn->setVisible(isFm) where isFm = FM|NFM|DFM (VfoWidget.cpp:3942, :3951, :4530). Since WFM is a software demod on raw IQ (per your own description, it doesn't need the radio in an FM mode), this means the toggle is now only reachable after putting the slice into an FM mode, where before it wasn't. That's arguably a behavior change despite the "no functional change" note. If pre-existing FM-gating on the flag button is the desired contract, fine — just worth a maintainer call.
Net: the WFM-button removal itself is a good, well-reasoned cleanup. Recommend pulling the RFC doc into a separate PR and confirming the FM-gating reachability point.
🤖 aethersdr-agent · cost: $2.9535 · model: claude-opus-4-8
There was a problem hiding this comment.
Thanks @ten9876 — the WFM-button removal itself is clean and well-reasoned. Verified against the tree:
- After the change,
VfoWidgetis the sole WFM toggle surface (on and off), andRxAppletstill emitswfmActivated(false, …)on real-mode selection (RxApplet.cpp:525), so the mode-change teardown path is preserved. - The
MainWindow::wfmActivatedconnection (MainWindow.cpp:1397→activateWFM/deactivateWFM) stays valid — theif (on)branch just no longer fires fromRxApplet, which is intended. - No dangling references: the removed
m_wfmButtonandRxApplet::setWfmActive()were only used by the (now-removed)reflectWfmButtons()line, andreflectWfmButtonsstill reflects the VFO flag. - All 6 CI checks green (build, macOS, Windows, CodeQL, a11y static analysis).
Two things before merge:
1. Scope — the headless-engine RFC doesn't belong in this PR (please split).
docs/aetherd-headless-engine-design.md is a new 295-line architecture RFC and accounts for nearly all of the +300 additions. It's entirely unrelated to "remove WFM button so digits don't clip." More importantly, the doc itself states (§0 / the GOVERNANCE.md note) that it's an architecture change requiring maintainer RFC sign-off before any code. Bundling it into a small UI fix means it either blocks this trivial fix on RFC review, or lands an unreviewed RFC by riding along. Please pull it into its own PR so each can be evaluated on its own terms.
2. Minor — stale comments still describe two WFM buttons.
Now that the RxApplet copy is gone, a few comments that frame WFM sync as keeping two buttons from desyncing are misleading. At least the one in a file you're already touching:
MainWindow_DigitalModes.cpp:1228— "activated by the RxApplet/VfoWidget WFM toggles" (only the VfoWidget toggle remains).
For completeness (out of this diff, optional): VfoWidget.h:143 and MainWindow.h:1123 also still reference "the RxApplet WFM button" / both buttons desyncing.
The fix is correct as-is; just please separate the RFC doc.
🤖 aethersdr-agent · cost: $1.7167 · model: claude-opus-4-8
f544000 to
e279fbc
Compare
Accessibility check findingsThis PR touches
See Findings are warnings only — the build is not blocked. |
…gits The WFM software-demod toggle lived in RxApplet's `m_freqRow` — the same row as the large frequency readout — so it clipped the digits (#3839's shrink-to-fit only masked it). A second, FM-mode-gated copy also lived on the VFO flag. Consolidate to a SINGLE WFM surface in the DAX pan overlay menu, directly below the "IQ Ch" selector — the natural home, since WFM demodulates that pan's DAX IQ stream on the PC. WFM runs on raw IQ and is mode-independent, so the menu toggle is always reachable (the old flag button only appeared in FM modes). - RxApplet: drop the WFM button + the vestigial setWfmActive(); keep the mode-combo wfmActivated(false) teardown. - VfoWidget: remove the FM-gated WFM button, its setWfmActive() reflector, the wfmActivated signal, and the FM-mode gating that showed/tore it down. - SpectrumOverlayMenu: add the WFM toggle below IQ Ch; emit wfmToggleRequested(on, sliceId); add a self-gated setWfmActive() reflector. - MainWindow_Wiring: route the menu toggle to activateWFM/deactivateWFM. - reflectWfmButtons: drive the single DAX-menu toggle. WFM remains a per-slice singleton; this only changes where the toggle lives. Note: with WFM no longer FM-gated, leaving FM mode on the flag no longer auto-tears-down the demod (it is raw-IQ, mode-independent); an explicit RxApplet mode change still tears it down. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e279fbc to
fe95733
Compare
Accessibility check findingsThis PR touches
See Findings are warnings only — the build is not blocked. |
…ows (#3853) Switching FM -> LSB/USB with the flag's Mode tab open left the panel too short, so the filter-preset grid overflowed / was clipped (FM has no preset grid; voice modes have 2+ rows). updateModeTab() rebuilds the grid, but the synchronous relayout on the same turn read a stale page sizeHint before the new grid geometry settled, so the panel landed at the FM height instead of growing. Defer one relayoutToCurrentContent() to the next event-loop turn (once the rebuilt grid is laid out) from updateModeTab(), covering both mode-change paths (modeChanged handler and syncFromSlice). Pre-existing flag relayout bug, surfaced during the WFM work. Verified via the automation bridge driving USB->FM->USB with the Mode tab open: FM->LSB/USB flag height now 234 (was 178); FM correctly shrinks to 178. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Accessibility check findingsThis PR touches
See Findings are warnings only — the build is not blocked. |
Summary
Two related flag fixes:
WFM → single surface in the DAX pan menu. Removes the WFM toggle from the RxApplet frequency row (where it clipped the frequency digits) and the FM-gated VFO flag, and adds a single toggle in the DAX pan overlay menu, directly below the "IQ Ch" selector — the natural home, since WFM demodulates that pan's DAX IQ stream and is mode-independent (always reachable).
Flag mode-tab regrow fix (pre-existing, surfaced during the WFM work). Switching FM → LSB/USB with the flag's Mode tab open left the panel too short, so the filter-preset grid overflowed/clipped.
WFM relocation
WFM is slice-keyed but pan-sourced: it demodulates the slice's pan's DAX IQ stream on the PC (NCO → 48 kHz → discriminator → FIR → stereo to a VAC), with software Doppler. The "IQ Ch" dropdown selects exactly that stream, so the toggle belongs beside it.
setWfmActive(); keep the mode-combowfmActivated(false)teardown.setWfmActive()reflector, thewfmActivatedsignal, and the FM gating.wfmToggleRequested(on, sliceId); self-gatedsetWfmActive()reflector.activateWFM/deactivateWFM.Flag mode-tab regrow fix
Root cause:
updateModeTab()rebuilds the filter-preset grid (FM has no grid; voice modes have 2+ rows), but the synchronous relayout on the same turn read a stale pagesizeHintbefore the new grid geometry settled — so growing FM→voice landed at the FM height. Fix: defer onerelayoutToCurrentContent()to the next event-loop turn fromupdateModeTab(), covering both mode-change paths.Verified via the automation bridge driving USB→FM→USB with the Mode tab open:
Behavior notes
Test plan
cmake --build build --target AetherSDR)🤖 Generated with Claude Code