feat: advertise supported networks, tokens and bank rails in landing FAQ#2338
Conversation
Users comparing cards can't find which chains/stables we support without signing up (X thread 2026-07-02 — reviewers literally said they look for this in the FAQ and bounce when it's missing). Renders the answer from the same rhino.consts the add-money Choose Network drawer uses, so the public claim can never drift from what the app actually accepts; plain-text answer feeds the FAQPage JSON-LD for SEO.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR adds support for rich JSX FAQ answers via a new optional ChangesSupported Rails FAQ Feature
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
Code-analysis diffPainscore total: 5840.84 → 5854.51 (+13.67) 🆕 New findings (17)
✅ Resolved (14)
📈 Painscore deltas (top movers)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Fiat rails now live once in FIAT_RAILS (chips + JSON-LD prose both derive from it), Solana/Tron chips derive from OTHER_SUPPORTED_CHAINS, token chips reuse getSupportedTokens' logoUrl, chainDisplayName moves to a utils file per export rules, withSupportedRails wraps in one place, and the FAQ array is memoized (LandingPageClient re-renders per scroll frame).
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
src/constants/faq.consts.ts (1)
24-24: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueGrammar edge case if a third "other" chain is added.
OTHER_SUPPORTED_CHAINS.map(chainDisplayName).join(' and ')reads fine for exactly two items ("Solana and Tron") but would read incorrectly for three or more (e.g. "Solana and Tron and X" instead of an Oxford-comma list). Low priority since the array currently has 2 entries, but worth a defensive fix if this list is expected to grow.🤖 Prompt for 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. In `@src/constants/faq.consts.ts` at line 24, The OTHER_CHAIN_LIST formatting in faq.consts.ts only joins items with "and", which breaks grammar if OTHER_SUPPORTED_CHAINS grows beyond two entries. Update the constant built from OTHER_SUPPORTED_CHAINS.map(chainDisplayName) to use a list formatter that handles 2+ items correctly, with the fix centered on OTHER_CHAIN_LIST so future additions produce a proper Oxford-comma style string.src/components/LandingPage/SupportedRailsFaqAnswer.tsx (1)
35-37: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSame drift risk for the token summary line.
USDC & USDT on every network · ETH on EVM networks · Tron is USDT-onlyis hardcoded prose describing token support, while the chips above are rendered dynamically fromgetSupportedTokens('EVM'). If token support changes, this summary text won't automatically reflect it. Lower risk than the chain list above since token support changes less frequently, but the same single-source principle applies.🤖 Prompt for 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. In `@src/components/LandingPage/SupportedRailsFaqAnswer.tsx` around lines 35 - 37, The token summary line in SupportedRailsFaqAnswer is hardcoded and can drift from the dynamically rendered chips driven by getSupportedTokens('EVM'). Update this paragraph to derive its wording from the same token source/config used for the chips, so changes to token support are reflected automatically. Keep the summary logic co-located with the existing supported-token rendering in SupportedRailsFaqAnswer and avoid maintaining a separate manual prose string.src/lib/landingContent.ts (1)
59-64: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePosition-based insertion is fragile; empty-array branch is dead code.
withSupportedRailsrelies on the last array element always being the "not here" catch-all by convention — if content ordering ever changes, the FAQ lands in the wrong spot silently. Also, thequestions.length === 0special case is redundant: the general-caseslicelogic already produces the same[SUPPORTED_RAILS_QUESTION]result for an empty array.♻️ Simplify by removing the dead branch
function withSupportedRails(questions: LandingContent['faqData']['questions']) { - if (questions.length === 0) return [SUPPORTED_RAILS_QUESTION] return [...questions.slice(0, -1), SUPPORTED_RAILS_QUESTION, ...questions.slice(-1)] }🤖 Prompt for 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. In `@src/lib/landingContent.ts` around lines 59 - 64, The withSupportedRails helper in landingContent.ts inserts SUPPORTED_RAILS_QUESTION by assuming the last FAQ item is always the catch-all, and its empty-array branch is redundant. Simplify the function by removing the questions.length === 0 special case and rely on the existing slice-based insertion for all inputs, while keeping the SUPPORTED_RAILS_QUESTION placement logic in withSupportedRails clear and maintainable.
🤖 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 `@src/components/LandingPage/SupportedRailsFaqAnswer.tsx`:
- Around line 18-21: The paragraph copy in SupportedRailsFaqAnswer is hardcoding
“plus Solana and Tron,” which can drift from the supported-chain source of
truth. Update the text to derive the non-EVM chain names from the same
OTHER_SUPPORTED_CHAINS data used by faq.consts.ts, using chainDisplayName (or an
equivalent shared formatter) instead of a fixed string. Keep the wording in sync
with any future additions or removals from OTHER_SUPPORTED_CHAINS so the rich UI
and plain-text answer stay aligned.
In `@src/lib/landingContent.ts`:
- Around line 48-69: The supported-rails FAQ entry is hardcoded in English
because SUPPORTED_RAILS_QUESTION is created once at module load and inserted by
withSupportedRails for every locale. Update getLandingContent and/or
withSupportedRails so the supported-rails question and answer are selected per
locale, using a locale-aware lookup like readLandingContent rather than the
module-level constants. Keep the insertion behavior by SUPPORTED_RAILS_FAQ_ID,
but ensure non-en locales receive localized text instead of the English-only
SUPPORTED_RAILS_FAQ_QUESTION and SUPPORTED_RAILS_FAQ_ANSWER.
---
Nitpick comments:
In `@src/components/LandingPage/SupportedRailsFaqAnswer.tsx`:
- Around line 35-37: The token summary line in SupportedRailsFaqAnswer is
hardcoded and can drift from the dynamically rendered chips driven by
getSupportedTokens('EVM'). Update this paragraph to derive its wording from the
same token source/config used for the chips, so changes to token support are
reflected automatically. Keep the summary logic co-located with the existing
supported-token rendering in SupportedRailsFaqAnswer and avoid maintaining a
separate manual prose string.
In `@src/constants/faq.consts.ts`:
- Line 24: The OTHER_CHAIN_LIST formatting in faq.consts.ts only joins items
with "and", which breaks grammar if OTHER_SUPPORTED_CHAINS grows beyond two
entries. Update the constant built from
OTHER_SUPPORTED_CHAINS.map(chainDisplayName) to use a list formatter that
handles 2+ items correctly, with the fix centered on OTHER_CHAIN_LIST so future
additions produce a proper Oxford-comma style string.
In `@src/lib/landingContent.ts`:
- Around line 59-64: The withSupportedRails helper in landingContent.ts inserts
SUPPORTED_RAILS_QUESTION by assuming the last FAQ item is always the catch-all,
and its empty-array branch is redundant. Simplify the function by removing the
questions.length === 0 special case and rely on the existing slice-based
insertion for all inputs, while keeping the SUPPORTED_RAILS_QUESTION placement
logic in withSupportedRails clear and maintainable.
🪄 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: 50618662-1d9d-4289-92d7-6aaa4d9fd35d
📒 Files selected for processing (6)
src/components/Global/FAQs/index.tsxsrc/components/LandingPage/LandingPageClient.tsxsrc/components/LandingPage/SupportedRailsFaqAnswer.tsxsrc/constants/faq.consts.tssrc/lib/landingContent.tssrc/utils/chain-display.utils.ts
Summary
Prospective users comparing cards look for supported networks/tokens in the FAQ and bounce when it's missing (X thread 2026-07-02, @0xPumbi/@ddgn — Hugo promised a fix). Adds a rich "Which networks, tokens and banks does Peanut support?" entry to the landing FAQ (
/and/lp):rhino.consts— the same constants the add-money Choose Network drawer uses, so the public claim can't drift from what the app accepts (9 EVM chains one-address, Solana, Tron; USDC/USDT + ETH on EVM, Tron USDT-only).ChainChip) renders in the panel. Inserted before the "My question is not here" catch-all.Risks / breaking changes
Global/FAQsgains an optionalanswerContentprop — all other consumers (quests, merchant LP, card LP, mdx) unchanged.main(marketing timing) → needs main→dev back-merge after merge.QA
npm test1660 passed · typecheck clean ·next buildgreen./.