Skip to content

fix: Parse error in Collections page diagram rendering #1230

@PratikWayase

Description

@PratikWayase

Component

Documentation

Bug Description

A parse error is displayed on the Collections page instead of rendering the diagram correctly.

Details

When navigating to the HVE Core Collections section, the UI shows a raw parser error message. This appears to be caused by malformed diagram syntax (likely Mermaid) or improper handling of special characters in node labels (e.g., coding-standards).

Actual Result

A parse error is shown:

Parse error on line 4:
... CS["coding-standards
----------------------^
Expecting 'SEMI', 'NEWLINE', 'EOF', ...

Expected Result

The diagram should render correctly without exposing parser errors to the user.

Impact

  • Breaks UI experience in Collections page

Possible Cause

  • Invalid or unescaped characters in diagram definition
  • Mermaid syntax issue in documentation content
  • Missing validation before rendering diagrams

Suggested Fix

  • Validate diagram syntax before rendering
  • Escape special characters properly
  • Add fallback UI instead of displaying raw parser errors

Environment

  • Localhost:3000
  • HVE Core UI (Collections page)
Image

Expected Behavior

Diagrams should render correctly without exposing parser errors. In case of invalid syntax, a user-friendly fallback should be shown instead of raw error messages.

Steps to Reproduce

  1. Navigate to the project root:

    cd docs/docusaurus
  2. Start the Docusaurus server:

    npm run start
  3. Open the application in browser:
    http://localhost:3000/hve-core/

  4. Navigate to the Collections section

  5. Observe the parse error displayed in the UI

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds-triageRequires triage and prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions