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
8ab1b49 to
e271ded
Compare
a945a9e to
070dead
Compare
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.
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.
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). |
peachbits
left a comment
There was a problem hiding this comment.
Both fixes look right — I checked that the .some() scope badges exactly one card (each group is keyed by quote.paymentType and the predicate requires paymentType equality, so only the best quote's own group can match), and the reordered comparator is still a valid total order. Two follow-ups below: one small thing the badge fix picked up, and a question about the cost of the tier reorder.
0499f75 to
0b8eb38
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 0b8eb38. Configure here.
0b8eb38 to
81c45d7
Compare
📸 Test evidence (product decision round: display-honest badge, promotion outranks has-amounts)libertyx pinned placeholder top libertyx tap opens external flow BTC list, badge on the displayed best quote (ACH · Paybis). ACH is single-provider for BTC, so a provider pin cannot displace this badge; the displacement case is frame "before fix no badge anywhere" in the previous evidence comment, which ran this exact display-honest rule Captured by the agent's in-app test run (build-and-test). |
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.
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.
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.
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.
ef0d6eb to
6db2b61
Compare




































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 product decisions shape the ordering rules. The "Best Rate" badge is display-honest: it renders only beside the number it describes, so under a provider pin or an active affiliate preference the badge is deliberately absent rather than relocated (a marker pointing at a competitor works against the promotion the session exists to deliver). And the pins and preferences outrank the has-amounts tier for both links and affiliate configs: an intentional promotion wins outright, so
edge://buy/libertyxvisibly surfaces LibertyX's amount-less placeholder card at the top, while an unpreferred placeholder still sinks below priced quotes.The design doc above carries both rules with worked examples: section 5.6 and decision 10.8 for the badge, decision 10.7 for the ordering 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 buy/sell quote ordering and deep-link navigation for a commercially sensitive flow, but only reorders results and does not change quote fetching, payments, or auth.
Overview
Adds deep-link entry into the ramps buy/sell flow via
edge://buy[/<providerId>[/<paymentType>]]andedge://sell[...](plushttps://deep.edge.appequivalents). Links can optionally pin a provider and payment type to the top of quote results for that visit only; pins live in navigation params, clear on tab blur, and degrade gracefully when nothing matches.Also adds affiliate provider priority from existing
promoCards2pluginPromotions, via a newuseRampPreferredProvidershook that reads silent (non-display) cards. Deep-link pins outrank affiliate preferences.Both inputs feed a shared
compareRampQuotescomparator used byuseRampQuotesand the option list. Rate claims stay honest: the create scene exchange rate and the "Best Rate" badge usegetBestRateRampQuoteso promotions change landing order, not reported market rates. Under a promotion the badge is deliberately absent rather than pointing at a competitor.Reviewed by Cursor Bugbot for commit 6db2b61. Bugbot is set up for automated code reviews on this repo. Configure here.