Skip to content

Fix rendering issues in mermaid diagrams in Agentic Wiki Writer#260

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-mermaid-diagram-rendering
Draft

Fix rendering issues in mermaid diagrams in Agentic Wiki Writer#260
Copilot wants to merge 2 commits intomainfrom
copilot/fix-mermaid-diagram-rendering

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

Fixes mermaid diagram rendering errors in the Agentic Wiki Writer. The root cause was that the agent was generating mermaid node labels using backtick/markdown-string notation (e.g. A["`text`"]) and \n escape sequences — both of which are unsupported by GitHub's mermaid renderer and cause "Unable to render rich display" lexer errors.

Changes Made

  • Critical mermaid restrictions: Added an explicit restrictions block under the mermaid syntax rules in workflows/agentic-wiki-writer.md, prohibiting:

    • Backtick/markdown-string notation inside node labels
    • \n escape sequences inside node labels
    • Unquoted special characters in labels
    • Includes clear valid/invalid examples for each restriction
  • Self-Review Checklist: Added item Add Supply Chain Security Specialist agent for vulnerability analysis and reporting #6 instructing the agent to validate every mermaid diagram for these syntax issues before finalizing each wiki page, with specific checks and remediation guidance.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@mrjf
Copy link
Contributor

mrjf commented Mar 12, 2026

@copilot I resolve the billing error. Please resume work on this PR.

…abels

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 12, 2026

@copilot I resolve the billing error. Please resume work on this PR.

Resumed work and implemented the fix in commit 197ea19.

The root cause was that the wiki writer was generating mermaid diagrams using backtick/markdown-string notation (A["`text`"]) and \n escape sequences inside node labels — both of which cause "Unable to render rich display" lexer errors in GitHub's mermaid renderer.

Changes made to workflows/agentic-wiki-writer.md:

  1. Added a "Critical mermaid restrictions" section under the existing mermaid syntax rules, explicitly prohibiting backtick strings and \n in labels with clear examples
  2. Added item Add Supply Chain Security Specialist agent for vulnerability analysis and reporting #6 to the Self-Review Checklist so the agent validates every mermaid diagram for these issues before finalizing each wiki page

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/githubnext/agentics/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --all --json id,name,path,state (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix rendering issues in mermaid diagrams in Agentic Wiki Writer Fix rendering issues in mermaid diagrams in Agentic Wiki Writer Mar 12, 2026
Copilot finished work on behalf of mrjf March 12, 2026 19:33
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