Skip to content

Commit 56e50a7

Browse files
committed
docs(ramp): reference completed headless buy PRs
1 parent 428bdda commit 56e50a7

1 file changed

Lines changed: 20 additions & 10 deletions

File tree

  • app/components/UI/Ramp/headless

app/components/UI/Ramp/headless/PLAN.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,33 @@
44
55
## Phases checklist
66

7-
- [x] **Phase 1** — Scaffold Headless Playground screen + route + entry row in Ramp Settings (gated by `isInternalBuild`)
8-
- [x] **Phase 2** — Implement `useHeadlessBuy` v0 read-only facade (tokens, providers, payment methods, `getQuotes`) and wire playground inputs/quotes list
9-
- [x] **Phase 3** — Add headless session registry + `startHeadlessBuy` API that navigates into existing BuildQuote with `headlessSessionId`
10-
- [x] **Phase 3.1** — Move pre-seed out of `useHeadlessBuy` — keep params on the session only and let the destination resolve them from the catalog
11-
- [x] **Phase 4** — Extract `handleWidgetProviderContinue` / `handleNativeProviderContinue` into `useContinueWithQuote(quote, ctx)` so both BuildQuote and headless callers can reuse it
12-
- [x] **Phase 4b** — Introduce Headless Host screen as stack base for the headless flow + parameterize `useTransakRouting` reset helpers with `baseRoute`
13-
- [x] **Phase 4c** — Make `useContinueWithQuote` headless-ready — extend `ContinueWithQuoteContext` with optional overrides so callers without controller state (the Host) can drive it from a `Quote`
14-
- [x] **Phase 5 (revised)** — Quote-first headless start path — `startHeadlessBuy({ quote, redirectUrl? })` creates a session carrying the quote, navigates to Headless Host, Host calls `continueWithQuote(quote, ctx)` and re-orchestrates after auth loops
7+
- [x] **Phase 1** — Scaffold Headless Playground screen + route + entry row in Ramp Settings (gated by `isInternalBuild`)[#29144](https://github.com/MetaMask/metamask-mobile/pull/29144)
8+
- [x] **Phase 2** — Implement `useHeadlessBuy` v0 read-only facade (tokens, providers, payment methods, `getQuotes`) and wire playground inputs/quotes list[#29144](https://github.com/MetaMask/metamask-mobile/pull/29144)
9+
- [x] **Phase 3** — Add headless session registry + `startHeadlessBuy` API that navigates into existing BuildQuote with `headlessSessionId`[#29144](https://github.com/MetaMask/metamask-mobile/pull/29144)
10+
- [x] **Phase 3.1** — Move pre-seed out of `useHeadlessBuy` — keep params on the session only and let the destination resolve them from the catalog[#29144](https://github.com/MetaMask/metamask-mobile/pull/29144)
11+
- [x] **Phase 4** — Extract `handleWidgetProviderContinue` / `handleNativeProviderContinue` into `useContinueWithQuote(quote, ctx)` so both BuildQuote and headless callers can reuse it[#29213](https://github.com/MetaMask/metamask-mobile/pull/29213)
12+
- [x] **Phase 4b** — Introduce Headless Host screen as stack base for the headless flow + parameterize `useTransakRouting` reset helpers with `baseRoute`[#29338](https://github.com/MetaMask/metamask-mobile/pull/29338)
13+
- [x] **Phase 4c** — Make `useContinueWithQuote` headless-ready — extend `ContinueWithQuoteContext` with optional overrides so callers without controller state (the Host) can drive it from a `Quote`[#29338](https://github.com/MetaMask/metamask-mobile/pull/29338)
14+
- [x] **Phase 5 (revised)** — Quote-first headless start path — `startHeadlessBuy({ quote, redirectUrl? })` creates a session carrying the quote, navigates to Headless Host, Host calls `continueWithQuote(quote, ctx)` and re-orchestrates after auth loops[#29338](https://github.com/MetaMask/metamask-mobile/pull/29338)
1515
- [ ] **Phase 5b (deferred)**`startHeadlessBuy({ assetId, amount, paymentMethodId, providerId? })` "open BuildQuote / Host fetches quotes" mode — picked up after the quote-first path is stable
16-
- [x] **Phase 6** — Bypass order-processing redirect in Transak/aggregator routing when headless; fire `onOrderCreated` and end session
17-
- [x] **Phase 7** — Extract UI-coupled error/limit surfacing; route errors through `onError` as typed `HeadlessBuyError`
16+
- [x] **Phase 6** — Bypass order-processing redirect in Transak/aggregator routing when headless; fire `onOrderCreated` and end session[#29340](https://github.com/MetaMask/metamask-mobile/pull/29340)
17+
- [x] **Phase 7** — Extract UI-coupled error/limit surfacing; route errors through `onError` as typed `HeadlessBuyError`[#29612](https://github.com/MetaMask/metamask-mobile/pull/29612)
1818
- [ ] **Phase 8** — Cancellation + `onClose` semantics (including user-dismissed detection)
1919
- [ ] **Phase 9** — Expose `getOrder` / `refreshOrder` from hook and show in playground
2020
- [ ] **Phase 10** — Playground polish — event log, input persistence, aggregator/native presets
2121

2222
---
2323

24+
## Completed implementation PRs
25+
26+
- [#29144](https://github.com/MetaMask/metamask-mobile/pull/29144) — Headless buy playground and Phase 3 session API (covers Phases 1–3.1)
27+
- [#29213](https://github.com/MetaMask/metamask-mobile/pull/29213) — Extract `useContinueWithQuote` hook (Phase 4)
28+
- [#29338](https://github.com/MetaMask/metamask-mobile/pull/29338) — Headless Host + quote-first `startHeadlessBuy` (covers Phases 4b–5)
29+
- [#29340](https://github.com/MetaMask/metamask-mobile/pull/29340) — Bypass order-processing redirect in headless flows (Phase 6)
30+
- [#29612](https://github.com/MetaMask/metamask-mobile/pull/29612) — Surface headless buy errors as data (Phase 7)
31+
32+
---
33+
2434
Each phase below is sized to be merged and tested independently. Scope is kept small per phase so we can pick them up one at a time, validate in the playground, and discover the refactors the mainstream flow needs along the way.
2535

2636
---

0 commit comments

Comments
 (0)