fix: wallet/trades UX + SEO + commit Next.js 16 routing migration
Pre-launch audit findings (frontend):
- trades: unlock private history in-page. TradesPageClient only read a CACHED
view envelope, so a connected user who hadn't visited Settings first saw
"load settings once to unlock" with no way forward. Added an explicit
"Unlock trade history" button that mints the view envelope via
getOrCreateViewEnvelope (one signature, no gas) and reloads — no detour.
- wagmi: broaden connector from injected({target:'metaMask'}) to generic
injected(). The MetaMask pin made Rabby / Coinbase ext / Brave / Frame / OKX
and non-MetaMask browsers fail to connect. wagmi v2 EIP-6963 discovery covers
all injected wallets; still uses the native provider path (not the MM SDK).
- sitemap: drop /settings. It was emitted in sitemap.xml while robots.ts
disallows it — a self-contradicting crawler signal. Private pages stay out
of both.
- docs: note the app runs on port 3001 (package.json), not 3000. The CLAUDE.md
verify sweep targeted 3000 and would have reported every page as down.
- routing: COMMIT the Next.js 16 migration that was sitting uncommitted —
delete middleware.ts, add root proxy.ts (next-intl createMiddleware), update
next-env.d.ts. Vercel deploys from git, so leaving proxy.ts untracked would
have shipped the old routing. `next build` confirms "Proxy (Middleware)" is
active and all routes compile. tsc clean.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -245,13 +245,15 @@ npx tsc --noEmit
|
||||
# Production build (catches missing pages, stale imports)
|
||||
rm -rf .next && npx next build
|
||||
|
||||
# Dev server
|
||||
# Dev server — NOTE: this app runs on port 3001 (see package.json:
|
||||
# `next dev -p 3001` / `next start -p 3001`), NOT the Next.js default 3000.
|
||||
# Any external doc, script, or healthcheck must target 3001.
|
||||
npm run dev
|
||||
|
||||
# Pages-200 sweep (every locale page returns 200)
|
||||
# Pages-200 sweep (every locale page returns 200) — port 3001
|
||||
for p in /en /en/trump /en/macro /en/kol /en/trades /en/posts /en/settings \
|
||||
/en/methodology /en/glossary /en/case-studies /en/privacy /en/terms; do
|
||||
echo "$p $(curl -so /dev/null -w '%{http_code}' http://localhost:3000$p)"
|
||||
echo "$p $(curl -so /dev/null -w '%{http_code}' http://localhost:3001$p)"
|
||||
done
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user