metatrondelivery/HANDOVER_STATUS_SUMMARY.md
metatroncubeswdev b29962bf9c
Some checks failed
CI / Lint, Unit & Integration Tests (push) Has been cancelled
feat: finish multi-pin pickup end-to-end; fix checkout-datetime followups
Multi-pin pickup selection (study §3.4) — previously a standalone unused
endpoint + TODO comments:
- app/services/pickup-locations.server.ts: pure filterPickupLocationIds +
  I/O resolvePickupLocations (active + has a PICKUP slot template +
  ProductRule allowedLocationIds + inventory exclusion).
- resolveAvailabilityRequest returns pickupLocations[] on method=PICKUP and
  defaults the active location to the first eligible pickup point.
- apps.scheduling.locations.tsx refactored onto the shared resolver
  (was a second copy of the logic).
- Storefront widget: pickup-location chooser (name + address, optional
  multi-pin Google map) when >1 eligible point and none block-configured;
  picking one re-requests availability for that location. New styles +
  widget.choose_pickup_location locale (en + fr).
- Checkout extension Checkout.jsx: same chooser before the date list.
- tests/unit/pickup-locations.test.ts (5 cases); suite 161 green.

checkout-datetime follow-up fixes from the 808a3b7 review:
- typescript devDep ^7.0.2 -> ^5.6.3 (there is no typescript@7 on npm).
- Deleted dead shopify.d.ts (Preact-global shim, unused after the React
  rewrite) and dropped it from tsconfig include.

Also stages the CLI-written `uid` lines in the checkout-datetime and
payment-customization extension tomls.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-10 16:47:59 -04:00

53 lines
5.1 KiB
Markdown

# Handover Status Summary
Based on the original `HANDOVER.md` and the recent workstreams, here is the current status of the project's action items.
## ✅ Completed Items
### Known Bugs / Open Issues
- **B3 | Polaris uncontrolled inputs:**
- **Status**: **Completed** (`f8dd5b2`). Weekday/method/location/zone `<Select>`s in the Slots, Blackout dates and Rates forms were inert (no `value`/`onChange`) — now controlled. Full admin-form audit done.
- **B4 | `checkout-datetime` `checkJs` & type errors:**
- **Status**: **Completed** (`808a3b7` + follow-up). Rewritten to the React pattern (`@shopify/ui-extensions-react/checkout`, `reactExtension`, hooks). `tsconfig` `checkJs:true`, `moduleResolution:"bundler"`.
- **Follow-up fixes applied:** `typescript` devDep corrected `^7.0.2``^5.6.3` (TS 7 doesn't exist on npm); dead `shopify.d.ts` (Preact-global shim, unused after the rewrite) deleted and dropped from `tsconfig` include.
- **Still pending:** manual QA on a Plus dev store; confirm `OrderStatus.jsx`'s `customer-account.order-status.block.render` target against current Shopify docs (currently `@ts-ignore`'d).
- **B9 | CI `typecheck:checkout`:**
- **Status**: **Should pass now** — extension has `package.json` + `tsconfig` + real `src/`. Confirm on the first CI run; it needs `npm ci` to install `@shopify/ui-extensions-react`, `react`, `typescript`.
### Next-Step Implementation
- **P1.1 | Reconcile `checkout-datetime` with live types (B4):**
- **Status**: **Completed** (code). Manual QA on Plus still pending.
- **P2.4 | Multi-pin pickup-location selection (study §3.4):**
- **Status**: **Completed, end-to-end.**
- **Backend:** new pure `filterPickupLocationIds` + I/O `resolvePickupLocations` in `app/services/pickup-locations.server.ts` (active + has a PICKUP slot template + ProductRule `allowedLocationIds` + inventory exclusion). `resolveAvailabilityRequest` now returns `pickupLocations[]` on `method=PICKUP` responses and defaults the active location to the first eligible pickup point. `app/routes/apps.scheduling.locations.tsx` refactored to call the shared resolver (was a duplicate implementation).
- **Storefront widget:** renders a pickup-location chooser (name + address, optional multi-pin Google map) when >1 eligible point and none is block-configured; picking one re-requests availability for that location. New `dd-widget__pickup-locations` styles + `widget.choose_pickup_location` locale (en + fr).
- **Checkout extension:** same chooser in `Checkout.jsx` before the date list.
- **Tests:** `tests/unit/pickup-locations.test.ts` (5 cases). Full suite 161 green.
---
## ⏳ Pending Items
### 1. Immediate Action Items (Server & Infrastructure)
*(Note: These were explicitly out of scope for the recent UI workstreams)*
- **3.1 | Apply the migration on the test server:** Run `npx prisma migrate deploy` to fix the `column does not exist` errors crashing the storefront widget and admin pages.
- **3.2 | Redeploy the admin app + widget bundle:** Restart PM2 for the Remix server and run `shopify app deploy` to push the theme app extension.
- **3.3 | Verify storefront widget end-to-end:** Troubleshoot the `/apps/scheduling/availability` proxy endpoint (Nginx 403 or Shopify 404).
- **3.4 | Test-mode toggles:** Remove `UNLOCK_ALL_FEATURES` from `.env` before public launch.
### 2. Known Bugs / Open Issues
- **B1 | Storefront widget "Couldn't load available dates":** Blocked by 3.1 and 3.3 (server-side). Not code.
- **B2 | App-proxy 403 Forbidden / nginx:** Production server's nginx proxy config. Not code.
- **B5 | `payment-customization` Function schema:** Run `npm --prefix extensions/payment-customization run typegen`, then `shopify app deploy`.
- **B6 | GDPR compliance webhooks:** Re-enable in `shopify.app.toml` once Protected Customer Data Access is granted. **Blocked (Shopify approval).**
- **B7 | `read_customers` scope:** Add back with B6, when returning-customer recognition is built. **Blocked.**
- **B8 | Checkout snapshot stale horizon:** Periodic worker sweep — needs offline-session storage first so the worker can get an Admin client per shop.
### 3. Next-Step Implementation (P1 - P4)
- **P1.2 | Deploy + smoke `payment-customization`:** Test on a dev store with a manual COD gateway.
- **P1.3 | Rates:** **Product decision required** — display-only (current: `delivery-customization` renames the option with a price label) vs. real `delivery-customization` pricing / carrier integration. Not startable without that call.
- **P2.5 | Returning-customer recognition:** Blocked on B6/B7.
- **P2.6 | Cart Transform / deposits:** v2 milestone — draft orders + `cart-transform` Function. Its own task.
- **P3 | BfS / Launch readiness:** a11y + perf passes (best against the live store — deferred per earlier direction), empty/loading states, deploy-pipeline automation (fold in `prisma migrate deploy`), remove `UNLOCK_ALL_FEATURES`.
- **P4 | v1.x fast-follow:** Waitlists, self-service reschedule portal (order-status + magic link), email/SMS reminders (BullMQ + a `Notification` model), printable run sheets, holiday auto-import. Each is its own milestone (`IMPLEMENTATION_PLAN.md` Phase 9).