Replace HTMX-driven DOM injection in sim reports with static templated pages#108
Open
AlexJones0 wants to merge 6 commits intolowRISC:masterfrom
Open
Replace HTMX-driven DOM injection in sim reports with static templated pages#108AlexJones0 wants to merge 6 commits intolowRISC:masterfrom
AlexJones0 wants to merge 6 commits intolowRISC:masterfrom
Conversation
bcd3be1 to
29b1008
Compare
29b1008 to
d234b20
Compare
machshev
reviewed
Mar 5, 2026
machshev
reviewed
Mar 5, 2026
machshev
reviewed
Mar 5, 2026
machshev
reviewed
Mar 5, 2026
machshev
reviewed
Mar 5, 2026
machshev
reviewed
Mar 5, 2026
This commit makes a few changes that are quite coupled, targeted at fixing the broken CSS for generated block reports when just running a block-level regression (i.e. no primary config). These changes are: - Always generate a "summary" report, regardless of if using a primary config or not. - Generating a summary report will still attach the static CSS/JS and HTMX wrapper, so these are now picked up by all runs. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Note: the static HTMX JS dependency is retained since it still might be
useful later.
The current HTML report generation flow generated an index file which
used HTMX to fetch the summary report. This had a couple of issues:
- Doesn't work if there is no summary report (i.e. we are just
generating results for a single block), meaning that block report
will have no CSS.
- Means that each individual page is not individually navigable, which
causes problems if:
- You want to load the page locally rather than being served it.
- You refresh, at which point data is no longer retrieved via HTMX
and so the DOCTYPE, HTML head, navbar and static CSS/JS are
missing.
Since we are just generating a static site and are not serving it
anywhere, HTMX doesn't make as much sense for this use case and the
issue can be resolved by templating. Now:
- The wrapper is used for templating to attach the static content to
each individual HTML page fragment.
- "summary.html" is now just renamed to "index.html" so that it matches
the existing "index.json", and is automatically picked up when served
via a HTTP server.
- This summary is recreated on every run to keep report generation
idempotent, so that a block-level sim in one run is not disrupted by
results from a previous top-level sim.
- As part of the change, the summary buttons now occupy the entire
table cell to make linking cleaner and more intuitive to use.
Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
All other HTML report templates use spaces, but this one uses tabs. Convert it to use spaces for consistency. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Currently this top-left navbar brand element redirected nowhere, but it should probably redirect to the root of the site to be consistent with how other sites handle this element. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
This is no longer used and instead coverage results are reconstructed into HTML tables by the new report logic from the dict. To avoid cluttering the code even more, just remove this attribute. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
The build seed was surfaced in the original DVSim CLI reports, and so should probably be surfaced in the HTML reports as well. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
d234b20 to
a82439c
Compare
Contributor
Author
|
Latest force push is a rebase on
Note: I think based on a couple of changes in this PR, it might be useful to decouple the revision info (commit, branch, URL) from the blocks/top scopes and just have it as a separate bundle of metadata in the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is the second of a series of 4 PRs which aim to fix issues in HTML report generation and add back Markdown CLI reports to DVSim.
This PR features a larger overall change to the HTML sim report generation which aims to make the following changes:
It is recommended to review commit-by-commit, checking the commit messages for more info.