Signal-type popup, NC pin tagging, interactive viewer hygiene.

- Enter on a signal entry (net / explore) opens a modal popup to pick
  power / gnd / other. Recording is deduped: a sequence of toggles on
  the same signal collapses to a single `set-signal-type` line; no-op
  selections record nothing.
- Bare interactive commands (the ones that open a full-screen mode)
  are no longer recorded by `script-save`. Their inline forms still
  are. Mutating actions inside a screen record their own canonical
  line.
- Mentor importer treats signals whose name starts with `unconnected`
  as no-connect — the pin is kept on the part without a signal and
  tagged `ImportedUnconnected`.
- `drop_singleton_signals` runs at the end of `load`: any signal with
  exactly one pin is detached (singletons are NC by definition); the
  pin is tagged `DroppedSingleton`. Count is reported inline.
- `verify` gains a one-line orphan summary (imported NC / dropped
  singleton totals). Pins materialised by `FillIdentityNCs` are
  excluded via a `pin_map` filter — they are bridged to a real signal
  on the peer module and are not real NCs at system level.
- NcOrigin tag is serialized in save snapshots as an optional 4th
  field on N records (backward-compatible).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 07:56:46 +02:00
parent 043fef0a31
commit 280526304d
16 changed files with 295 additions and 16 deletions

View File

@@ -86,6 +86,7 @@ class Tui {
std::string explore_child_filter;
std::string explore_detail_filter;
std::vector<std::string> explore_detail;
std::vector<std::string> explore_detail_sig; ///< parallel: signal name per detail line (empty = no signal)
int explore_detail_idx;
std::string explore_header;
int explore_focus_idx;
@@ -109,6 +110,13 @@ class Tui {
int net_sig_idx;
int net_focus_idx;
// ---- Signal-type popup (shared between net + explore screens) ----
bool sigtype_dialog_open = false;
std::string sigtype_dialog_mod;
std::string sigtype_dialog_sig;
std::vector<std::string> sigtype_dialog_entries; ///< ["power","gnd","other"]
int sigtype_dialog_choice = 0;
// ---- Set-type screen state ----
std::vector<std::string> settype_modules;
int settype_m_idx;
@@ -150,6 +158,14 @@ private:
void CompletePath(size_t start = 0);
void CompleteInline();
// Open the signal-type popup for <mod>/<sig> (no-op if names don't resolve).
void OpenSignalTypeDialog(const std::string &mod_name,
const std::string &sig_name);
// Apply the selected type to the targeted signal, record a
// `set-signal-type` line (deduping consecutive edits of the same signal),
// and close the popup.
void ApplySignalTypeChoice();
// Filtered part list rebuild (used by connect & set-type screens)
void RefreshFilteredPartList(const std::vector<std::string> &modules,
int m_idx,
@@ -164,6 +180,7 @@ private:
ftxui::Component BuildSettypeScreen();
ftxui::Component BuildExploreScreen();
ftxui::Component BuildNetScreen();
ftxui::Component BuildSignalTypeModal();
};
#endif // _TUI_HPP_