Skip to content

bug(ui/purchases): multi-bucket Configure Purchase modal seeds 'all-upfront' regardless of per-rec payment #699

Description

@cristim

When fan-out into multiple buckets, Configure Purchase modal sets PaymentOption='all-upfront' for ALL selected recommendations regardless of what each row's actual payment option is. Single-bucket flow (openPurchaseModal → resolvePerRecPaymentSeed) handles per-rec payment correctly; the multi-bucket fan-out (resolveBucketPaymentSeed in frontend/src/recommendations.ts:3242-3305) seeds from toolbar.payment (=cachedGlobalDefaultPayment, default all-upfront) and never inspects rec.payment. Silently mis-bills users on bulk purchases.

Fix direction

Include payment in the bucket key at recommendations.ts:3156 so recs with different payments fan into separate buckets (each bucket then uniform on payment, seed becomes recs[0].payment). Mirrors the existing 'bundle B' term-key approach. Alternative: extend resolveBucketPaymentSeed to fall back to recs[0].payment when all recs in the bucket share one supported value before falling back to toolbar — less clean.

Surfaced by QA spreadsheet row 5.2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions