refactor: replace chromedp with browser native print for PDF export

Remove chromedp dependency, use window.print() instead. Docker image no longer needs Chromium (~200MB smaller).

- Delete services/pdf.go and templates/reports/review.html

- Remove PDF API route POST /api/repos/:id/review/pdf

- Add @media print CSS to review page

- Remove chromium from Dockerfile
This commit is contained in:
2026-06-20 22:26:46 +08:00
parent 37aa9c0a33
commit 6c60b767df
10 changed files with 88 additions and 510 deletions
+1 -2
View File
@@ -9,8 +9,7 @@ RUN CGO_ENABLED=1 go build -o pr-helper .
# Runtime stage
FROM alpine:3.20
RUN apk add --no-cache ca-certificates chromium
ENV CHROME_BIN=/usr/bin/chromium-browser
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=builder /app/pr-helper .
COPY --from=builder /app/templates ./templates