Skip to content

fix(rade): guard m_daxBridge ref in deactivateRADE() for Windows/no-PipeWire#2662

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
NF0T:fix/rade-deactivate-daxbridge-guard
May 14, 2026
Merged

fix(rade): guard m_daxBridge ref in deactivateRADE() for Windows/no-PipeWire#2662
ten9876 merged 1 commit into
aethersdr:mainfrom
NF0T:fix/rade-deactivate-daxbridge-guard

Conversation

@NF0T

@NF0T NF0T commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the Windows (and Linux-without-PipeWire) build break introduced by #2633.

m_daxBridge is declared only inside #if defined(Q_OS_MAC) || defined(HAVE_PIPEWIRE) in MainWindow.h. PR #2633 added an unconditional reference to it in deactivateRADE():

// Before — breaks Windows/Linux-no-PipeWire:
bool daxBridgeActive = (m_daxBridge != nullptr);

This PR gates that assignment behind the same preprocessor guard:

bool daxBridgeActive = false;
#if defined(Q_OS_MAC) || defined(HAVE_PIPEWIRE)
daxBridgeActive = (m_daxBridge != nullptr);
#endif

The macOS fix from #2633 is fully preserved — on macOS/PipeWire, daxBridgeActive is still set from the live pointer so stream remove is correctly skipped when the bridge is active. On Windows/Linux-no-PipeWire, daxBridgeActive stays false (no bridge on those platforms), so stream remove is issued as expected.

Fix shape was identified by aethersdr-agent in the #2633 review.

Files changed

File Change
src/gui/MainWindow.cpp Wrap daxBridgeActive assignment in #if defined(Q_OS_MAC) || defined(HAVE_PIPEWIRE)

🤖 Generated with Claude Code

…ipeWire

PR aethersdr#2633 removed the platform guards from deactivateRADE() but left an
unconditional reference to m_daxBridge, which is only a member under
#if defined(Q_OS_MAC) || defined(HAVE_PIPEWIRE).  This breaks the
Windows and Linux-without-PipeWire build.

Gate the daxBridgeActive assignment behind the same preprocessor guard
that protects the member declaration, matching the pattern used in the
rest of MainWindow.cpp.

Reported by aethersdr-agent in PR aethersdr#2633 review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NF0T NF0T requested a review from ten9876 as a code owner May 14, 2026 14:00

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved. Trivial, correct, self-cleanup. Guard matches the m_daxBridge declaration's preprocessor block exactly; default-false preserves expected behaviour on no-bridge platforms; macOS fix from #2633 fully preserved.

@ten9876 ten9876 merged commit 3007344 into aethersdr:main May 14, 2026
4 checks passed
ten9876 pushed a commit that referenced this pull request May 14, 2026
…2644)

Introduces PersistentDialog — base class that consolidates the lazy-construct + non-modal + geometry-persist + frameless-chrome boilerplate that 7+ dialogs (Profile Manager, Memory, SpotHub, DSP, MultiFlex, MidiMapping, PanLayout, NetworkDiagnostics) had been hand-rolling. Migrates ProfileManagerDialog as the proof-of-concept; other dialogs land as follow-up issues.

PersistentDialog owns:
- Outer layout (FramelessWindowTitleBar + bodyWidget content slot)
- FramelessResizer::install
- setFramelessMode with wasVisible-guarded geometry preserve and body margin nudge
- Geometry persistence (base64 in AppSettings) with crash-resilient save semantics — in-memory on move/resize, disk-flush on close. Restore deferred to first showEvent so subclasses can call setMinimumSize in their own ctor without clipping.
- m_restoringGeometry guard during restore, m_geometryRestored gate against pre-show native-window move/resize events overwriting saved geometry.

MainWindow::showOrRaisePersistent template helper collapses the per-menu-callback boilerplate to one line. Auto-registers each instance into m_persistentDialogs (QPointer list, auto-prunes nulls on iteration) so setFramelessWindow() can propagate the toggle without explicit qobject_cast branches.

Profile Manager migration is strictly subtractive: 99 LOC removed from ProfileManagerDialog.cpp, 27 from the header. All hand-rolled setFramelessMode / closeEvent / moveEvent / resizeEvent / saveGeometry / restoreGeometry / FramelessResizer::install / m_titleBar / m_bodyLayout members removed.

