Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 26 additions & 23 deletions e2e/flows/button-press-physics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
* unit test cannot see this: the bug lives in which state wins in the
* cascade, so it has to be read off computed style in a real browser.
*
* /shhhhh is the target because it renders a real primary and a real secondary
* Button with no caller overrides, and needs no backend. The /dev/ds button
* page would be the obvious home, but every /dev route sits behind a session
* gate that never resolves in this harness, so it stays on "Loading...".
* The setup landing is the target because it renders a real primary (Sign up)
* and a real secondary (Log in) Button with no caller overrides, and needs no
* backend. A help page carries the NavHeader back circle (HeroBackNav). /shhhhh
* served both until it became a redirect (TASK-24171). The /dev/ds button page
* would be the obvious home, but every /dev route sits behind a session gate
* that never resolves in this harness, so it stays on "Loading...".
*
* Run: NEXT_PUBLIC_VERCEL_ENV=preview npm run build && npm run test:e2e:regression
*/
Expand Down Expand Up @@ -73,12 +75,22 @@ async function expectNoHoverFill(el: Locator) {
expect(await background(el), 'no hover fill, so a press fill can only be :active').toBe('rgba(0, 0, 0, 0)')
}

test.describe('Button press physics', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/shhhhh', { waitUntil: 'domcontentloaded' })
// Web signup is app-only; the support keep-web cookie reopens it in this browser.
// Same-origin only: an ipapi.co country would make the setup screens depend on
// the runner's IP and ipapi's rate limit.
async function openSetupLanding(page: Page, baseURL: string) {
await page.context().addCookies([{ name: KEEP_WEB_COOKIE, value: KEEP_WEB_COOKIE_VALUE, url: baseURL }])
await page.route('**/*', (route) => {
const { hostname } = new URL(route.request().url())
return hostname === '127.0.0.1' || hostname === 'localhost' ? route.continue() : route.abort()
})
await page.goto('/setup', { waitUntil: 'domcontentloaded' })
await expect(page.getByRole('button', { name: 'Sign up' })).toBeVisible({ timeout: 60_000 })
}

test('primary keeps its shadow on hover and drops into it on press', async ({ page }) => {
test.describe('Button press physics', () => {
test('primary keeps its shadow on hover and drops into it on press', async ({ page, baseURL }) => {
await openSetupLanding(page, baseURL!)
const primary = pressable(page, 'btn-primary')
await expect(primary).toBeVisible()

Expand All @@ -102,6 +114,7 @@ test.describe('Button press physics', () => {
})

test('the nav circle fills pink on press, and never drops', async ({ page }) => {
await page.goto('/en/help', { waitUntil: 'domcontentloaded' })
// nav board 17802:61534 draws this as a ring on the page background —
// the ghost icon-only button. A shadow here would make the top nav
// move 4px under the thumb, which is not a navigation gesture.
Expand Down Expand Up @@ -129,27 +142,16 @@ test.describe('Button press physics', () => {
}
})

// /shhhhh's back circle is the NavHeader one. The setup flow builds its own
// The help page's back circle is the NavHeader one. The setup flow builds its own
// navigation row, and its circles were the last call site still drawing a
// secondary button with the shadow stripped — a white chip on the #90a8ed
// hero, which is the state the board does not have (kush QA 2026-09-21).
// The first onboarding step's back circle renders that row with no backend and no
// login. (/setup/finish used to, through a log-out circle that moved under
// its primary in the Release 164 smoke-test fixes.)
test('the setup nav circle is a ring on the hero, not a white chip', async ({ page, baseURL }) => {
// web signup is app-only; the support keep-web cookie reopens it in this browser
await page.context().addCookies([{ name: KEEP_WEB_COOKIE, value: KEEP_WEB_COOKIE_VALUE, url: baseURL! }])
// Same-origin only. A country from ipapi.co, with no API to say what that
// country is offered, hides both sell screens, so the step after Welcome
// would depend on the runner's IP and ipapi's rate limit.
await page.route('**/*', (route) => {
const { hostname } = new URL(route.request().url())
return hostname === '127.0.0.1' || hostname === 'localhost' ? route.continue() : route.abort()
})
await page.goto('/setup', { waitUntil: 'domcontentloaded' })
const signUp = page.getByRole('button', { name: 'Sign up' })
await expect(signUp).toBeVisible({ timeout: 60_000 })
await signUp.click()
await openSetupLanding(page, baseURL!)
await page.getByRole('button', { name: 'Sign up' }).click()
await expect(page).toHaveURL(/screen=advantage-fees/)

const circle = page.getByRole('button', { name: 'Go back' })
Expand All @@ -173,7 +175,8 @@ test.describe('Button press physics', () => {
}
})

test('secondary turns brand pink while pressed', async ({ page }) => {
test('secondary turns brand pink while pressed', async ({ page, baseURL }) => {
await openSetupLanding(page, baseURL!)
const secondary = pressable(page, 'btn-secondary')
await expect(secondary).toBeVisible()

Expand Down
13 changes: 9 additions & 4 deletions e2e/flows/card-public.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,17 +379,22 @@ test('a signed-out visitor to /card is redirected to /setup — public access is
await page.waitForURL(/\/setup/, { timeout: 10_000 })
})

test('the public landing opens Google Play with the deferred card destination', async ({ page, context }) => {
test('the legacy /shhhhh link lands on /peanut-card and opens Google Play with the card destination', async ({
page,
context,
}) => {
await stubSignedOutApi(page)
await context.route('https://play.google.com/**', (route) => route.fulfill({ body: 'Store handoff' }))
await page.goto('/shhhhh')
await expect(page.getByRole('heading', { level: 1, name: 'Peanut Card Go Pink.' })).toBeVisible()
await page.goto('/shhhhh?campaign=event-alumni')
await expect(page).toHaveURL(/\/peanut-card\?campaign=event-alumni$/)
await shot(page, 'landing')

const opened = page.waitForEvent('popup')
await page.getByRole('button', { name: 'Get card', exact: true }).first().click()
await page.getByRole('link', { name: 'Get your virtual card' }).first().click()
const store = await opened
await expect(store).toHaveURL(/^https:\/\/play\.google\.com\/store\/apps\/details\?/)
const referrer = new URL(store.url()).searchParams.get('referrer') ?? ''
expect(new URLSearchParams(referrer).get('dest')).toBe('/card')
// The campaign from the old /shhhhh link rides the deferred install.
expect(new URLSearchParams(referrer).getAll('badge_campaign')).toContain('event-alumni')
})
2 changes: 0 additions & 2 deletions e2e/shots/sweep-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ export const EXTRA_APP_ROUTES: OverlayTarget[] = [
{ id: 'route-recover-wallet', route: '/recover-wallet' },
{ id: 'route-card', route: '/card' },
{ id: 'route-card-limit', route: '/card/limit' },
{ id: 'route-card-physical', route: '/card/physical' },
{ id: 'route-card-add-to-wallet', route: '/card/add-to-wallet' },
{ id: 'route-card-recovery', route: '/card-recovery' },
// /points renamed to /rewards — the sweep's redirect skip caught it
Expand All @@ -310,7 +309,6 @@ export const EXTRA_APP_ROUTES: OverlayTarget[] = [
// and add-money fixtures cover those screens' entry states
{ id: 'route-limits-bridge', route: '/limits/bridge' },
{ id: 'route-kyc-success', route: '/kyc/success' },
{ id: 'route-shhhhh', route: '/shhhhh' },
]

/** the four landing pages live outside [locale] */
Expand Down
6 changes: 2 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// ESLint flat config for peanut-ui (Next 16 / React 19 / TypeScript).
// Baseline rules: TypeScript recommended, React recommended, React Hooks, Next.js.
// Plus a project-specific rule banning bare router.back() outside useSafeBack (PR #1965).
Expand Down Expand Up @@ -486,7 +486,6 @@
'src/app/(mobile-ui)/qr-pay/page.tsx',
'src/app/(mobile-ui)/withdraw/page.tsx',
'src/app/lp/card/CardLandingPage.tsx',
'src/app/shhhhh/ShhhhhLandingPage.tsx',
'src/components/AddWithdraw/AddWithdrawCountriesList.tsx',
'src/components/AddWithdraw/AddWithdrawRouterView.tsx',
'src/components/Claim/Link/SendLinkActionList.tsx',
Expand Down Expand Up @@ -548,9 +547,8 @@
'src/app/(mobile-ui)/**/*.tsx',
'src/app/(setup)/**/*.tsx',
// Top-level app routes sit outside the route groups above; without
// them listed the guard cannot see their copy (/shhhhh shipped
// English-only to every locale because of exactly that gap).
'src/app/shhhhh/**/*.tsx',
// them listed the guard cannot see their copy (the old /shhhhh page
// shipped English-only to every locale because of exactly that gap).
'src/app/kyc/**/*.tsx',
'src/app/invite/**/*.tsx',
'src/components/{Home,Send,Request,Profile,Setup,Settings,Card,AddMoney,AddWithdraw,Withdraw,Claim,Payment,Points,Badges,Notifications,Invites,TransactionDetails,Kyc,IdentityVerification,ExchangeRate,Common,ForceIOSPWAInstall,User,Migration}/**/*.tsx',
Expand Down
6 changes: 3 additions & 3 deletions public/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PIX is Brazil's instant payment network — ~150 million people use it daily. No
MercadoPago QR is accepted at 1,000,000+ merchants in Argentina. Locals need a DNI to open an account; Peanut gives access to the payment network without one — pay in pesos with a passport-verified account. Conversion uses the cripto dólar rate (a direct dollar-to-peso market rate that beats the regulated MEP rate cards use), typically several percent to ~11% more pesos per dollar. Free, instant, rate locked at payment.

### The Peanut Card
The Peanut Card is a virtual Visa card for spending your Peanut balance wherever Visa is accepted. Complete identity verification in the app and apply; applications are subject to approval. No monthly or annual fees; a 1% Visa international service assessment applies to cross-currency purchases, and standard fees and limits apply under the cardholder terms. Get your card at https://peanut.me/shhhhh.
The Peanut Card is a virtual Visa card for spending your Peanut balance wherever Visa is accepted. Complete identity verification in the app and apply; applications are subject to approval. No monthly or annual fees; a 1% Visa international service assessment applies to cross-currency purchases, and standard fees and limits apply under the cardholder terms. Get your card at https://peanut.me/peanut-card.

## Core features

Expand Down Expand Up @@ -61,7 +61,7 @@ Send from balance straight to any third-party bank account, and receive into the
- Local QR spending live: Argentina (MercadoPago), Brazil (PIX).
- Bank rails live: 36 SEPA-zone countries (EUR), US (ACH/wire), Mexico (SPEI), GBP (Faster Payments).
- Crypto deposit/withdraw: global, all non-restricted countries.
- Card: apply in the app after identity verification; applications are subject to approval — https://peanut.me/shhhhh
- Card: apply in the app after identity verification; applications are subject to approval — https://peanut.me/peanut-card
- Roadmap (not live): local payment methods in many more countries (CoDi, Transfiya, Yape, Bizum, MB WAY, UPI, and others). Only Argentina and Brazil have live local spending today.

## Who it's for
Expand All @@ -74,6 +74,6 @@ Tourists, digital nomads, expats, remote workers, freelancers, and families movi
- Twitter/X: https://x.com/joinpeanut
- GitHub: https://github.com/peanutprotocol
- LinkedIn: https://www.linkedin.com/company/peanut-trade/
- Peanut Card: https://peanut.me/shhhhh
- Peanut Card: https://peanut.me/peanut-card
- Careers: https://peanut.me/careers
- Support: https://peanut.me/support
6 changes: 3 additions & 3 deletions public/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Peanut is a self-custody money app built on digital dollars (USDC). You hold dol

## The Peanut Card

The Peanut Card is a virtual Visa card for spending your Peanut balance wherever Visa is accepted. Complete identity verification in the app and apply; applications are subject to approval. No monthly or annual fees; a 1% Visa international service assessment applies to cross-currency purchases, and standard fees and limits apply under the cardholder terms. Get your card at https://peanut.me/shhhhh.
The Peanut Card is a virtual Visa card for spending your Peanut balance wherever Visa is accepted. Complete identity verification in the app and apply; applications are subject to approval. No monthly or annual fees; a 1% Visa international service assessment applies to cross-currency purchases, and standard fees and limits apply under the cardholder terms. Get your card at https://peanut.me/peanut-card.

## Send & receive money

Expand Down Expand Up @@ -58,7 +58,7 @@ The Peanut Card is a virtual Visa card for spending your Peanut balance wherever
- **Local QR spending live now:** Argentina (MercadoPago) and Brazil (PIX).
- **Bank deposit/withdraw live:** 36 SEPA-zone European countries (EUR), United States (ACH/wire), Mexico (SPEI), GBP (Faster Payments).
- **Crypto deposit/withdraw:** available globally in all non-restricted countries.
- **Peanut Card:** apply in the app after identity verification; applications are subject to approval — https://peanut.me/shhhhh
- **Peanut Card:** apply in the app after identity verification; applications are subject to approval — https://peanut.me/peanut-card
- **Coming soon (not live):** local QR/payment methods in many more countries — Mexico (CoDi), Colombia (Transfiya), Peru (Yape), Spain (Bizum), Portugal (MB WAY), India (UPI), and others. These are roadmap; only Argentina and Brazil have live local spending today.

## Who it's for
Expand All @@ -72,7 +72,7 @@ Tourists, digital nomads, expats, remote workers, freelancers, and families movi
- Pay with MercadoPago (Argentina): https://peanut.me/en/pay-with/mercadopago
- Brazil guide: https://peanut.me/en/brazil
- Argentina guide: https://peanut.me/en/argentina
- Peanut Card: https://peanut.me/shhhhh
- Peanut Card: https://peanut.me/peanut-card
- Help center: https://peanut.me/en/help
- Careers: https://peanut.me/careers
- Support: https://peanut.me/support
Expand Down
21 changes: 18 additions & 3 deletions redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -1266,9 +1266,24 @@
"destination": "/",
"permanent": true
},
{
"source": "/shhhhh",
"destination": "/peanut-card",
"permanent": true
},
{
"source": "/shhhhh/:path*",
"destination": "/peanut-card",
"permanent": true
},
{
"source": "/card/physical",
"destination": "/card",
"permanent": false
},
{
"source": "/lp/card",
"destination": "/shhhhh",
"destination": "/peanut-card",
"permanent": true
},
{
Expand All @@ -1278,12 +1293,12 @@
},
{
"source": "/sh",
"destination": "/shhhhh",
"destination": "/peanut-card",
"permanent": true
},
{
"source": "/sh/:path*",
"destination": "/shhhhh",
"destination": "/peanut-card",
"permanent": true
},
{
Expand Down
1 change: 0 additions & 1 deletion scripts/ds-lint-counts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ const LEGACY_ALLOW = [
'components/Marketing/',
'components/Jobs/',
'app/lp/',
'app/shhhhh/',
'app/careers/',
'app/jobs/',
'app/m/',
Expand Down
1 change: 0 additions & 1 deletion scripts/screen-wordiness-core.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const EXCLUDED_ROUTE_PREFIXES = [
'app/careers/',
'app/m/',
'app/app/',
'app/shhhhh/',
'app/crisp-proxy/',
'app/(mobile-ui)/quests/',
'app/api/',
Expand Down
5 changes: 0 additions & 5 deletions scripts/screens/capture-catalogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -1885,11 +1885,6 @@
"flow": "Card",
"route": "/card-recovery"
},
{
"id": "p43-card-physical",
"flow": "Card",
"route": "/card/physical"
},
{
"id": "p44-card-add-to-wallet",
"flow": "Card",
Expand Down
34 changes: 0 additions & 34 deletions scripts/screens/copy-coverage-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2323,40 +2323,6 @@
"shhhhh.faq.q8.answer": "No capture state shows this copy yet",
"shhhhh.faq.q8.question": "No capture state shows this copy yet",
"shhhhh.faq.title": "No capture state shows this copy yet",
"shhhhh.hero.cta": "No capture state shows this copy yet",
"shhhhh.hero.disclaimer": "No capture state shows this copy yet",
"shhhhh.hero.lead": "No capture state shows this copy yet",
"shhhhh.hero.pitch": "No capture state shows this copy yet",
"shhhhh.hero.tagline": "No capture state shows this copy yet",
"shhhhh.hero.title": "No capture state shows this copy yet",
"shhhhh.hero.wordmark": "No capture state shows this copy yet",
"shhhhh.howToApply.signInBody": "No capture state shows this copy yet",
"shhhhh.howToApply.signInTitle": "No capture state shows this copy yet",
"shhhhh.howToApply.spendBody": "No capture state shows this copy yet",
"shhhhh.howToApply.spendTitle": "No capture state shows this copy yet",
"shhhhh.howToApply.title": "No capture state shows this copy yet",
"shhhhh.howToApply.verifyBody": "No capture state shows this copy yet",
"shhhhh.howToApply.verifyTitle": "No capture state shows this copy yet",
"shhhhh.marquee.available": "No capture state shows this copy yet",
"shhhhh.marquee.contactless": "No capture state shows this copy yet",
"shhhhh.marquee.noMonthlyFee": "No capture state shows this copy yet",
"shhhhh.marquee.online": "No capture state shows this copy yet",
"shhhhh.marquee.peanutCard": "No capture state shows this copy yet",
"shhhhh.notForYou.body1": "No capture state shows this copy yet",
"shhhhh.notForYou.body2": "No capture state shows this copy yet",
"shhhhh.notForYou.title": "No capture state shows this copy yet",
"shhhhh.ready.disclaimer": "No capture state shows this copy yet",
"shhhhh.ready.subtitle": "No capture state shows this copy yet",
"shhhhh.ready.title": "No capture state shows this copy yet",
"shhhhh.whatItDoes.body": "No capture state shows this copy yet",
"shhhhh.whatItDoes.statAnnualFees": "No capture state shows this copy yet",
"shhhhh.whatItDoes.statBalance": "No capture state shows this copy yet",
"shhhhh.whatItDoes.statMerchants": "No capture state shows this copy yet",
"shhhhh.whatItDoes.statMonthlyFees": "No capture state shows this copy yet",
"shhhhh.whatItDoes.titleLine1": "No capture state shows this copy yet",
"shhhhh.whatItDoes.titleLine2": "No capture state shows this copy yet",
"shhhhh.whoItsFor.body": "No capture state shows this copy yet",
"shhhhh.whoItsFor.title": "No capture state shows this copy yet",
"statements.customPeriod.description": "No capture state shows this copy yet",
"statements.downloaded": "No capture state shows this copy yet",
"statements.downloadedByYear": "No capture state shows this copy yet",
Expand Down
2 changes: 1 addition & 1 deletion scripts/screens/inventory.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { routePatterns, routePatternFor } from './routes.mjs'

const ROUTE_EXCLUSIONS = new Map([
Expand Down Expand Up @@ -59,7 +59,7 @@
const screens = byRoute.get(route) ?? []
const reason =
ROUTE_EXCLUSIONS.get(route) ??
(route.startsWith('/dev') || route === '/shhhhh'
(route.startsWith('/dev')
? 'Developer tooling, outside the app catalogue'
: route.startsWith('/quests') ||
route.startsWith('/[locale]') ||
Expand Down
3 changes: 3 additions & 0 deletions scripts/verify-content.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env tsx
/**
* Comprehensive content verification for peanut-ui.
Expand Down Expand Up @@ -175,6 +175,9 @@
// Bare legal URLs redirect to their localized pages and remain valid links.
routes.add('/privacy')
routes.add('/terms')
// /shhhhh redirects to /peanut-card (TASK-24171). Pinned content still links
// it until mono republishes; the resolver rewrites those links on render.
routes.add('/shhhhh')

// App routes (mobile-ui)
for (const p of [
Expand Down
12 changes: 0 additions & 12 deletions src/app/(mobile-ui)/card/physical/page.tsx

This file was deleted.

Loading
Loading