feat(frontend): warn on blurry or dark receipt photos #119

Open
opened 2026-07-08 08:42:09 +01:00 by TimCane · 0 comments
TimCane commented 2026-07-08 08:42:09 +01:00 (Migrated from github.com)

Context

Companion to #118; independently shippable. Blur and low light are capture failures no post-hoc correction recovers - the only fix is a retake, and the preview screen is the retake decision point.

Scope

  • Blur (Laplacian variance) + darkness (mean luminance) computed once on pick, on a ~400px canvas
  • One advisory line on the preview screen, never blocking (thermal receipts legitimately score low): This photo looks blurry - a retake may read better.
  • Landing tip under the Scan button, the last moment it can influence the shot: Flatten the receipt and fill the frame.
  • Copy per docs/09 rules: sentence case, dry, no exclamation marks
  • No telemetry, no server changes

Docs (same PR)

  • docs/09-ux-flows.md §1: advisory line + tip copy in the wireframe
  • docs/08-frontend-design.md #uploads: quality-check note

Acceptance

  • Advisory shows for a blurry/dark photo, absent for a sharp one; upload never blocked
  • Scoring runs on pixel arrays (pure functions) with vitest coverage; thresholds tuned against a handful of real receipt photos
  • Landing tip present per wireframe

Rejected

  • Live re-scoring on crop change: canvas work during drag, flickering advisory
  • Blocking/confirm gate on upload: advice, not a nag
  • Anonymous failure counters: new backend surface for a metric nobody dashboards
## Context Companion to #118; independently shippable. Blur and low light are capture failures no post-hoc correction recovers - the only fix is a retake, and the preview screen is the retake decision point. ## Scope - Blur (Laplacian variance) + darkness (mean luminance) computed once on pick, on a ~400px canvas - One advisory line on the preview screen, never blocking (thermal receipts legitimately score low): `This photo looks blurry - a retake may read better.` - Landing tip under the Scan button, the last moment it can influence the shot: `Flatten the receipt and fill the frame.` - Copy per docs/09 rules: sentence case, dry, no exclamation marks - No telemetry, no server changes ## Docs (same PR) - `docs/09-ux-flows.md` §1: advisory line + tip copy in the wireframe - `docs/08-frontend-design.md` #uploads: quality-check note ## Acceptance - [ ] Advisory shows for a blurry/dark photo, absent for a sharp one; upload never blocked - [ ] Scoring runs on pixel arrays (pure functions) with vitest coverage; thresholds tuned against a handful of real receipt photos - [ ] Landing tip present per wireframe ## Rejected - Live re-scoring on crop change: canvas work during drag, flickering advisory - Blocking/confirm gate on upload: advice, not a nag - Anonymous failure counters: new backend surface for a metric nobody dashboards
Sign in to join this conversation.
No description provided.