Repository navigation
feat(frontend): pricing plans: Free, Premium (coming soon) and Pay as you go - #48
Aspirant200715 wants to merge 6 commits into
Conversation
… you go - shared plan data and cards for the choose-your-plan dialog and a new /pricing page - comparison table across funding, limits, verification, settlement and service - Free and Pay as you go keep their existing wiring (startTrial, wallet connect) - Premium is shown but disabled, with no price, until credit packs exist
It held a local path (/home/aspirant/Projects/mergit/frontend/node_modules) instead of a real node_modules tree.
OfficialAbhinavSingh
left a comment
There was a problem hiding this comment.
merged with main locally, full suite green (224 passed, 0 unexpected).
checked /pricing by eye in light, dark and at 375px wide: no horizontal overflow, plan cards and the comparison table both render fine, Premium reads "Coming soon" consistently in the cards and the table.
one thing fixed and pushed to this branch (8fb5bc2): frontend/node_modules was accidentally committed as a tracked file holding a local path (/home/aspirant/Projects/mergit/frontend/node_modules) instead of a real tree. removed.
Viscous106
left a comment
There was a problem hiding this comment.
Thanks for removing the frontend/node_modules symlink. Re-checking the current diff against my earlier review: the CI check is still red, and most of the content findings are untouched. I read the diff only. I did apply it to a copy of main's frontend/ and run prettier, tsc -b, eslint, vite build and the whole vitest suite, and all passed, so the failure is probably the Playwright e2e step (most likely e2e/pricing.spec.ts, or the FundingChoice dialog change breaking an existing live spec). I couldn't run Playwright or see the job log, so please check which test fails.
Not fixed, please address before merge
- Reputation claim (
plans.ts:69,plans.ts:455-458): "Work counts toward an agent's reputation once validated" and the "Counts toward an agent's reputation" row still read as live behaviour. The app says reputation isn't computed and redirects the live leaderboard. Soften it or mark it as coming soon. - Premium shows YES for features that don't exist (
plans.ts:464-473, "Everything in Free" at:396): escrow, release after verification, on-chain receipt, dispute window, all agents.plans.test.ts:327-335exempts "shared" rows, so the test enforces nothing. Use SOON in those cells. - Hardcoded limits: "5 USDC", "2 USDC" and "3" appear in
plans.ts:377,382,435,442,443,FundingChoice.tsx:98andPricing.tsx:540,631,634. The gateway reads them from env (FREE_CREDITS_USDC_UNITS, the plan cap,CREDIT_PLANS_PER_DAY), and the comment atplans.ts:346admits it.plans.test.ts:313locks "5 USDC" in. Read them from config or label them as defaults. The Free card also says "no wallet and no cost" (plans.ts:378) while stating limits that env can change; the footer hedges this and the cards don't. - Accessibility:
PlanCards.tsx:266: the cards areh3directly under theh1, and the firsth2("Compare plans",Pricing.tsx:584) comes after them.Pricing.tsx:587: the scrolling table wrapper has notabindex,role="region"or label, so keyboard users can't scroll it.Pricing.tsx:605:th scope="colgroup"with no<colgroup>. Usescope="rowgroup"or a caption.auth.css:718-726: white 11px text on the mint-to-azure ribbon is about 3.4:1 against #0e9f74, under AA for small text. The amber.plan-soonbadge and the mint ticks (pricing.css:1031-1032) are worth measuring too.
- CSS: the featured column is hardcoded as
nth-child(4)(pricing.css:1043-1044). The 6px hover lift is clipped by.plan-dialog { overflow-y: auto }(auth.css:662-665)..plan-soonis declared twice (auth.css:728and:755). - Tests:
plans.test.tsonly asserts data shape, and the signed-in e2e (pricing.spec.ts:44-47) is titled "plan choice starts the trial" but only checks anhref. Nothing tests the Pay as you go button orFundingChoice.
Nits: .gitignore still has node_modules/ with a trailing slash, which doesn't match a symlink. Use node_modules. PlanCards.tsx imports from "react" twice and re-exports PlanId without using it. The reduced-motion rules are split between pricing.css and auth.css.
Not verified: which e2e step fails, the live-mode e2e specs against the new dialog, contrast ratios beyond the ribbon, and whether the base is current with main.
…e Caddy SPA list; merge main
…in test_caddy_hardening - 'Plans' also matched 'Compare plans' (strict-mode violation), failing test:e2e - ruff E501 on test_caddy_hardening.py:113 failed the control-plane check
|
CI on this branch was red for two small reasons: the e2e looked up the h2 "Plans" by substring and also matched "Compare plans" (now exact: true), and test_caddy_hardening.py:113 was over the ruff line limit. Fixed both; the full e2e suite passes locally. One question for Yash: the "reputation is not scored yet" wording in the table looks stale now that reputation.py computes it from validated wallet-funded work. Is "coming soon" deliberate? |
A rework of this page reintroduced the stale per-plan cap this PR had already fixed: PLAN_CAP_USDC went back to a literal 2, with a comment claiming CREDIT_PLAN_CAP_USDC_UNITS defaults to 2000000. It does not — chain/gateway/src/main.rs still defaults it to FREE_CREDITS_USDC_UNITS itself (the grant), with its own comment naming the 2-under-5 mismatch as a past bug. No deploy file sets it to 2000000 either. PLAN_CAP_USDC is now derived from FREE_CREDITS_USDC directly, so the two cannot drift apart silently again, and a regression test (removed in the same rework) is back, extended to also check the derivation. Full suite green: 292 vitest, 233 Playwright passed (the one Playwright failure, the flows story, is the pre-existing flaky-under-load test; it passes alone).
Replaces the two-card plan choice with three plans and adds a public /pricing page with a comparison table.
What changed
What I verified
Not verified