Skip to content

Add stops: Sheet scan β€” pick many Eircodes from one photo - #9

Open
alisulmanpro wants to merge 1 commit into
mainfrom
eircode-sheet
Open

alisulmanpro wants to merge 1 commit into
mainfrom
eircode-sheet

Conversation

@alisulmanpro

Copy link
Copy Markdown
Owner

Why

A rider with a printed list (or a screen) of many Eircodes should not scan or type them one by one. Asked for: a button next to Voice, take one photo of the sheet, tap the Eircodes wanted, add them as stops β€” the same way as the Address scan and Import.

What changed

  • Sheet button in Add stops (Scan Β· Voice Β· Sheet Β· Import).
  • One photo β†’ every Eircode on the page gets a box around just the code β†’ tap the ones to add, or Select all β†’ Add N stops.
  • Codes printed in one piece (P12FY70) or two (P12 FY70) are found; usual OCR look-alikes fixed (Y2O1 β†’ Y201); a code that appears twice is listed once; reading order kept.
  • The picked codes go through the Import pipeline: one batch lookup on the map, good ones added at once, the rest (already in your stops, not found, lookup failed) wait on a card to fix or skip. Title "Add from photo".
  • The photo scanner component now serves both Address mode and Sheet scan (kind="address" | "eircodes").

Checks

  • npm test: 64 pass (new: photoEircodes β€” word boxes, one-piece and two-piece codes, look-alikes, duplicates, line-box fallback).
  • tsc and expo lint clean. JS only, no new native package (goes out over the air).
  • Not tested on a phone yet.

Generated by Claude Code

- New "Sheet" button next to Voice: one photo of a page with many Eircodes (a list, a printout, a laptop screen).
  Every Eircode found gets a box on just its characters; the rider taps the ones to add, or Select all, then
  "Add N stops".
- The picked codes go through the same checks as Import (one batch lookup, duplicates on the list or in the photo,
  failed lookups): good ones are added at once, the rest wait on a card to fix or skip.
- lib/scan/photoLines.ts: photoEircodes() finds codes printed in one piece or two, fixes the usual OCR look-alikes,
  lists each code once, in reading order. Tests in tests/photoLines.test.ts.
- The photo scanner component now serves both Address mode and Sheet scan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsWYamWsagMdQ7biMYdzSN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants