Skip to content

Split widget exports from GraphViz draw renderer#45

Merged
dereuromark merged 2 commits into
masterfrom
pr/widget-client-export-graphviz-draw
May 28, 2026
Merged

Split widget exports from GraphViz draw renderer#45
dereuromark merged 2 commits into
masterfrom
pr/widget-client-export-graphviz-draw

Conversation

@dereuromark

Copy link
Copy Markdown
Owner

Summary

  • keep app widget exports fully client-side for svg, png, and Mermaid source
  • add non-admin/admin /workflow/workflows/draw/{workflow} server-side exports for svg, png, and mmd
  • render server-side svg/png via GraphViz dot, documented as an opt-in dependency

Details

The widget export path and the canonical draw endpoint had become mixed together.
This splits them cleanly:

  • WorkflowHelper::widget() now exports:
    • svg from the original rendered Mermaid SVG
    • png from a sanitized browser-side rasterization path
    • mmd from the Mermaid source used by the widget
  • /workflow/workflows/draw/{workflow} now serves:
    • mmd from MermaidRenderer
    • svg / png from a new GraphvizRenderer

This keeps the embedded app UX simple while still providing a stable backend export endpoint.

Docs

  • README now explains the widget-vs-draw split
  • view-helper docs now document svg / png / mmd widget exports
  • GraphViz is documented as required only for server-side draw image exports

Verification

Verified locally against a real app page and live endpoint:

  • widget Export SVG restored to the original rendered Mermaid SVG
  • widget Export PNG now produces a non-empty image with crisp current/initial/final labels
  • /workflow/workflows/draw/prototype_domain_onboarding?format=svg... returns real SVG
  • /workflow/workflows/draw/prototype_domain_onboarding?format=png... returns real PNG via GraphViz

I also checked the workflow graph on:

  • https://applicationbrain-cake.ddev.site:33001/onboardings?domain=owamat-separator&id=2

@dereuromark dereuromark force-pushed the pr/widget-client-export-graphviz-draw branch 3 times, most recently from 57fcae1 to d531752 Compare May 28, 2026 04:58
@codecov-commenter

codecov-commenter commented May 28, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 22.58065% with 144 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.12%. Comparing base (6da95e5) to head (62d8be7).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/Renderer/GraphvizRenderer.php 0.00% 132 Missing ⚠️
src/Controller/ExportTrait.php 63.33% 11 Missing ⚠️
src/View/Helper/WorkflowHelper.php 93.75% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #45      +/-   ##
============================================
- Coverage     76.17%   74.12%   -2.05%     
- Complexity     1362     1421      +59     
============================================
  Files            64       67       +3     
  Lines          4844     5013     +169     
============================================
+ Hits           3690     3716      +26     
- Misses         1154     1297     +143     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dereuromark dereuromark force-pushed the pr/widget-client-export-graphviz-draw branch from d531752 to 62d8be7 Compare May 28, 2026 05:03
@dereuromark dereuromark merged commit 2c523d4 into master May 28, 2026
8 checks passed
@dereuromark dereuromark deleted the pr/widget-client-export-graphviz-draw branch May 28, 2026 05:03
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.

2 participants