3 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c1494cfa52 |
fix: real checkout-datetime version/capability fix + payment-customization schema
Some checks failed
CI / Lint, Unit & Integration Tests (push) Has been cancelled
checkout-datetime (re-enabled, no longer excluded): - api_version was declared as "2025-10" but @shopify/ui-extensions-react has no release for that channel at all (jumps 2025.7.4 -> 2026.0.0 directly) — downgraded to "2025-07" to match what's actually installed and what the code was written/typed against. Verified all three targets (purchase.checkout.block.render, purchase.thank-you.block.render, customer-account.order-status.block.render) exist in that package version before making the change. - [extensions.capabilities] network_access was missing entirely (dropped during the multi-pin-pickup rewrite) despite Checkout.jsx's authedFetch() genuinely needing it — the checkout sandbox would have silently blocked every fetch() call at runtime even though it deployed fine. - OrderStatus.jsx imported reactExtension/BlockStack/Heading/Text/ useTranslate from the *checkout* surface behind a "might not be in the type definition" @ts-ignore, for a *customer-account* target. Verified @shopify/ui-extensions-react/customer-account re-exports the same component names for real and switched the import, removing the @ts-ignore entirely — it now typechecks for real instead of being suppressed. - lib.js's shared useConfirmationText() hardcoded useTranslate/ useAttributes from the checkout surface, but was called from both ThankYou.jsx (checkout) and OrderStatus.jsx (customer-account) — hooks are bound to their surface's React context, so calling checkout-bound hooks from a customer-account extension would break at runtime even though nothing caught it statically. Changed it to a plain function (confirmationText) taking translate/attributes as parameters; each caller now calls its own surface's hooks and passes the results in. payment-customization: schema.graphql never existed (not gitignored, just never fetched/committed when this extension was added — HANDOVER.md's note that this was "by design" was wrong). Fetched via `shopify app function schema` and committed, matching the pattern already used by validation-slot/delivery-customization. Together these three issues were silently failing every single `shopify app deploy` for the whole app, which is why shopify.app.toml's App Proxy URL fix never actually reached Shopify's servers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|
|
b29962bf9c |
feat: finish multi-pin pickup end-to-end; fix checkout-datetime followups
Some checks failed
CI / Lint, Unit & Integration Tests (push) Has been cancelled
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> |
||
|
|
a2c78d703f |
feat: close DS study coverage gaps (inventory exclusion, live checkout re-validation, per-day cap, payment fn, checkout ext)
Some checks failed
CI / Lint, Unit & Integration Tests (push) Has been cancelled
Audited the implementation against DS_Delivery_Date_Time_App_Study.docx and closed the actionable gaps (see IMPLEMENTATION_REVIEW_2026-09-04.md). Core (code + unit tests, 156 green): - Wire excludeLocationsWithoutStock into resolveAvailabilityRequest; widget now sends variantIds so inventory-based location exclusion actually runs. - Live slot re-validation at checkout: new checkout-snapshot.server.ts writes a shop-metafield capacity snapshot; validation-slot's evaluateCheckout rejects a complete selection that has since filled / blacked out / closed / hit the daily cap / left the schedule. Refreshed on order webhooks and slot/blackout/location/enforcement edits. - Scopable checkout enforcement: Shop.enforcementMode (all|tagged|off) + enforcementTag, new app.settings.tsx admin page, honoured via the snapshot. - Per-day order cap: Location.dailyOrderCap threaded through getAvailability (dailyCap + consumedPerDate); admin field on the location screen. - Product-rule slot blocking: ProductRule.blockedStartMins, unioned in resolveProductRuleConstraints, enforced in the engine and resolveHoldRequest; admin field on the product rules screen. - Product-page placement: product-availability.liquid block + widget data-mode="preview" (read-only earliest-date line). - Second locale: datetime-widget fr.json / fr.schema.json. - Migration 20260904120000_review_gaps (apply with prisma migrate deploy). New Functions (source + unit tests; need `shopify app deploy` to ship): - extensions/payment-customization: cart.payment-methods.transform.run — hides cash-on-delivery / pay-in-store gateways on SHIPPING orders. - extensions/checkout-datetime/src: restored from a gitignored dist-only state — Plus native picker + Thank you / Order status confirmation blocks, all calling the existing checkout.scheduling.* routes (one capacity pool). tsconfig ships checkJs:false pending reconciliation with live checkout types. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |