Adds a "Als PDF exportieren" button to the scan report page next to the
existing JSON export, fulfilling Task #3.
Implementation:
- artifacts/skillguard/src/pages/scan-report.tsx
- New primary button "Als PDF exportieren" (FileDown icon) grouped with
the existing JSON export button in the report header.
- handleExportPdf opens a new window, writes a self-contained print-
friendly HTML document, and triggers window.print() (browser
"Als PDF speichern"). No new dependencies added.
- buildReportHtml(data) generates the document containing: title +
verdict, metadata (date, source, file count, KI flag), optional AI
warning, Risiko-Score with summary text, Achsen-Zusammenfassung table
(severity + axis counts incl. total), all findings (severity/axis/
rule/detection, location, description, snippet, remediation), and the
checked files table.
- All labels are German via VERDICT/SEVERITY/AXIS/SOURCE/KIND label maps;
no emojis used; print-friendly inline CSS with page-break-inside avoid
on findings.
- User-provided content is escaped via escapeHtml to prevent HTML
injection in the generated document.
Verification:
- pnpm --filter @workspace/skillguard typecheck passes.
- Created test scan (id 8) via API, confirmed button renders and German
label mapping is correct for verdict/severity/axis.
Deviations: none. Chose the browser print-to-PDF approach (zero new deps)
over a client-side PDF library, which keeps the bundle lean and produces
selectable, print-friendly output.
Replit-Task-Id: e3f37193-89fd-42de-8cec-9383c8406b25