Files
loki/widget
12f2ea5a16 feat(feedback): image attach, loop metrics, public shipped strip, pricing + docs (#130)
PR C of the feedback-pipeline deep-dive plan. Migration 0044 (additive):
site_feedback.screenshot + featured_at.

- Widget image attach: file picker + paste in the panel, client-side
  downscale (≤1280px JPEG, quality stepped until it fits the 600k-char
  ingest cap), thumbnail + remove; still zero-dep, 5 KB gzip bundle.
  Ingest validates data-URL mime/size; bytes are EXCLUDED from inbox list
  queries and served only via authed GET /api/feedback/[id]/screenshot.
  Inbox rows show a lazy thumbnail that opens the full image.
- Loop metrics: getFeedbackLoopMetrics (counts + median report→fix via
  percentile_cont) on the project inbox header and the /control fleet strip.
- Public "shipped thanks to feedback" strip on the landing page: operator
  curation only (Star on resolved rows → featured_at; raw visitor text never
  auto-publishes), aggregate + up to 3 featured excerpts, renders nothing
  until real entries exist (never-fabricate doctrine).
- /pricing "Every plan includes" gains the feedback widget line (per the
  plans.ts doctrine: capability, not a fake tier gate).
- Docs: architecture schema mirror updated, /docs/feedback-widget covers
  attach + dedupe, PLATFORM_CHANGELOG entry for this wave.

tsc 0, eslint 0, design-check ok, 40/40 unit tests, widget builds.

Co-authored-by: test <test@test>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:07:36 +02:00
..