feat: refactor diagram rendering into default plugin, fix broken dev-mode asset resolution#82
Draft
Copilot wants to merge 3 commits intofeat/process-instance-diagramfrom
Draft
Conversation
…opagation Co-authored-by: vobu <6573426+vobu@users.noreply.github.com>
Co-authored-by: vobu <6573426+vobu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add feature to render BPMN diagrams as PNG images
feat: refactor diagram rendering into default plugin, fix broken dev-mode asset resolution
Feb 23, 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.
Diagram rendering was non-functional in dev mode (
node src/index.ts) becausesrc/commands/diagram.tsresolved bpmn-js assets relative tosrc/commands/, pointing atsrc/assets/bpmn-js/which only exists afternpm run build. This produced blank PNGs silently.The feature is refactored out of the core CLI into
default-plugins/diagram/, structured as a self-contained plugin ready to be extracted into a standalone npm package.Root cause fixes
dist/assets/bpmn-js) first, falls back to dev path (node_modules/bpmn-js/dist) — works in both modes without a build stepwindow.__diagramErroron failure; Node side checks it before taking a screenshot and throws with an actionable messageRefactoring
src/commands/diagram.tsdeleted; logic lives indefault-plugins/diagram/c8ctl-plugin.jsc8ctl get pi <key> --diagram [--output <path>]→c8ctl diagram <key> [--output <path>]src/plugin-loader.tsnow exposesglobalThis.c8ctl.createClient(profile)so plugins can create authenticated Camunda API clients without importing TypeScript internalspackage.json+README.mddocumenting standalone extraction stepsUpdated surfaces
--diagramflag removed,diagramadded as a verb🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.