-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Kartikayy007: Add syntax highlighting to code blocks in reports and fix and the Outdated section name #883
Conversation
/gcbrun exp -n ks -ag |
Ops it appears all trial pages are broken : ) |
@Kartikayy007 In case you missed this, but please take your time : ) |
Running exp again to collect bug info. |
/gcbrun exp -n ks -ag |
…dated section name (#881) This PR enhances the report UI by adding syntax highlighting to both fuzz target code and build script code. and the Outdated section name Reference: GitHub PR #867 Comment CC: @DonggeLiu Features Fuzz Target Code: Applies language-specific highlighting based on the benchmark YAML language field. Build Scripts: Uses Bash syntax highlighting for all build scripts, also added line numbers for build script code. Clean Display: Properly separates build script code from fixer prompts- Fixed Labeling: Corrects misleading "Fixer prompt" section that was previously showing build scripts. Implementation Details Added highlight.js library to base.html. Enhanced Benchmark class with a language field and extraction from YAML files. Updated Target class to separate build script code from fixer prompts. Modified templates to apply appropriate syntax highlighting and correct section labeling. added line numbers to build script code (used the same approach as for the fuzz target code) Bug Fixes Fixes issue where build scripts were incorrectly stored in the fixer_prompt field. Fixes misleading UI section headings by properly labelling build scripts as "Build Script".
/gcbrun exp -n ks -ag |
Yup I missed that let me take a look around it |
@DonggeLiu Looking at the I have some nits making the filter more robust to handle None values or Adding some is defined checks for variables like should I commit in this branch only or raise a new PR? |
# Fix Sample Page Rendering Issues ## Problem mentioned in #883 Sample pages were failing to render with these errors:  The template was using a filter called `splitlines` which wasn't registered in the Jinja2 environment. Additionally, the template also lacking robustness against undefined variables. ## Files Changed for #883 1. `report/web.py` - Added missing filter and improved error handling 2. `report/templates/sample.html` - Added robustness checks ## Changes Made 1. **Added missing filter:** - Implemented `_splitlines` method in `web.py` - Registered it with Jinja2 environment 2. **Improved template robustness:** - Added `is defined` checks for variables that might be missing - Added default values with `|default()` filter - Made `remove_trailing_empty_lines` filter handle edge cases better 3. **Enhanced error handling:** - Added detailed error logging with full traceback - Created fallback error pages when rendering fails - Provided better default values for missing data These improvements should resolve all the sample page rendering issues. --------- Co-authored-by: Dongge Liu <[email protected]>
/gcbrun exp -n ks -ag |
Sorry that I just had a chance to go back to this @Kartikayy007. |
Thanks! :) |
Hi @oliverchang: @Kartikayy007 kindly brought us the syntax highlighting we wanted for awhile, and added a code block to show the LLM-generated build script. |
Run experiment for #881 before merging, credit goes to @Kartikayy007.