aethersdr / aethersdr/AetherSDR

Refactor Phase 3 (optional): table-drive the menu + shortcut builders

Open
#3,558 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement GUI maintainer-review priority: low
Dominant language
C++
Stars
221
Forks
117
Avg merge
2d 7h
Merged PRs (30d)
299

Description

Follow-up to #3351 (closed). This is the issue's Phase 3, which it explicitly marked "optional, later" — filing it so the idea isn't lost, not because it's load-bearing.

Idea

buildMenuBar() (now in MainWindow_Menus.cpp, ~1,000 lines) and registerShortcutActions() (in MainWindow_Shortcuts.cpp, ~560 lines) are long imperative sequences of near-identical addAction(...) + connect(...) / registerAction(...) calls. Much of that repetition could collapse into a data table (id, label, shortcut, handler, enable-predicate) walked by a small builder loop.

Why it's optional / low priority

  • Pure ergonomics — no behavior change, no architectural unlock, no bug.
  • The decomposition already solved the actual pain (#3351's goal): these are now isolated in their own reviewable TUs, off the MainWindow.cpp hot path.
  • Table-driving menus is a readability nicety with real risk of subtle behavior drift (action ordering, conditional enables, lambda captures) for modest payoff. Only worth doing if someone's already deep in the menu/shortcut code for another reason.

If pursued

  • Start with registerShortcutActions() — it's the more regular of the two (the shortcut registry already has a uniform registerAction(id, name, category, …) shape).
  • Menus are messier (submenus, separators, dynamic/conditional items, the contributors-fetch lambda) and may not table-drive cleanly — partial conversion is fine.
  • Behavior-preserving; full menu-walk + shortcut QA required.

No urgency. Closeable as wontfix if the team decides the repetition isn't worth touching.

Refs #3351

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with registerShortcutActions() in MainWindow_Shortcuts.cpp, then compare the related buildMenuBar() code in MainWindow_Menus.cpp. Review the existing registerAction and addAction/connect sequences before deciding what can be represented in a table. Done means behavior is preserved, including ordering, conditional enables, captures, and full menu and shortcut QA.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.