From 096eba747d0fa258b7ca1f54ee7da85f01fe0d65 Mon Sep 17 00:00:00 2001 From: nickviljoen Date: Thu, 14 May 2026 23:28:52 +0200 Subject: [PATCH] fix(tech-check): also render Technical section in generate_html_content Phase 3 patched generate_comprehensive_html_report() but missed the older generate_html_content() generator. The /api/start_analysis flow with output_mode='html' (the path the web UI's download button actually triggers) routes through generate_html_content, so the Technical Details section never appeared in user-downloaded reports despite the technical_report data being present in the underlying result_data. Mirrors the Phase 3 treatment exactly: pre-builds technical_html via _render_technical_section_html(), adds the .technical / .technical-grid / .tech-row CSS rules, and injects {technical_html} between the summary block and the Detailed Analysis Results header. generate_comprehensive_html_report() retains the same logic for the /api/process_file path (line 4187) and the new Box webhook flow (_run_box_triggered_analysis on the Phase 4 branch). Co-Authored-By: Claude Opus 4.7 (1M context) --- backend/api_server.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/api_server.py b/backend/api_server.py index 5850057..e170b3d 100755 --- a/backend/api_server.py +++ b/backend/api_server.py @@ -1113,7 +1113,9 @@ def generate_html_content(report_data, filename, file_path=None): score_total = 120 else: score_total = 100 - + + technical_html = _render_technical_section_html(report_data.get('technical_report', {})) + html_content = f""" @@ -1138,6 +1140,9 @@ def generate_html_content(report_data, filename, file_path=None): .summary {{ background: linear-gradient(135deg, #FFF9E6 0%, #FFFBF0 100%); padding: 25px; border-radius: 15px; margin: 30px 0; border-left: 5px solid #FFC407; }} .summary-grid {{ display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 15px; }} .summary-item {{ background: white; padding: 15px; border-radius: 10px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }} + .technical {{ background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%); padding: 25px; border-radius: 15px; margin: 30px 0; border-left: 5px solid #1565c0; }} + .technical-grid {{ display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 24px; margin-top: 12px; }} + .tech-row {{ padding: 4px 0; color: #495057; font-size: 0.95em; word-break: break-word; }} .score-display {{ font-size: 2.5em; font-weight: bold; color: {overall_color}; margin-bottom: 5px; }} .grade {{ font-size: 1.3em; font-weight: bold; color: #495057; }} .expandable-section {{ margin-bottom: 15px; border: 2px solid #e9ecef; border-radius: 12px; overflow: hidden; background: white; }} @@ -1201,7 +1206,9 @@ def generate_html_content(report_data, filename, file_path=None): - + + {technical_html} +

🔍 Detailed Analysis Results

Click on any section below to expand and view detailed analysis