Repository navigation
feat(billing)!: catalogue-driven billing screen with product-key purchases on both rails - #174
Conversation
…itlement wait, actionable deletion refusals
… and no-link deletion copy
…hange timing, bound the store wait
… explain a tier the store does not sell The free tier's call to action went down the purchase path, found no product (the floor sells none) and reported productUnavailable. It now opens the billing portal on a web build where portalAvailable, the store's own subscriptions page for a store-billed team with a manageUrl and an owner, and renders no button otherwise. A store build has no web rail, so a web-billed customer there is never sent to a web page. A tier the store carries no product of rendered a name and features with nothing else. It now says "Not available in this app." in place of the price (plan_store_unsold), naming no other place to buy it.
…ooked or foreign cancellation
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. The design holds together and I found no merge-blocking defect in the code I read, but CI has not run the tests, so nothing here is verified green. One contract choice can silently price a real tier as "Free". Major
Minor
TestsThe PR adds broad coverage for the changed behaviour: product/plan decoding, the wire fixtures, the controller wait and polling, view cards, the disclosure and floor exit, and deletion refusals. None of it has run in CI on this commit (see below). CI
I reviewed the controller, model, config and view diffs and the profile controller. I skimmed the test files and did not read them line by line. |
|
Thanks. Round one, per finding: Major, Minor, CI: both jobs resolve @kodizm please re-review. |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. Both of my earlier findings are now settled, and the two new commits add no new defect. Merge still waits on CI, which has not run the tests on this head. What changed since my last review:
TestsThe new test "a paid first row is not the floor: it keeps its price and its button" covers the fix. The rest of the coverage is the same as in my last review, and none of it has run in CI on this commit. CI
This re-review read only the diffs of |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. The new commits fix the floor finding correctly and add a regression test for it. I found nothing new, but CI is still running on this head. Changes since my last review (incremental, e34698d to e5ca815):
On the floor fix: On TestsThe new test, "a paid first row is not the floor: it keeps its price and its button", builds a catalogue from the producer's rows minus the free row. It checks that no "Free" label appears, that CICI was still running when I checked a second time, so this head is not confirmed green.
|
…lank legal url as unset
|
Two more fixes from a cross-repo review of the batch, in 54e5a68:
@kodizm please re-review. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting.
What changed since my last review (incremental,
Minor
TestsThe config test "a blank url reads as unset, so no dead link renders" covers the URL change. The stub-scan test "no shipped billing error sentence names the web" covers the copy change, but only within CI
This re-review read only the five files changed in |
|
Minor fixed in d1f48a9.
@kodizm please re-review. |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting.
What changed since my last review (incremental,
Tests"no shipped billing error or subscription refusal names the web" covers the copy change. The delete-account widget test quotes the new sentence. CI
This re-review read only the four files changed in |
The billing screen sells any app's catalogue: prices and calls to action come from the producer's
products, both rails purchase by catalogue product key, and a store build sells, prices and discloses only what its own store carries. UI half of the reusable payments work, with fluttersdk/magic_payments#16 (client contract) and the magic-starter-laravel catalogue PR (backend rows).What changes
checkout(productKey:),purchase(productKey, context:)).products;MagicStarterPlan.monthly,annualandcurrencyare removed. The first row is the free floor, a tier above it with no sellable product is custom, a web card shows the product's web pricedisplay, a store card the store's own localized price. Grandfathered products (sellable: false) stay in the rows so a held subscription can be ranked, and are never offered.lastChangeTimingdecides between polling and "takes effect on ", and the wait is bounded.productUnavailableon every tap.BillingErrorCode, and actionable account-deletion refusals.en.stub; existing apps add the keys listed under## [Unreleased].CI note
This branch compiles only against the unreleased magic_payments contract (#16). The
Published graphjob stays red until magic_payments 0.0.8 is on pub.dev; the floor moves to^0.0.8in the release PR, and this PR merges after that publish.Gates (local, against the magic_payments branch)
dart format --set-exit-if-changed lib test: 0 changed.flutter analyze: no issues.flutter test: 1881 passed, 1 skipped (pre-existing).Review
Per-wave reviews, a final code review and two independent oracle passes; every finding is fixed on this branch (the last pass: the unsold sentence never on the held tier's own card, and no floor exit once the subscription stopped renewing or on the other store's device).