Skip to content

fix(wfm): relocate WFM toggle to the DAX pan menu so frequency digits don't clip#3853

Merged
ten9876 merged 2 commits into
mainfrom
fix/wfm-button-relocate-out-of-freqrow
Jun 27, 2026
Merged

fix(wfm): relocate WFM toggle to the DAX pan menu so frequency digits don't clip#3853
ten9876 merged 2 commits into
mainfrom
fix/wfm-button-relocate-out-of-freqrow

Conversation

@ten9876

@ten9876 ten9876 commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two related flag fixes:

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

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

  • RxApplet: drop the WFM button + 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 gating.
  • SpectrumOverlayMenu: add the WFM toggle below "IQ Ch"; emit wfmToggleRequested(on, sliceId); self-gated setWfmActive() reflector.
  • MainWindow_Wiring: route the toggle to activateWFM/deactivateWFM.
  • reflectWfmButtons: drive the single DAX-menu toggle.

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 page sizeHint before the new grid geometry settled — so growing FM→voice landed at the FM height. Fix: defer one relayoutToCurrentContent() to the next event-loop turn from updateModeTab(), covering both mode-change paths.

Verified via the automation bridge driving USB→FM→USB with the Mode tab open:

Transition Before After Correct
→ FM 234 (didn't shrink) 178 178 ✓
FM → USB 178 ❌ 234 ✅ 234 ✓
FM → LSB 178 ❌ 234 ✅ 234 ✓

Behavior notes

  • Frequency digits no longer clip; WFM reachable from the DAX pan menu in any mode.
  • With WFM no longer FM-gated, leaving FM on the flag no longer auto-tears-down the demod (raw-IQ, mode-independent); an explicit RxApplet mode change still tears it down.

Test plan

  • Builds clean (cmake --build build --target AetherSDR)
  • FLEX-8600: digits no longer clip; WFM toggles from DAX menu; FM↔voice flag panel resizes correctly (bridge-verified heights above)

🤖 Generated with Claude Code

@ten9876 ten9876 requested review from a team as code owners June 27, 2026 01:59
@github-actions

Copy link
Copy Markdown

Accessibility check findings

This PR touches src/gui/ files with 1 accessibility issue(s).
Full details appear as inline annotations on the diff above.

Files scanned : 3
Files with findings: 1
Total findings : 1

See docs/a11y.md for the canonical
Qt patterns (setAccessibleName, QAccessibleValueChangeEvent,
QAccessibleInterface subclasses, etc.). Structural remediation
(keyboard navigation, custom QAccessibleInterface subclasses)
is tracked in #3288.

Findings are warnings only — the build is not blocked.

@ten9876 ten9876 marked this pull request as draft June 27, 2026 02:01
@ten9876 ten9876 marked this pull request as ready for review June 27, 2026 02:41

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_wfmBtn exists and is fully wired — toggle → wfmActivated(on, sliceId) (VfoWidget.cpp:2295), plus its own setWfmActive() reflector (VfoWidget.cpp:2952) that reflectWfmButtons() still drives. So consolidating onto it is sound.
  • No dangling references. RxApplet::setWfmActive had exactly one caller (MainWindow_DigitalModes.cpp:1360, removed here) and m_wfmButton was 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 the MainWindow.cpp:1397 connect (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

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @ten9876 — the WFM-button removal itself is clean and well-reasoned. Verified against the tree:

  • After the change, VfoWidget is the sole WFM toggle surface (on and off), and RxApplet still emits wfmActivated(false, …) on real-mode selection (RxApplet.cpp:525), so the mode-change teardown path is preserved.
  • The MainWindow::wfmActivated connection (MainWindow.cpp:1397activateWFM/deactivateWFM) stays valid — the if (on) branch just no longer fires from RxApplet, which is intended.
  • No dangling references: the removed m_wfmButton and RxApplet::setWfmActive() were only used by the (now-removed) reflectWfmButtons() line, and reflectWfmButtons still 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

@ten9876 ten9876 marked this pull request as draft June 27, 2026 03:08
@ten9876 ten9876 force-pushed the fix/wfm-button-relocate-out-of-freqrow branch from f544000 to e279fbc Compare June 27, 2026 03:21
@ten9876 ten9876 changed the title fix(rxapplet): remove WFM button from frequency row so digits don't clip fix(wfm): relocate WFM toggle to the DAX pan menu so frequency digits don't clip Jun 27, 2026
@ten9876 ten9876 marked this pull request as ready for review June 27, 2026 03:21
@github-actions

Copy link
Copy Markdown

Accessibility check findings

This PR touches src/gui/ files with 1 accessibility issue(s).
Full details appear as inline annotations on the diff above.

Files scanned : 6
Files with findings: 1
Total findings : 1

See docs/a11y.md for the canonical
Qt patterns (setAccessibleName, QAccessibleValueChangeEvent,
QAccessibleInterface subclasses, etc.). Structural remediation
(keyboard navigation, custom QAccessibleInterface subclasses)
is tracked in #3288.

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>
@ten9876 ten9876 force-pushed the fix/wfm-button-relocate-out-of-freqrow branch from e279fbc to fe95733 Compare June 27, 2026 03:30
@github-actions

Copy link
Copy Markdown

Accessibility check findings

This PR touches src/gui/ files with 1 accessibility issue(s).
Full details appear as inline annotations on the diff above.

Files scanned : 8
Files with findings: 1
Total findings : 1

See docs/a11y.md for the canonical
Qt patterns (setAccessibleName, QAccessibleValueChangeEvent,
QAccessibleInterface subclasses, etc.). Structural remediation
(keyboard navigation, custom QAccessibleInterface subclasses)
is tracked in #3288.

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>
@github-actions

Copy link
Copy Markdown

Accessibility check findings

This PR touches src/gui/ files with 1 accessibility issue(s).
Full details appear as inline annotations on the diff above.

Files scanned : 8
Files with findings: 1
Total findings : 1

See docs/a11y.md for the canonical
Qt patterns (setAccessibleName, QAccessibleValueChangeEvent,
QAccessibleInterface subclasses, etc.). Structural remediation
(keyboard navigation, custom QAccessibleInterface subclasses)
is tracked in #3288.

Findings are warnings only — the build is not blocked.

@ten9876 ten9876 merged commit 9fe87a9 into main Jun 27, 2026
6 checks passed
@ten9876 ten9876 deleted the fix/wfm-button-relocate-out-of-freqrow branch June 27, 2026 05:38
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