Skip to content

Improve Mermaid flowchart layout and sizing#111

Merged
PrzemyslawKlys merged 4 commits into
mainfrom
codex/topology-inferred-layers-20260717
Jul 21, 2026
Merged

Improve Mermaid flowchart layout and sizing#111
PrzemyslawKlys merged 4 commits into
mainfrom
codex/topology-inferred-layers-20260717

Conversation

@PrzemyslawKlys

@PrzemyslawKlys PrzemyslawKlys commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Infers deterministic Mermaid flowchart layers from edge direction, including backward-only arrows, so topology reads in the direction the diagram expresses.
  • Fits default viewports and node widths to useful content, preserves complete labels through SVG and PNG rendering, and removes health badges when Mermaid carries no health semantics.
  • Keeps explicitly requested SVG, PNG, and HTML artifact dimensions unchanged by carrying a typed natural-size policy through generic artifact exports.
  • Preserves content-fitted Mermaid tile dimensions, literal apostrophes, and per-node label limits consistently across SVG and PNG rendering.
  • Normalizes quoted Mermaid labels and keeps explicit markup dimensions compatible.
  • Uses Directory.Build.props as the single package-version source instead of six repeated project versions.

Behavior note

Flowcharts without an explicit viewport now use content fitting by default. Callers that need the former fixed canvas can set FitContent to false. Explicit width or height continues to take precedence for direct and generic artifact output while label-aware node sizing remains enabled.

No package version is bumped and this PR does not publish or release ChartForgeX.

Validation

  • Repository quality loop passed on the current implementation: 743 tests, multi-target build, Mermaid.js fixtures, NativeAOT smoke, generated examples, and package creation.
  • The final review-driven artifact fix was revalidated with all 743 tests after adding differing-size, missing-size, and caller-model non-mutation coverage.
  • Independent read-only review found one P2 and one P3 in the artifact follow-up; both are fixed and the targeted confirmation accepted the implementation.
  • All five addressed inline review threads are resolved.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1557fb09b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ChartForgeX.Mermaid/MermaidFlowchartRendering.cs
Comment thread ChartForgeX/Topology/TopologyModels.cs
Comment thread ChartForgeX.Mermaid/MermaidFlowchartParser.cs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b45c29aded

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ChartForgeX.Mermaid/MermaidFlowchartRendering.cs
Comment thread ChartForgeX.Mermaid/MermaidFlowchartRendering.cs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e6117b313

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ChartForgeX/Topology/TopologyModels.cs
Comment thread ChartForgeX/Topology/TopologySvgRenderer.Nodes.cs
@PrzemyslawKlys
PrzemyslawKlys merged commit e45a0ac into main Jul 21, 2026
5 checks passed
@PrzemyslawKlys
PrzemyslawKlys deleted the codex/topology-inferred-layers-20260717 branch July 21, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant