Promote scan redesign from playground + auto-save locations #10

Open
opened 2026-03-18 17:52:38 +00:00 by forgejo_admin · 0 comments
Contributor

Lineage

plan-mcd-tracker → Phase 7 (SvelteKit frontend)

Repo

forgejo_admin/mcd-tracker-app

User Story

As a user logging a BOGO code
I want the app to auto-save a new McDonald's location when I select it
So that I don't have to manually create locations before I can track codes

Context

Depends on playground scan redesign being approved on phone (Gate 1). This ticket promotes the approved HTML design to SvelteKit with real data bindings.

Key functionality beyond HTML→Svelte copy:

  • GPS-based location loading via GET /locations/nearby
  • Auto-save: if user selects a nearby McDonald's that isn't in their saved locations, POST /locations creates it automatically before attaching the code
  • Receipt photo upload via POST /receipts (multipart FormData)
  • BOGO code save via POST /locations/{id}/codes
  • Nav label: "Scan" → "Log" with + icon
  • scan/success page: replace hardcoded mock with GET /stats data

File Targets

Files to modify:

  • src/routes/scan/+page.svelte — promote from playground HTML
  • src/routes/scan/success/+page.svelte — dynamic stats from API
  • src/routes/+layout.svelte — nav label change

Files NOT to touch:

  • Other route pages — handled by field-fix ticket
  • src/app.css — no style changes

Acceptance Criteria

  • BLOCKED: playground scan redesign approved on phone first
  • Single-screen BOGO code entry with GPS location picker
  • Selecting an unsaved nearby location auto-creates it via POST /locations
  • Receipt photo upload works (optional, non-blocking on failure)
  • BOGO code saves to correct endpoint: POST /locations/{id}/codes with { bogo_code }
  • Success page shows real stats from GET /stats
  • Nav shows "Log" instead of "Scan"

Test Expectations

  • Existing Vitest tests updated for new scan page structure
  • Manual E2E: sign in → log page → enter code → select location → save → success
  • Run command: npm run test

Constraints

  • Must match approved playground HTML exactly (copy CSS structure, add data bindings)
  • Do NOT deviate from playground design during promotion
  • Follow sop-capacitor-mobile-lifecycle Stage 2 (playground → SvelteKit)

Checklist

  • Playground approved (Gate 1)
  • PR opened
  • Tests pass
  • No unrelated changes
  • plan-mcd-tracker → Phase 7
  • Depends on: playground scan redesign ticket (mcd-tracker-playground)
  • sop-capacitor-mobile-lifecycle — Stage 2 promotion
### Lineage `plan-mcd-tracker` → Phase 7 (SvelteKit frontend) ### Repo `forgejo_admin/mcd-tracker-app` ### User Story As a user logging a BOGO code I want the app to auto-save a new McDonald's location when I select it So that I don't have to manually create locations before I can track codes ### Context Depends on playground scan redesign being approved on phone (Gate 1). This ticket promotes the approved HTML design to SvelteKit with real data bindings. Key functionality beyond HTML→Svelte copy: - GPS-based location loading via `GET /locations/nearby` - Auto-save: if user selects a nearby McDonald's that isn't in their saved locations, `POST /locations` creates it automatically before attaching the code - Receipt photo upload via `POST /receipts` (multipart FormData) - BOGO code save via `POST /locations/{id}/codes` - Nav label: "Scan" → "Log" with + icon - scan/success page: replace hardcoded mock with `GET /stats` data ### File Targets Files to modify: - `src/routes/scan/+page.svelte` — promote from playground HTML - `src/routes/scan/success/+page.svelte` — dynamic stats from API - `src/routes/+layout.svelte` — nav label change Files NOT to touch: - Other route pages — handled by field-fix ticket - `src/app.css` — no style changes ### Acceptance Criteria - [ ] BLOCKED: playground scan redesign approved on phone first - [ ] Single-screen BOGO code entry with GPS location picker - [ ] Selecting an unsaved nearby location auto-creates it via POST /locations - [ ] Receipt photo upload works (optional, non-blocking on failure) - [ ] BOGO code saves to correct endpoint: POST /locations/{id}/codes with { bogo_code } - [ ] Success page shows real stats from GET /stats - [ ] Nav shows "Log" instead of "Scan" ### Test Expectations - [ ] Existing Vitest tests updated for new scan page structure - [ ] Manual E2E: sign in → log page → enter code → select location → save → success - Run command: `npm run test` ### Constraints - Must match approved playground HTML exactly (copy CSS structure, add data bindings) - Do NOT deviate from playground design during promotion - Follow `sop-capacitor-mobile-lifecycle` Stage 2 (playground → SvelteKit) ### Checklist - [ ] Playground approved (Gate 1) - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `plan-mcd-tracker` → Phase 7 - Depends on: playground scan redesign ticket (mcd-tracker-playground) - `sop-capacitor-mobile-lifecycle` — Stage 2 promotion
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/mcd-tracker-app#10
No description provided.