refactor(console): phase 5b — decompose toolbar/input/commands-popup methods

Finish the thin-view pass on the remaining large render methods (pure code
motion, no behavior change):

- renderToolbar (225 -> 99 lines): extracted drawToolbarStatus(), the
  drawLogFilterToggles() checkbox group, drawFilterInput(), and drawZoomControls().
- renderInput: factored the command echo + built-in interception + submit into
  submitConsoleCommand(exec, cmd) -> bool, leaving renderInput to own just the
  glass panel + InputText + completion/history callback.
- renderCommandsPopup (194 -> 135 lines): removed the duplicated lowercase-and-
  find filter logic (match-count loop and per-row filter now share
  consoleCommandMatchesFilter()) and extracted the [optional]-param dimming loop
  into drawConsoleCommandParams().

Full-node + lite build clean; ctest green; source hygiene clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 19:25:12 -05:00
parent 57291ef28c
commit 1c248d727a
2 changed files with 213 additions and 182 deletions

View File

@@ -100,10 +100,20 @@ private:
// Format a completed command result (JSON role -> channel) into console lines.
void addFormattedResult(const std::string& result, bool is_error);
void renderStatusHeader(ConsoleCommandExecutor& exec);
void renderToolbar(ConsoleCommandExecutor& exec);
void renderInput(ConsoleCommandExecutor& exec);
void renderCommandsPopup();
// renderToolbar() draws the top bar; these are its sub-steps:
void renderToolbar(ConsoleCommandExecutor& exec);
void drawToolbarStatus(ConsoleCommandExecutor& exec); // backend status dot + label
void drawLogFilterToggles(); // daemon/errors/rpc/app checkboxes
void drawFilterInput(); // text filter + match count
void drawZoomControls(); // zoom -/+ buttons
// renderInput() draws the command line; dispatch is factored out:
void renderInput(ConsoleCommandExecutor& exec);
// Echo + handle a submitted command line (built-ins + submit). True if non-empty/handled.
bool submitConsoleCommand(ConsoleCommandExecutor& exec, const std::string& cmd);
// renderOutput() orchestrates the scrollable output area; these are its sub-steps:
void renderOutput();
void computeVisibleLines(bool& hasTextFilter, std::string& filterLower); // -> visible_indices_