feat(report): opt-in tool error reporting (MVP / Sub-project A) - #401
Merged
Merged
Conversation
Promote to production: pdf-redact zoom control
Cross-cutting problem reporter on every tool page: consent-gated report with comprehensive diagnostics + logs (closes 'works on my machine'), optional failing-file attachment, Worker /api/report → private R2 with Turnstile + size/rate caps, token-gated admin viewer, warm thank-you. Staged rollout (MVP first, admin/webhook/retention follow).
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
goodwebtools | 9364f84 | Sep 27 2026, 12:58 AM |
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.
What
An opt-in, consent-gated "Report a problem" reporter on every tool page. When a tool fails, a willing user can send a rich diagnostics + logs payload (and optionally the failing file) so we can reproduce and fix — closing the "works on my machine" gap.
fileMeta(magic-byte sniff → claimed-vs-actual format + decode),breadcrumbs(ring buffer + global capture),diagnostics(env fingerprint + capabilities + logs),reporterbus,submit.ReportDialogisland (consent, "see exactly what will be sent", separate pre-unchecked file attach with a sensitivity warning, invisible Turnstile, warm thank-you) +ReportButton, wired intoToolHoston every tool page; "Report this crash" on the error boundary.POST /api/report→ private R2 bucket, gated by Turnstile + a 10 MB cap; hardened (server-generated R2 key, form-field type guards, body-size precheck, no byte logging).useReportablehook for one-line tool wiring.Privacy
Nothing is sent without an explicit Submit and a ticked consent box. The file is a separate, pre-unchecked, warned opt-in. Diagnostics exclude the filename and file bytes. Reports land in a private R2 bucket.
⛔ Deploy gate — do NOT merge until these are done
Merging to
developdeploys straight to production. First:wrangler r2 bucket create goodwebtools-reportsandgoodwebtools-reports-stagingwrangler secret put TURNSTILE_SECRET(and--env staging)PUBLIC_TURNSTILE_SITE_KEYto the matching real Turnstile site keyUntil (1) the bucket exists
/api/report500s on submit; until (2) the secret is set the endpoint accepts unverified submissions (default is Cloudflare's always-pass test key).Scope
This is Sub-project A (MVP). Deferred to Sub-project B: admin viewer (
/admin/reports+/api/admin/reports), per-IP rate limiting, webhook enrichment, R2 30-day retention lifecycle, wiring the remaining hot tools, Privacy-page copy. Spec + plan underdocs/superpowers/.Verify
npx vitest run2311 pass · lint 0 errors · build OK (441 pages) ·npm run test:e2e229 passed / 1 skipped (real-model agent) — includes the all-tools render smoke + report happy/failure specs.