feat(mqtt): show internal publish topics in Publish Buttons settings tab#3251
Conversation
Mirrors the "Internal AetherSDR Topics" group box already present in the Subscriptions tab — adds an equivalent read-only panel to the bottom of the Publish Buttons tab listing aethersdr/cw/decode with its payload format and rx-flag description. Adds internalMqttPublishTopics() to MqttSettings for a machine-readable topic list alongside the existing internalMqttSubscriptionTopics(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nfo panel Addresses the minor observation from the aethersdr#3216 review — factors out "aethersdr/cw/decode" into an inline constexpr QLatin1String in MqttSettings.h so the call site in MainWindow and the new settings dialog info panel share the same definition and can't drift. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove payload example and rx-flag description from the group box; keep it minimal to match the style of the Subscriptions tab. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Nice symmetric addition — discoverability fix is well-targeted and the kCwDecodeTopic extraction tidies up the #3216 loose end. Thanks @K5PTB.
One concrete suggestion:
Use internalMqttPublishTopics() in the GUI to fully mirror the Subscriptions tab.
src/gui/MqttSettingsDialog.cpp:166-173 (existing Subscriptions panel) renders via:
.arg(internalMqttSubscriptionTopics().join(QStringLiteral("\n")))But the new Publish panel hardcodes the single topic instead of going through the function it just introduced:
.arg(QLatin1String(kCwDecodeTopic))You added internalMqttPublishTopics() precisely so callers can enumerate without touching the dialog — but then the dialog doesn't enumerate. Suggest:
auto* pubInternalText = new QLabel(
tr("Published automatically whenever MQTT is connected; these topics are not user-configurable:\n%1")
.arg(internalMqttPublishTopics().join(QStringLiteral("\n"))));That way next time something like kCwDecodeTopic gets added (aethersdr/audio/level, whatever), it shows up in the dialog automatically — same future-proofing the Subscriptions tab already has. It also keeps the two panels visually parallel in the source, which matches how they read in the UI.
Rest LGTM:
inline constexpr QLatin1String kCwDecodeTopicin the header is correct C++20 — single ODR-safe definition, no link issues.- The
MainWindow.cppswap toQString(kCwDecodeTopic)preserves the original semantics (wasQStringLiteral, now an implicit QLatin1String → QString conversion at the publish call; both produce the same on-the-wire topic). - Scope is tight, no behavior change beyond the new read-only label, no AppSettings/RAII concerns.
No blockers — the function-vs-constant nit is the only thing worth a follow-up commit if you agree.
🤖 aethersdr-agent · cost: $3.4008 · model: claude-opus-4-7
jensenpat
left a comment
There was a problem hiding this comment.
Thanks Paul for the MQTT dictionary. Do me a favor, please ask your agent to set up SSH commit signing for Github so I can speed up merging your fixes. Cheers
…tin1 at publish site
- Dialog label now mirrors the subscribe-side pattern by calling
internalMqttPublishTopics().join("\n"). The function was declared
but unused; this makes future topic additions a one-line change to
MqttSettings.cpp instead of touching the dialog wiring too.
- Publish callsite swapped to QString::fromLatin1(kCwDecodeTopic) to
avoid the implicit Latin1 → UTF-16 conversion via the QString(QLatin1String)
constructor every CW decode.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Done. I'm new to using GitHub, so I didn't know about this. |
…tab (aethersdr#3251) Closes aethersdr#3249. ## Summary The Subscriptions tab already has an **Internal AetherSDR Topics** group box listing topics AetherSDR subscribes to automatically. The Publish Buttons tab had no equivalent, leaving `aethersdr/cw/decode` — published for every decoded CW character since aethersdr#3216 — undiscoverable without reading source. - Adds a matching read-only group box to the bottom of the Publish Buttons tab; label text is mouse-selectable for copy-paste into subscriber configs - Adds `internalMqttPublishTopics()` to `MqttSettings.h/.cpp` alongside the existing `internalMqttSubscriptionTopics()` for a machine-readable topic list - Extracts the hardcoded `"aethersdr/cw/decode"` string into `inline constexpr QLatin1String kCwDecodeTopic` in `MqttSettings.h`; the publish call in `MainWindow` and the new settings panel now share the same definition — addressing the minor observation from the aethersdr#3216 review ## Files changed | File | Change | |---|---| | `src/core/MqttSettings.h` | `kCwDecodeTopic` constant + `internalMqttPublishTopics()` declaration | | `src/core/MqttSettings.cpp` | `internalMqttPublishTopics()` implementation | | `src/gui/MqttSettingsDialog.cpp` | Group box added to Publish Buttons tab | | `src/gui/MainWindow.cpp` | Publish call uses `kCwDecodeTopic` | ## Test plan - [x] Build clean (macOS, no warnings from changed files) - [x] MQTT settings dialog → Publish Buttons tab shows **Internal AetherSDR Topics** group box with `aethersdr/cw/decode` - [x] Label text is mouse-selectable - [x] Subscriptions tab unchanged - [x] No behavior change — UI only 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Jeremy Fielder <kk7gwy@aethersdr.com>
Closes #3249.
Summary
The Subscriptions tab already has an Internal AetherSDR Topics group box listing topics AetherSDR subscribes to automatically. The Publish Buttons tab had no equivalent, leaving
aethersdr/cw/decode— published for every decoded CW character since #3216 — undiscoverable without reading source.internalMqttPublishTopics()toMqttSettings.h/.cppalongside the existinginternalMqttSubscriptionTopics()for a machine-readable topic list"aethersdr/cw/decode"string intoinline constexpr QLatin1String kCwDecodeTopicinMqttSettings.h; the publish call inMainWindowand the new settings panel now share the same definition — addressing the minor observation from the feat(mqtt): publish CW decoded text to aethersdr/cw/decode #3216 reviewFiles changed
src/core/MqttSettings.hkCwDecodeTopicconstant +internalMqttPublishTopics()declarationsrc/core/MqttSettings.cppinternalMqttPublishTopics()implementationsrc/gui/MqttSettingsDialog.cppsrc/gui/MainWindow.cppkCwDecodeTopicTest plan
aethersdr/cw/decode🤖 Generated with Claude Code