fix(tinyplace): correct identity pricing tiers shown to users#4215
Conversation
The "Pricing tiers" reference table on the Tiny Place Register tab was hardcoded to "$250 / $50 / $10 per year" for only the 3 / 4 / 5+ char tiers — wrong units (USD, not USDC), wrong amounts, and missing the 1- and 2-char tiers entirely. Users were shown a price bearing no relation to the on-chain x402 amount they were actually charged (tinyhumansai#3825, a billing-integrity issue). Replace it with the authoritative tiny.place per-character tiers (2,000 / 1,000 / 500 / 100 / 1 USDC for 1 / 2 / 3 / 4 / 5+ chars, from `domain-pricing.ts`), hoisted into a single exported `IDENTITY_PRICING_TIERS` source of truth, and add an "indicative only — exact price confirmed at checkout from the on-chain x402 quote" caption (the binding amount is the server-quoted challenge already shown in the confirm dialog). Adds tests pinning the corrected tiers and asserting the old USD format is gone. Closes tinyhumansai#3825
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe Register tab now renders pricing tiers from an exported ChangesHandle pricing tiers
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65e1a76f33
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| { label: '4 chars', example: '@abcd', fee: '$50/yr' }, | ||
| { label: '5+ chars', example: '@abcde', fee: '$10/yr' }, | ||
| ].map(tier => ( | ||
| {IDENTITY_PRICING_TIERS.map(tier => ( |
There was a problem hiding this comment.
Update the stale pricing-tier test
With the Register tab now rendering IDENTITY_PRICING_TIERS, the existing test in app/src/agentworld/pages/IdentitiesSection.test.tsx:217-223 still asserts the old $250/yr, $50/yr, and $10/yr strings. That test will fail on every run because these values are no longer present in the DOM; update or remove the stale assertion alongside this pricing change so the suite can pass.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/agentworld/pages/IdentitiesSection.test.tsx`:
- Around line 1179-1209: The pricing-tier tests in IdentitiesSection.test.tsx
are inconsistent: the older Register-tab assertion still expects the legacy USD
yearly prices, while the new IDENTITY_PRICING_TIERS checks and rendered values
use authoritative USDC amounts. Update the older test to assert the corrected
USDC tiers or remove the obsolete expectations so it matches the new tier data
and the IdentitesSection render behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7c17baa4-7f8a-4ef9-b1d7-55cd256ac284
📒 Files selected for processing (2)
app/src/agentworld/pages/IdentitiesSection.test.tsxapp/src/agentworld/pages/IdentitiesSection.tsx
…ng-tier-mismatch-3825
The pre-existing `renders the pricing tiers` test still asserted the old `$250/yr` / `$50/yr` / `$10/yr` labels that this PR replaced with the authoritative tiny.place USDC tiers, failing Frontend Checks. Assert the new values instead.
…tch-3825' into fix/tinyplace-pricing-tier-mismatch-3825
The "Pricing tiers" reference table on the Tiny Place Register tab was hardcoded to
$250 / $50 / $10per year for only the 3 / 4 / 5+ char tiers — wrong units (USD, not USDC), wrong amounts, and missing the 1- and 2-char tiers — so users saw a price unrelated to the on-chain x402 amount they were actually charged (billing-integrity issue).Replace it with the authoritative tiny.place per-character tiers (2,000 / 1,000 / 500 / 100 / 1 USDC for 1 / 2 / 3 / 4 / 5+ chars, from
domain-pricing.ts), hoisted into a single exportedIDENTITY_PRICING_TIERS, plus an "indicative only — exact price confirmed at checkout from the on-chain x402 quote" caption (the binding amount is the server-quoted challenge already shown in the confirm dialog). Adds tests pinning the corrected tiers and asserting the old USD format is gone.Closes #3825
Summary by CodeRabbit