Reorganise the tree into business vs frontend as separate directories:
src/core/{domain,imports,app} (was system/, imports/, app/)
src/frontends/tui/ (was tui/ + main.cpp)
tests/tui/ (the FTXUI-coupled helper test)
All cross-dir #include paths rewritten; same-dir includes untouched.
CMake: essim_core is the frontend-agnostic business library — links libzip,
pugixml and bsdl, NO GUI toolkit. Each frontend is a self-contained
src/frontends/<name>/ (own CMakeLists, toolkit, main.cpp) that links
essim_core, selected with -DESSIM_FRONTEND=<name> (default tui; 'none' = core +
tests only, no toolkit fetched). FTXUI moved into the tui frontend. Tests are
split: essim_tests links essim_core (no FTXUI), essim_tui_tests links essim_tui.
Verified: default tui build green (ctest 2/2); ESSIM_FRONTEND=none builds the
core + tests with FTXUI never fetched and no `essim` binary.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Command renamed from `set-type` to `set-connector-type` for
clarity (the previous name was ambiguous — "type" of what?). No
legacy alias kept; old scripts that still used `set-type` must be
migrated. `test/system.essim` and all user/design docs updated.
- Help panel (RenderHelpPanel) now wraps in borderRounded with a
centred bold title, so it is visually distinct from the main
content on every screen. Width bumped from 30 to 32 to include
the border.
- Analyze screen's Types tab gains a sibling "type glossary" panel
(also borderRounded, only visible when the Types tab is focused)
that explains Power / Suspect Power / Hard floor / Gnd in plain
language using `paragraph()` for clean word-wrap.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Domain
- Signal carries a SignalType (Power/GndShield/Other), auto-inferred
from the name in Signal::Signal via infer_signal_type. Override with
the new `set-signal-type` command.
- SignalType extracted to its own header so Pin can store an
`expected_signal_type` without a pins↔signals include cycle.
- pin_role(connector_type, pin_name) → SignalType lookup, called from
set-type to populate each Pin's expected_signal_type. The VPX 3U
table is currently a stub (returns Other).
- New `verify` command walks typed parts and reports pins whose
connected signal's type doesn't match the expectation.
- ODS importer no longer drops pins with empty signal column — they
stay in the part as NC, matching the rule "a pin is either NC or
connected to a signal".
- persist: new S tag for non-default signal type overrides.
Tests
- doctest v2.4.11 via FetchContent (with CMAKE_POLICY_VERSION_MINIMUM
shim, doctest's CMakeLists has a too-old floor for current CMake).
- Source files moved into a static library `essim_lib` so both `essim`
and `essim_tests` reuse the same compilation. main.cpp is the only
file kept out of the lib.
- Layer 1 (pure helpers): ToLower, LongestCommonPrefix, Tokenize,
NaturalLess (numeric/case/leading-zero edge cases + total-order
invariants), signal_type round-trips and infer_signal_type families,
VpxTransform registry + symmetry + reference-table mapping for
connector P0 row 1, IdentityTransform same-name wiring.
- Layer 2 (round-trip): build a synthetic 2-module system in code,
save → restore → assert modules / parts / connector_types / NC pins
/ signal type overrides / connections + pin_map are all preserved.
- Tui::Tokenize moved to a free function in tui_helpers so tests can
call it without dragging ftxui into the unit-test layer.
- 27 test cases, 123 assertions, ~150 ms.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>