From ac644b614053d6a4a2f94233a18d406404bc6e2f Mon Sep 17 00:00:00 2001 From: theMackabu Date: Sat, 25 Apr 2026 18:17:30 -0700 Subject: [PATCH] add privacy policy page for js.report --- docs/reports/public/assets/report.css | 4 ++ docs/reports/src/routes.ts | 3 +- docs/reports/src/view.tsx | 56 ++++++++++++++++++++++++++- 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/docs/reports/public/assets/report.css b/docs/reports/public/assets/report.css index ca5d523..6eb9c16 100644 --- a/docs/reports/public/assets/report.css +++ b/docs/reports/public/assets/report.css @@ -73,6 +73,10 @@ code { margin: 0; } +.policy p { + overflow: visible; +} + .label { color: #777; } diff --git a/docs/reports/src/routes.ts b/docs/reports/src/routes.ts index 0670601..de5ac14 100644 --- a/docs/reports/src/routes.ts +++ b/docs/reports/src/routes.ts @@ -3,7 +3,7 @@ import { renderOgPng } from './og'; import type { Bindings } from './env'; import { drizzle } from 'drizzle-orm/d1'; import { CrashReportSchema } from './schema'; -import { renderBlank, renderReport } from './view'; +import { renderBlank, renderPrivacy, renderReport } from './view'; import { createReport, getRawReport, getReport } from './reports'; import { @@ -17,6 +17,7 @@ import { const app = new Hono<{ Bindings: Bindings }>(); app.get('/', c => c.html(renderBlank(), 404)); +app.get('/privacy', c => c.html(renderPrivacy())); app.get('/og/:image', async c => { const db = drizzle(c.env.DB); diff --git a/docs/reports/src/view.tsx b/docs/reports/src/view.tsx index 1449993..450b184 100644 --- a/docs/reports/src/view.tsx +++ b/docs/reports/src/view.tsx @@ -62,6 +62,8 @@ const ReportFooter = () => ( Ant · Report this on GitHub + · + Privacy

); @@ -81,6 +83,54 @@ const BlankPage = () => (

If you were given a report link, check the URL and try again.

+ +); + +const PrivacyPage = () => ( + + +

+ Privacy. Crash report storage policy. +

+
+

js.report does not store IP addresses in its database.

+

+ The database stores the crash report JSON submitted by Ant, plus server metadata needed to + render, deduplicate, and expire reports. +

+

+ Submitted report fields: +
+ schema, runtime, version, target,{' '} + os, arch, kind, code,{' '} + reason, addr, elapsedMs, peakRss,{' '} + frames +

+

+ Stored server fields: +
+ id, trace, firstSeenAt, lastSeenAt,{' '} + hitCount, expiresAt, and per-frame hashes used for deduplication. +

+

+ Crash report links are public to anyone with the URL. Raw JSON is available by adding{' '} + .json to a report URL. +

+
+
); @@ -98,7 +148,7 @@ const ReportPage = ({ return ( ${()}`; } +export function renderPrivacy(): string { + return `${()}`; +} + export function renderReport(report: CrashReport, url: string, imageUrl: string): string { return `${()}`; } -- 2.51.2