Skip to content

Commit 9a4ae85

Browse files
authored
fix: HTML quality report renders empty due to data injection mismatch (#44)
The template was refactored to use `const RAW = JSON.parse(...)` with a normalize step, but the Python generate_html() still looked for `const DATA` — the replace never matched, so the JSON data tag was never injected into the HTML.
1 parent efe7931 commit 9a4ae85

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

skills/bmad-agent-builder/scripts/generate-html-report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def load_report_data(report_dir: Path) -> dict:
491491
def generate_html(report_data: dict) -> str:
492492
data_json = json.dumps(report_data, indent=None, ensure_ascii=False)
493493
data_tag = f'<script id="report-data" type="application/json">{data_json}</script>'
494-
html = HTML_TEMPLATE.replace('<script>\nconst DATA', f'{data_tag}\n<script>\nconst DATA')
494+
html = HTML_TEMPLATE.replace('<script>\nconst RAW', f'{data_tag}\n<script>\nconst RAW')
495495
html = html.replace('SKILL_NAME', report_data.get('meta', {}).get('skill_name', 'Unknown'))
496496
return html
497497

skills/bmad-workflow-builder/scripts/generate-html-report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ def generate_html(report_data: dict) -> str:
477477
"""Inject report data into the HTML template."""
478478
data_json = json.dumps(report_data, indent=None, ensure_ascii=False)
479479
data_tag = f'<script id="report-data" type="application/json">{data_json}</script>'
480-
html = HTML_TEMPLATE.replace('<script>\nconst DATA', f'{data_tag}\n<script>\nconst DATA')
480+
html = HTML_TEMPLATE.replace('<script>\nconst RAW', f'{data_tag}\n<script>\nconst RAW')
481481
html = html.replace('SKILL_NAME', report_data.get('meta', {}).get('skill_name', 'Unknown'))
482482
return html
483483

0 commit comments

Comments
 (0)