refactor: ComponentEngineBase, unified S-param API, enforced registry/drawer consistency - #63
Merged
Merged
Conversation
…/drawer consistency M6: add ComponentEngineBase (common/component_engine_base.h) owning the id/graph-node/SignalNode/dirty-flag/cached-input boilerplate every engine repeated; migrate amplifier, equalizer, mixer, splitter, adc, signal_generator, attenuator, combiner, coax. (pfb_channelizer + ideal_filter migrated in the DSP-accuracy branch where their fixes landed.) M5: attenuator/combiner S-param API renamed to the canonical setSParamFilepath/sparamFilepath/sparamLoaded/sparamData (was setSParamFile/sParamFile/m_sparam); serialization key unified to sparam_filepath with a sparam_path fallback on deserialize so old project files still load. M7: registerDrawers' 11-branch if/else chain replaced with a drawer map built once; a registry row with no drawer now LOG_ERRORs instead of silently rendering an empty panel, and InspectorPanel::hasDrawer() powers a new consistency test (every registry type has a drawer, maps to a real NodeKind, and supports_sparam_file matches the 5 engines that actually implement S-param). Fix the supports_sparam_file drift (equalizer/filter/attenuator/combiner were false). Also carries the coax preset-index clamp (moved with the coax file to keep it whole).
…ep rename + both fs_Hz test sets)
… must use the local staged fixture (S1 containment neutralizes absolute out-of-project paths on load)
striderZA
added a commit
that referenced
this pull request
Aug 10, 2026
fix: restore the 4 fs_Hz regression tests dropped in the #63 merge resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Engine/registry unification from a comprehensive codebase review (findings M5, M6, M7).
ComponentEngineBase(common/component_engine_base.h). Owns the id/graph-node/SignalNode/dirty-flag/cached-input boilerplate every engine repeated verbatim (members in mixer/adc/splitter headers, the dirty-check prologue in 15update()s, thegraph.addNodector). Migrated: amplifier, equalizer, mixer, splitter, adc, signal_generator, attenuator, combiner, coax.pfb_channelizer+ideal_filtermigrated infix/dsp-accuracy(their fixes landed there).spectrum_analyzer/iq_plot/touchstoneare not IComponentEngine-style engines — left out deliberately.setSParamFile/sParamFile/m_sparamto the canonicalsetSParamFilepath/sparamFilepath/sparamLoaded/sparamData/m_sparam_data(amplifier/equalizer/ideal_filter convention). Serialization key unified tosparam_filepathwith asparam_pathfallback on deserialize, so old project files still load.registerDrawers' 11-branch if/else chain replaced with a drawer map built once; a registry row with no drawer nowLOG_ERRORs instead of silently rendering an empty panel.InspectorPanel::hasDrawer()powers a new consistency test: every registry type has a drawer, maps to a realNodeKind, andsupports_sparam_filematches the 5 engines that actually implement S-param. Fixed thesupports_sparam_filedrift (equalizer/filter/attenuator/combiner werefalse).Verification
tests.exe217 cases / 65538 assertions (216 + coax clamp test);test_signal_domain32 cases / 66 assertions (+ the S-param-mode fs_Hz test, which is coupled to this branch's API rename);test_component_dispatch6 cases / 129 assertions (new consistency test);test_ui27/27.sparam_pathfor pre-existing.rfsimfiles.Notes for merging (verified by test-merging all 6 branches in order)
This branch's cross-cutting API rename collides with two branches that edit the same regions against the old names. Both conflicts are purely additive:
ci/run-tests-on-pr—tests/test_project_file.cpp(the 4 S-param lines in the Fix S-param mode not reloading on project deserialize #56 test) andtests/test_signal_domain.cpp(test-block insertion overlap). Resolution: keep this branch'ssetSParamFilepath(s2p)/sparamMode()(the old names no longer compile once this branch lands) and keep both test sets (ci's 4 pass-through fs_Hz tests + this branch's S-param-mode fs_Hz test).fix/ui-state—app/src/inspector_panel.cpp, two blocks (attenuator + combiner drawers):engine.setSParamFile(path_buf); m_param_edited = true;vsengine.setSParamFilepath(path_buf);. Resolution: keep both —engine.setSParamFilepath(path_buf); m_param_edited = true;.Recommended merge order (verified green):
fix/crash-and-containment→ci/run-tests-on-pr→ this branch (resolve the two conflicts above) →fix/dsp-accuracy→fix/ui-state(clean) →refactor/cleanup(clean).common/component_engine_base.his identical infix/dsp-accuracy(same blob, no conflict).