Ramps deep link entry and affiliate provider priority - #6141
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
48dd57c to
5574137
Compare
5574137 to
0da646a
Compare
0da646a to
8ab1b49
Compare
Convert RampCreateBuyScene/RampCreateSellScene to the React.FC form and replace the deprecated getReceiveAddress call with getAddresses. Mark the remaining NavigationBase deprecation as deferred v7 migration work.
Parses edge://buy[/<providerId>[/<paymentType>]] and the sell equivalent into a new rampCreate link, along with the https://deep.edge.app form. An unrecognized payment type is dropped rather than failing the whole link, so a stale partner URL still opens the flow.
8ab1b49 to
e271ded
Compare
a945a9e to
070dead
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort 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 070dead. Configure here.
Adds a shared quote comparator that floats preferred providers and a preferred payment type above the best-rate ordering, used by both the ramp create scene and the select option scene so the payment type groups and the providers inside them follow the same preference. A preference that matches no quote logs and leaves the ordering untouched.
070dead to
1e83206
Compare
📸🪓 Test evidence (after fix): option-list pin now clears on tab leave
pin active after fix pin cleared after tab leave 🪓 HACK-FORCED: pre fix pin survives tab leave tdd mermaid renders on github Captured by the agent's in-app test run (build-and-test). |
d841b28 to
3df6818
Compare
📸 Test evidence: followup test-gap closure (promo priority, expiry, af attribution, warm start, sell)control no promo order promo code activated paybis first via activepromotions future enddate pin applies expired card reverts order expired card prunes activepromotions af attribution moonpay first visible promo card cta cta warm pin venmo first warm openurl delivery no af no referral write sell moonpay pinned Captured by the agent's in-app test run (build-and-test). |
|
Non-visual evidence from the same run, to go with the screenshots above. Section 6 JSON blocks against the real cleaners. Both blocks were extracted from the committed doc and run through The negative control matters because the healing array drops a malformed card silently; without it a green result proves nothing. AC2, now runtime rather than code reading. A temporary uncommitted marker inside
So the pin path adds no referral write at all, while the One caveat worth recording, not a defect in this PR. The "Best Rate" badge is attached to Testing was done on a throwaway account rather than |
3df6818 to
c69d8cc
Compare
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
c69d8cc to
2744bfe
Compare
2744bfe to
90ec73b
Compare
peachbits
left a comment
There was a problem hiding this comment.
Two notes on the ordering precedence in compareRampQuotes (the group-sort comment and the amounts-tier comment below are the same root cause: the priority ranks are compared before everything else), plus one nit on the debug-log effect.
Navigates to the buy or sell tab and threads the optional provider and payment type through as link-scoped pins.
Documents the link format, the ordering rules, the promoCards2 setup blocks for the info server document, and the partner link instructions.
90ec73b to
0499f75
Compare
📸🪓 Test evidence (review fixes)
unpinned control badge on ach 🪓 HACK-FORCED: before fix no badge anywhere 🪓 HACK-FORCED: after fix badge on group holding best paybis pinned badge on ach pin cleared after tab leave Captured by the agent's in-app test run (build-and-test). |

































Technical Design Document
ramps-deeplink-provider-priority.md
Description
Gives the ramps buy/sell flow a deep link entry point and provider priority.
Part A, link-scoped flow access. New
edge://buy[/<providerId>[/<paymentType>]]andedge://sell[...]links (plus thehttps://deep.edge.app/...form) openRampCreateScenewith an optional provider and payment type pinned to the top of the quote results. The pin lives in navigation params only: nosaveAccountReferralcall, and?af=attribution keeps its existing independent behavior. It is scoped to the flow the link opened, so stepping to the option list and back keeps it while leaving the tab clears it. A pin that matches no quote logs and falls back to the normal ordering, which is what/buy/moonpay/cashappdoes while the info serverrampQuoteFilterdisables Cash App. An unrecognized payment type in a link is dropped rather than failing the link, so a stale partner URL still opens the flow.Part B, affiliate provider priority.
useRampPreferredProvidersreads the existingpromoCards2pluginPromotions.preferProvidersthroughfilterInfoCards(notgetDisplayInfoCards), matched againstaccountReferral. Reading the ungated path is what makes silent priority config work: a card withlocaleMessages: {}and noctaButtonnever renders in the carousel but still carries its behavior payload. No info server changes.Both inputs feed one comparator (
compareRampQuotes) shared byuseRampQuotesandRampSelectOptionScene, so the payment-type group order and the provider order inside each group agree. Anything that makes a claim about the RATE stays out of that ordering: the select scene's "Best Rate" badge and the create scene's exchange rate (which also feeds the light-account purchase limit) both go throughgetBestRateRampQuote, so a pinned link changes which option the user lands on first, never what the app reports as the market rate.Two ordering rules follow from that and are worth calling out. The "Best Rate" badge is scoped to the PAYMENT TYPE, not to the provider a card happens to display: a card is badged when the best quote lives anywhere in its provider group. Testing the displayed quote instead drops the badge from the entire list under any provider pin, because the pin moves the best quote out of index 0 in every group at once. And quotes that HAVE amounts outrank both preferences, so a preferred external provider's
'0'placeholder (createExternalRampPlugin) cannot displace a priced quote or float its group up the list.The design doc above carries both rules with worked examples: section 5.6 for the badge, decision 10.7 for the has-amounts tier.
The design doc above carries the paste-ready CouchDB
promoCards2blocks and the partner link instructions.Asana: https://app.asana.com/0/1215088146871429/1217224633446931
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Medium Risk
Touches fiat on-ramp navigation and quote presentation (ordering vs. rate claims); behavior is mostly reordering with graceful fallbacks, but partners and marketing will rely on the new URLs and promo-driven priority.
Overview
Adds
edge://buy/edge://sell(andhttps://deep.edge.app/...) deep links that open the ramps buy/sell flow, with optional path segments to pin a provider and payment type to the top of quote results for that visit only. Pins travel through navigation params (not referral state), forward into the option list, and clear when the user leaves the buy/sell tab; unknown payment types are ignored so partner URLs still open the flow.Introduces shared quote ordering via
compareRampQuotes/rampQuotePriority, fed by deep-link pins and byuseRampPreferredProviders(info serverpromoCards2preferProvidersviafilterInfoCardsfor silent affiliate priority).useRampQuotesandRampSelectOptionSceneuse that ordering; exchange rate and “Best Rate” still usegetBestRateRampQuoteso pinned UI does not misstate market rates.Includes deep-link tests,
rampQuotePriorityunit tests, changelog entries, and a design doc for partners and CouchDB config.Reviewed by Cursor Bugbot for commit 90ec73b. Bugbot is set up for automated code reviews on this repo. Configure here.