# TASK-007 — Customer App Trello column (store, savings, pilot, auth, settlement)

**Status:** Completed
**Branch:** feature/TASK-007-customer-app-tickets
**Started:** 2026-10-13
**Last updated:** 2026-10-13

## Goal
Implement five Customer App cards: store listing prep (#74), lifetime savings from Ops-placed orders (#15), 7 km Constantia Village pilot gate (#18), session auth on order/return APIs (#13), and Ops settlement message on order detail (#78).

## Acceptance criteria
- [x] Release Android manifest HTTPS-only; debug/profile cleartext; `docs/store_listing.md`
- [x] `placedOnOps` + `syncSavingsFromOrders`; no `recordOrderSavings` on Paystack success
- [x] `pilot_radius.dart` + signup/checkout/profile gates; `geocoding` on mobile only
- [x] `_customerAuthHeaders` on place/fetch order and submit/fetch returns
- [x] `settlementMessage` from Ops only; shown on `OrderDetailScreen`
- [x] Unit/widget tests per plan; `flutter test` on new files

## Files touched
| File | Notes |
|------|-------|
| `android/app/src/main/AndroidManifest.xml` | Cleartext off for release |
| `android/app/src/debug|profile/AndroidManifest.xml` | Cleartext on for local HTTP |
| `docs/store_listing.md` | Store listing copy |
| `lib/models/order.dart` | `placedOnOps`, `settlementMessage` |
| `lib/core/pilot_radius.dart` | Haversine + geocode gate |
| `lib/core/api_client.dart` | Customer session headers |
| `lib/state/user_model.dart`, `order_model.dart`, `main.dart` | Savings sync + DI |
| `lib/features/checkout/checkout_screens.dart`, `auth_screens.dart`, `profile_screens.dart` | Pilot gates |
| `lib/widgets/order_widgets.dart`, `return_screens.dart` | Settlement UI + session on returns |
| `test/pilot_radius_test.dart`, `order_savings_test.dart`, `order_settlement_test.dart`, `checkout_pilot_test.dart` | Tests |
| `test/api_client_emulator_test.dart` | Session header assertions |

## Decisions
- 2026-10-13 — Desktop/web skip geocoder and treat addresses as inside so dev checkout still works.
- 2026-10-13 — Ops must accept `X-Session-Token` without `X-App-Key` on orders/returns; no Ops changes in this task.

## Session log
### 2026-10-13 — Cursor
- Did: Implemented all five cards per plan; added tests and docs.
- Broke / deferred: Ops session-only auth must be live before production order/return calls without app key.
- Commits: (pending)

## Next steps
1. Verify Ops accepts session token on `api/v1/orders` and `api/v1/returns`.
2. Manual screenshot capture for store listing.

## Open questions
- Play Console AAB requirement — follow-up after first APK upload.
