Refactor: extract export commands; co-locate sigtype popup logic.
Two focused, behaviour-preserving moves: 1. `OpenSignalTypeDialog` + `ApplySignalTypeChoice` moved from `shell.cpp` to `screen_sigtype_modal.cpp` so the popup owns all of its logic instead of having its open/apply functions live in the shell file. 2. The `export` command extracted from `commands.cpp` to a new `commands_export.cpp` under a `Tui::RegisterExportCommands()` member. `RegisterCommands()` calls it at the end. File-local helpers (`csv_quote`, `pin_side`) move alongside in an anonymous namespace. Establishes the pattern for future per-group splits: declare a `Register<X>Commands()` member, define it in its own file, call it from the orchestrator. Other groups stay in `commands.cpp` for now — nothing else has grown large enough to warrant the split. Sizes: shell.cpp 497 → 448, commands.cpp 846 → 675 (+ 191 for the new commands_export.cpp). DESIGN.md updated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -201,6 +201,9 @@ public:
|
||||
private:
|
||||
// Lifecycle (commands.cpp)
|
||||
void RegisterCommands();
|
||||
// Per-file command-group registrators. Each adds entries to the
|
||||
// `commands` map. Called from RegisterCommands().
|
||||
void RegisterExportCommands(); // commands_export.cpp
|
||||
|
||||
// Shell (shell.cpp)
|
||||
void Print(const std::string &line);
|
||||
|
||||
Reference in New Issue
Block a user