Add dynamic view synthesis, new diagram tokens, and self-tests#25
Merged
Conversation
- DiagramTypeRouter: add asGeneralDiagram/asStateTransitionDiagram/ asActionFlowDiagram/asSequenceDiagram/asGridDiagram tokens, dispatching to their respective ILayoutStrategy implementations. - New DynamicViewSynthesizer (internal): resolves a view-type + target qualified name into a synthesized SysmlViewNode without requiring a view def in the model, with per-kind structural compatibility pre-checks and clear diagnostics on failure. - DiagramRenderer: add public SynthesizeDynamicView delegating to the new synthesizer, matching SynthesizeAutoView's doc style. - Unit tests: 6 new DiagramTypeRouterTests cases, and a new DynamicViewSynthesizerTests covering happy paths per kind, unresolved/ wrong-kind/stdlib target rejection, per-kind compatibility failures, filter pass-through, and name-collision diagnostics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- RenderCommandOptions: add ViewType/ViewTarget/FilterExpression. - RenderArgumentParser: parse --view-type/--view-target/--filter, with raw capture; update class doc comment. - RenderCommand: validate exactly one of --view/--auto/ (--view-type + --view-target) is used; --filter only valid alongside --view-type/--view-target; call DiagramRenderer.SynthesizeDynamicView, reporting a diagnostic on failure, or injecting the synthesized view via workspace.AddDeclaration and rendering via the unchanged RenderWorkspace path on success; update PrintHelp. - RenderStrings.resx/.cs: add Render_OptionViewType/Render_OptionViewTarget/ Render_OptionFilter help strings following the existing convention. - RenderSubsystemTests: 11 new tests covering dynamic-view rendering (general + interconnection kinds), incompatible-target and unresolved-target diagnostics, filter-narrowing proof, all 3 mutual- exclusion/require-together error paths, and updated help text. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add SysML2Tools_RenderDynamicViewSvgSelfTest,
SysML2Tools_RenderDynamicViewPngSelfTest, and
SysML2Tools_RenderDynamicViewFilteredSelfTest to Validation.cs, wired
into the sequential RunAsync call list, mirroring the existing
SysML2Tools_{Capability}SelfTest naming/structure/assertion
conventions. The filtered self-test asserts the filtered output
genuinely differs/narrows vs the unfiltered equivalent. Update
ValidationTests.cs to cover all 3 new self-tests.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- New requirements/design/verification triple for DynamicViewSynthesizer. - Updated triples for diagram-type-router, diagram-renderer, render, self-test/validation to cover the new tokens, SynthesizeDynamicView, CLI flags, and self-tests. - requirements.yaml: include the new dynamic-view-synthesizer reqstream file. - .reviewmark.yaml: new review-set for DynamicViewSynthesizer mirroring DiagramTypeRouter's entry shape. - README.md and docs/user_guide/introduction.md: new dynamic-view usage examples, options table, and a per-kind compatibility table. - ROADMAP.md: move "Dynamic (ad-hoc) views" from planned to done, explicitly carrying forward the sequence-view compatibility-check gap (cheap lifeline pre-check only, no message-edge-walk validation) as a documented known limitation under "View dynamics refinements". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ions The DynamicViewSynthesizer 'state' compatibility pre-check only checked for nested SysmlTransitionNodes, rejecting targets that satisfy StateTransitionViewLayoutStrategy.CollectStates via declared state-keyword feature children alone. OR the transition check with a state-feature check, mirroring the adjacent 'action' case's pattern. Corrected the design doc, user guide compatibility table, and reqstream requirement description to describe the real two-clause rule, and added a regression test for the missed case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jul 13, 2026
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.
This pull request implements and documents the new "dynamic (ad-hoc) views" feature, which allows rendering any supported view type of any resolvable model element directly from the command line, without requiring a pre-declared
viewin the SysML source. The work includes CLI, design, requirements, and verification documentation, as well as updates to the rendering core to support and describe the newDynamicViewSynthesizerunit. It also clarifies the routing logic for view kinds and documents known limitations and compatibility checks.Dynamic (ad-hoc) view feature:
--view-type,--view-target, and optional--filter), implemented by the newDynamicViewSynthesizerunit in the Core Rendering Internal subsystem. [1] [2] [3] [4] [5] [6]README.md, design docs) to describe usage, options, and compatibility rules for dynamic views, including table updates and extended usage examples. [1] [2] [3]Rendering pipeline and strategy routing:
DiagramTypeRouterto recognize and explicitly route all supported view kind tokens (asGeneralDiagram,asStateTransitionDiagram,asActionFlowDiagram,asSequenceDiagram,asGridDiagram) in addition to the existing ones, ensuring dynamic and declared views are dispatched consistently. [1] [2] [3]DynamicViewSynthesizersets the correctRenderTargetNameso that the existing strategy routing logic applies without special casing. [1] [2]Known limitations and roadmap updates:
Review and verification:
These changes collectively enable flexible, on-demand diagram rendering for any model element, improve documentation and testability, and clarify the rendering pipeline's behavior for both static and dynamic views.