Add remote enable/disable of gift card providers via info server#6032
Add remote enable/disable of gift card providers via info server#6032j0ntz wants to merge 2 commits into
Conversation
ed30d64 to
364b5c0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 364b5c0. Configure here.
364b5c0 to
dbc2747
Compare
📸 Test evidence — info-server category gating (sim, maestro)agent proof 1215731967028387 01 giftcard categories baseline agent proof 1215731967028387 02 giftcard categories apparel disabled agent proof 1215731967028387 03 giftcard marketplace flow pass Captured by the agent's in-app test run (build-and-test). |
peachbits
left a comment
There was a problem hiding this comment.
There's a lot of duplicated functionality here that seems unnecessary. We could just add 'spend' as a key to the exchangeInfo object and avoid the new redux value and info server document entirely.
|
Also, the term spendInfo is a poor choice since that term is already broadly used across the app |
dbc2747 to
94442cc
Compare
Consume a new spendInfo config from the info server, mirroring the exchangeInfo pattern. A generic disablePlugins NestedDisableMap keyed by providerId gates the gift-card market: an entire provider (Phaze or Bitrefill) or individual Phaze brands by productId can be disabled remotely. Reuses the NestedDisableMap cleaner from ExchangeInfoActions.
94442cc to
a938e1e
Compare







CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
Requires edge-info-server to publish the new
giftCardInforollup field (edge-info-server#154). This GUI PR readsgiftCardInfoforward-compatibly, so it is backward compatible and inert against the currently published info server: with nogiftCardInfoin the rollup, nothing is disabled. The feature activates once edge-info-server publishes the field and theedge-info-serverdependency is bumped.Requirements
If you have made any visual changes to the GUI. Make sure you have:
Description
Asana task
Adds remote enable/disable of gift card providers, mirroring the existing exchange-plugins (
exchangeInfo) pattern.A new
giftCardInfoconfig is read from the info server rollup and cached in redux (state.ui.giftCardInfo). It carries a genericdisablePluginsNestedDisableMapkeyed by providerId, so it works for any present or future gift card provider:{ phaze: true }disables the entire Phaze provider.{ phaze: { "<productId>": true } }disables individual Phaze brands byproductId.{ bitrefill: true }disables Bitrefill (a webview, so whole-provider only).The Gift Card Marketplace scene filters disabled Phaze brands out of the grid and gates the Bitrefill option, via
isGiftCardBrandDisabled/isGiftCardProviderDisabledhelpers. TheNestedDisableMapcleaner is reused fromExchangeInfoActions.Changes:
GiftCardInfoActions.ts:asGiftCardInfocleaner,updateGiftCardInfo()thunk, and gating helpers.GiftCardInfoReducer.tswired intouiReducer(state.ui.giftCardInfo);UPDATE_GIFT_CARD_INFOaction.Services.tsx: dispatchupdateGiftCardInfo()in the existing info-server refresher.GiftCardMarketScene.tsx: apply per-brand and per-provider gating.Note
Low Risk
Backward-compatible when the rollup field is absent; changes only marketplace visibility, not purchase or payment flows.
Overview
Adds remote gift card gating from the info server rollup (
giftCardInfo), following the same pattern asexchangeInfo. A new thunk loads and validatesdisablePluginsintostate.ui.giftCardInfo, refreshed on the existing info-server interval inServices.The marketplace applies that config: Phaze brands are hidden when the whole provider or their
productIdis disabled; Bitrefill is omitted when the provider is disabled. Category chips and selection are derived from enabled items only, with a fallback to “All” if the current category becomes empty after a refresh.asNestedDisableMapis exported fromExchangeInfoActionsfor reuse. Unit tests cover parsing and the provider/brand helper semantics.Reviewed by Cursor Bugbot for commit a938e1e. Bugbot is set up for automated code reviews on this repo. Configure here.