Required three iterations to land: QTabWidget forward-decl needed to be outside the AetherSDR namespace; first merge from main brought in PR #2641's setFramelessWindow conflict; second merge picked up PR #2662's m_daxBridge guard so Windows builds. Final state has all five CI checks green.

Closes #2605.

Co-Authored-By: AetherClaude <aethersdr-agent@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@NF0T NF0T deleted the fix/rade-deactivate-daxbridge-guard branch May 15, 2026 13:28
ten9876 added a commit that referenced this pull request May 24, 2026
## Summary

- Adds `src/gui/MainWindow.cpp` and `src/gui/MainWindow.h` to the
`dorny/paths-filter` `build` group so the Windows CI job runs whenever
the hot file changes.
- The file is densely platform-guarded (`#ifdef Q_OS_WIN`, `Q_OS_MAC`,
`HAVE_PIPEWIRE`), so Linux-passing edits can still break MSVC.

## Motivation

Same class of failure has bitten us repeatedly:
- **#2633#2662** — unconditional `m_daxBridge` reference inside a
macOS-only guard, caught post-release.
- **#2670** — Windows behaviour change not exercised by CI.
- **v26.5.3 (#3024)** — `ClientPhaseRotator.cpp` bare `M_PI` broke MSVC
(needs `_USE_MATH_DEFINES`). Different file, same shape: path not on the
filter → `check-windows` didn't run → broken Windows build landed and
required a follow-up patch.

This PR closes the gap for the highest-leverage file. Other hot
platform-guarded files can be added later if their breakage rate
justifies the runner time.

## Cost

Most PRs continue to skip `check-windows` (the filter still excludes
most source paths). Cost increase is bounded to the subset of PRs that
touch MainWindow.cpp/.h, which is exactly the subset that needs the
coverage.

## Test plan

- [ ] CI: `check-paths` job runs and reports `build-changed=true` on
this PR (because `.github/workflows/**` is itself a watched path).
- [ ] CI: `check-windows` job runs and passes (no source changed, so it
should be a clean cache hit).
- [ ] After merge: next PR that touches `src/gui/MainWindow.cpp`
triggers `check-windows` automatically.

Closes #2671.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ten9876 added a commit that referenced this pull request May 28, 2026
## Summary

Drop the \`check-paths\` allow-list job that gated \`check-windows\` and
\`check-macos\` based on a hand-maintained set of files. Both
cross-platform CI builds now run on every PR.

## Why

The path-filter approach has been a chronic leaker. Every time a new
file gained a platform-guarded branch (\`#ifdef Q_OS_WIN\`, \`#ifdef
Q_OS_MAC\`, \`HAVE_PIPEWIRE\`, etc.) that wasn't on the allow-list, CI
silently skipped the relevant cross-platform check and the regression
surfaced at release tag time. The follow-up was always to add another
path to the filter — and then the same class of issue would resurface
elsewhere a few PRs later.

Pattern receipts:
- #796 — original \"MSVC issue slipped past CI\" lesson
- #2633#2662 — macOS \`m_daxBridge\` reference inside macOS-only
guard, missed
- #2670 — Windows behavior change not exercised by CI
- #2671 — added MainWindow.cpp/.h to filter after a miss
- #2929#3052 — WASAPI mono-mic recovery landed unverified; added
AudioEngine.cpp/.h
- #3210 — re-added AudioEngine after a relapse
- v26.5.3 — ClientPhaseRotator.cpp \`M_PI\` MSVC break slipped through
- #3241 (yesterday) — CwSidetonePortAudioSink WASAPI fix; entire
\`#ifdef Q_OS_WIN\` block never compiled by CI because the file wasn't
on the filter

## Trade-off

Cost: ~15-20 min of GitHub Actions runner time per PR (Windows + macOS
in parallel, both cached aggressively — cold ~5 min, warm ~2-3 min).

Benefit: a whole class of release-time regression we've been paying for
repeatedly.

## Test plan

- [x] YAML valid (\`python3 -c 'import yaml; yaml.safe_load(...)'\`)
- [ ] Confirm \`check-windows\` and \`check-macos\` actually run on this
PR (no longer marked \`skipping\`)
- [ ] Both pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
G6PWY-Chris pushed a commit to G6PWY-Chris/AetherSDR that referenced this pull request Jun 22, 2026
… (aethersdr#3028)

## Summary

- Adds `src/gui/MainWindow.cpp` and `src/gui/MainWindow.h` to the
`dorny/paths-filter` `build` group so the Windows CI job runs whenever
the hot file changes.
- The file is densely platform-guarded (`#ifdef Q_OS_WIN`, `Q_OS_MAC`,
`HAVE_PIPEWIRE`), so Linux-passing edits can still break MSVC.

## Motivation

Same class of failure has bitten us repeatedly:
- **aethersdr#2633aethersdr#2662** — unconditional `m_daxBridge` reference inside a
macOS-only guard, caught post-release.
- **aethersdr#2670** — Windows behaviour change not exercised by CI.
- **v26.5.3 (aethersdr#3024)** — `ClientPhaseRotator.cpp` bare `M_PI` broke MSVC
(needs `_USE_MATH_DEFINES`). Different file, same shape: path not on the
filter → `check-windows` didn't run → broken Windows build landed and
required a follow-up patch.

This PR closes the gap for the highest-leverage file. Other hot
platform-guarded files can be added later if their breakage rate
justifies the runner time.

## Cost

Most PRs continue to skip `check-windows` (the filter still excludes
most source paths). Cost increase is bounded to the subset of PRs that
touch MainWindow.cpp/.h, which is exactly the subset that needs the
coverage.

## Test plan

- [ ] CI: `check-paths` job runs and reports `build-changed=true` on
this PR (because `.github/workflows/**` is itself a watched path).
- [ ] CI: `check-windows` job runs and passes (no source changed, so it
should be a clean cache hit).
- [ ] After merge: next PR that touches `src/gui/MainWindow.cpp`
triggers `check-windows` automatically.

Closes aethersdr#2671.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
G6PWY-Chris pushed a commit to G6PWY-Chris/AetherSDR that referenced this pull request Jun 22, 2026
## Summary

Drop the \`check-paths\` allow-list job that gated \`check-windows\` and
\`check-macos\` based on a hand-maintained set of files. Both
cross-platform CI builds now run on every PR.

## Why

The path-filter approach has been a chronic leaker. Every time a new
file gained a platform-guarded branch (\`#ifdef Q_OS_WIN\`, \`#ifdef
Q_OS_MAC\`, \`HAVE_PIPEWIRE\`, etc.) that wasn't on the allow-list, CI
silently skipped the relevant cross-platform check and the regression
surfaced at release tag time. The follow-up was always to add another
path to the filter — and then the same class of issue would resurface
elsewhere a few PRs later.

Pattern receipts:
- aethersdr#796 — original \"MSVC issue slipped past CI\" lesson
- aethersdr#2633aethersdr#2662 — macOS \`m_daxBridge\` reference inside macOS-only
guard, missed
- aethersdr#2670 — Windows behavior change not exercised by CI
- aethersdr#2671 — added MainWindow.cpp/.h to filter after a miss
- aethersdr#2929aethersdr#3052 — WASAPI mono-mic recovery landed unverified; added
AudioEngine.cpp/.h
- aethersdr#3210 — re-added AudioEngine after a relapse
- v26.5.3 — ClientPhaseRotator.cpp \`M_PI\` MSVC break slipped through
- aethersdr#3241 (yesterday) — CwSidetonePortAudioSink WASAPI fix; entire
\`#ifdef Q_OS_WIN\` block never compiled by CI because the file wasn't
on the filter

## Trade-off

Cost: ~15-20 min of GitHub Actions runner time per PR (Windows + macOS
in parallel, both cached aggressively — cold ~5 min, warm ~2-3 min).

Benefit: a whole class of release-time regression we've been paying for
repeatedly.

## Test plan

- [x] YAML valid (\`python3 -c 'import yaml; yaml.safe_load(...)'\`)
- [ ] Confirm \`check-windows\` and \`check-macos\` actually run on this
PR (no longer marked \`skipping\`)
- [ ] Both pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants