Help screen, explore→set-connector-type Enter, settype UI polish.
- New `screen_help.cpp` (`screen_idx = 6`). Left column: menu of 13 topics (Overview, Dashboard, Console, Palette, Explore, Connect/plug, set-connector-type, Signal types, NC pins, Analyze, Scripting, Save/restore, Quitting). Centre column: paragraphs of the focused topic, word-wrapped via `paragraph()` and scrollable. Right column: standard help panel. - `help` bare → opens the screen; `help <name>` keeps the existing textual command-help behaviour for scripts. - Dashboard `[h]` shortcut opens the screen, and the dashboard help panel (both the loaded and the no-system branch) lists it. - Console: title gets the standard breadcrumb (`essim → console — type commands, read textual output`). Module/connection counters moved off (they live on the dashboard now). - Explore Enter on a part jumps to `set-connector-type` with the exact-match index pre-computed in the filtered list (avoids the substring-match collision where `J20` would land on the wrong row when J200/J21 also matched). - set-connector-type screen: bind `focused_entry` to `selected` on both menus so the cursor `>` tracks the selected row when state is pre-seeded from outside. Right column drops its strict `size(WIDTH, EQUAL, 40)` in favour of `flex`, and the `new type` input uses `xflex` so it actually stretches across the column. - Esc on `set-connector-type` honours `screen_back_idx` — when entered via Enter on a part in `explore`, Esc returns to explore; otherwise it returns to the dashboard like every other screen. Standalone command entries explicitly reset the back-link. - Net-member rows in the explore detail pane carry a `module\tsignal` payload so Enter opens the popup scoped to the peer module rather than mis-firing on the locally selected one. Same scheme for local-pin rows. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,11 @@ class Tui {
|
||||
|
||||
// ---- Screen orchestration ----
|
||||
int screen_idx;
|
||||
// Where Esc should send the user *next* if they came via an inter-screen
|
||||
// jump (e.g. Enter on a part in `explore` → set-connector-type). −1 means
|
||||
// "no back-link, Esc goes to the dashboard like usual". Always reset
|
||||
// after consumption to avoid stale links across unrelated navigation.
|
||||
int screen_back_idx = -1;
|
||||
|
||||
// ---- Connect screen state ----
|
||||
std::vector<std::string> connect_modules;
|
||||
@@ -97,6 +102,10 @@ class Tui {
|
||||
// ---- Dashboard scroll state (0 = top; grows as the user scrolls down) ----
|
||||
int dashboard_scroll_offset = 0;
|
||||
|
||||
// ---- Help screen state ----
|
||||
int help_topic_idx = 0;
|
||||
std::vector<std::string> help_topic_names; ///< populated by BuildHelpScreen
|
||||
|
||||
// ---- Analyze screen state (unified verify + analyze) ----
|
||||
int analyze_focus_idx = 0; ///< 0=issues 1=groups 2=types
|
||||
std::vector<std::string> analyze_issues;
|
||||
@@ -186,6 +195,7 @@ private:
|
||||
ftxui::Component BuildExploreScreen();
|
||||
ftxui::Component BuildDashboardScreen();
|
||||
ftxui::Component BuildAnalyzeScreen();
|
||||
ftxui::Component BuildHelpScreen();
|
||||
ftxui::Component BuildSignalTypeModal();
|
||||
ftxui::Component BuildPaletteModal();
|
||||
// Open palette (resets query/index, builds initial list).
|
||||
|
||||
Reference in New Issue
Block a user