Skip to content

feat: embed report JSON in HTML and update footer verify link + QR code #35

Description

@gkanitz

What to build

Make the HTML report self-describing and verifiable by embedding the full report JSON inside it, and update the footer to give readers a single click path to verify the report.

Three concrete changes:

1. Embed JSON in the HTML
Add a `reportJSON` template function to the render package that marshals the `report.Report` as JSON and injects it into `layout.tmpl` as:
```html

<script type="application/json" id="coderepute-report">{"schema_version":...}</script>

```
This replaces `report.json` as the machine-readable data carrier. The separate `report.json` file is no longer generated.

2. Add XMP meta tags to ``
```html


```
Headless Chromium preserves these in the PDF's XMP metadata, which the verify page reads for PDF uploads.

3. Update the footer

  • Replace the existing hardcoded repo URL QR code with one generated from `.Verification.VerifyURL` (falls back to the base verify page URL when unverified)
  • Add a text link: `Verify this report` alongside the QR code
  • The footer should clearly communicate: "To verify this report, visit the link or scan the QR code and upload this file"

Acceptance criteria

  • `report.html` contains `<script type="application/json" id="coderepute-report">` with the full report JSON
  • `report.json` is no longer written to disk by the CLI
  • `` and `` are present in ``
  • Footer QR code points to `VerifyURL` (not the hardcoded GitHub repo URL)
  • Footer contains a human-readable "Verify this report" link
  • Golden file test updated; `go test ./...` passes

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentTriage complete; ready for an agent to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions