chore: remove the /quests growth-campaign surface (TASK-22082) - #2908
Conversation
The quests campaign is over. Delete the route tree (src/app/quests/**), the quests API service, and every inbound reference: seo-route-policy, dedicated-routes list, support-context prefixes, native-build exclusions, locale-switcher docs/tests, landing-page comments, and the now-orphaned EN_LANDING_STRINGS export. /quests and /quests/* now redirect to / so campaign links in the wild land safely (/devconnect follows). quests last existed at a3a7ed2. To restore: git checkout a3a7ed2 -- src/app/quests src/services/quests.ts (plus revert the reference edits in this commit). Claude-Session: https://claude.ai/code/session_01LkJHBTT8SiJLfHe7T4wm17
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code-analysis diffPainscore total: 7153.05 → 7076.86 (-76.19) 🆕 New findings (2)
✅ Resolved (43)
…and 23 more. 📈 Painscore deltas (top movers)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
There was a problem hiding this comment.
Chip review — changes requested
Request changes: retiring /quests breaks existing campaign links when opened as native App Links; web redirects and the remaining deletion are otherwise sound.
Findings
- MAJOR · src/constants/routes.ts:33 · Keep the retired route out of native recipient routing
Native App Links do not use redirects.json; deepLinkToNativePath classifies paths through RESERVED_ROUTES. After this deletion, https://peanut.me/quests maps to /profile/view?username=quests, while /quests/example maps to /send?recipient=quests%2Fexample, so campaign links opened in the installed app bypass the intended homepage redirect. Keep quests reserved and add an explicit native retirement mapping (for example /home) with exact and nested-path tests.
Checked clean
- HEAD and merge base matched the supplied SHAs; PR author, base, and metadata matched the trusted request.
- Web redirects parse correctly and cover exact and nested /quests paths.
- The quest route tree, API service, exports, SEO entries, support context, locale test row, and native-build exclusions were removed without live imports.
- Native App Link and catch-all classification were evaluated at the exact head; the surviving defect is reported above.
- Security review found no new external redirect, secret exposure, authorization change, or money or data mutation.
- Required CI aggregate, unit, typecheck, ESLint, format, design-system lint, and deploy preview checks succeeded; ds-shots was still running.
- The slop pass found only inert ESLint allowlist entries for three deleted quest files beyond the reported runtime defect.
Second opinion skipped: daily-budget-reached.
Exact head: 8abc11b6cb03 · Context: repo
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
…slint entries Chip review: native App Links classify paths through RESERVED_ROUTES, not redirects.json — with 'quests' unlisted, peanut.me/quests read as a recipient username in the installed app. Reserve it in STATIC_REDIRECT_ROUTES (the list for redirect-handled slugs), so the native mapper returns null and the in-app browser opens the web URL, which redirects home. Tests cover exact and nested paths. Also remove the eslint allowlist entries for three deleted quest files. Claude-Session: https://claude.ai/code/session_01LkJHBTT8SiJLfHe7T4wm17
Readiness reportWhat & why: removes the finished /quests growth-campaign surface — route tree, service, orphans, all inbound refs. −1330 LoC.
Parked for Kush's own review — no reviewer requested, do not merge from automation. |
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
The quests surface is removed cleanly. Prior finding P1 is fixed: retired quests links remain reserved and no longer enter native recipient routing.
Checked clean
- Pinned head, supplied base, merge base, trusted author, and dev target all matched.
- Prior finding P1 is fixed: quests moved from DEDICATED_ROUTES to STATIC_REDIRECT_ROUTES, and native exact and nested links now return null with regression coverage.
- Web redirects cover /quests, /quests/:path*, and /devconnect without a redirect chain.
- Deleted pages, components, service code, and live references were removed; generated API snapshots and point-in-time audit data remain intentionally unchanged.
- SEO, locale-switcher, native-build, support-context, demo, and ESLint cleanup matched the removed surface.
- Exact-head analyze and review CI checks passed; the preview deployment was still running when checked.
Second opinion by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only, so treat its findings as advice.
Third opinion by claude-opus: 0 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.
Exact head: e98d4f053043 · Context: repo
Chip review — no blocking findings — this is not an approvalThe quests surface is removed cleanly. Prior finding P1 is resolved: retired quests links remain reserved and cannot enter native recipient routing. Checked clean
Second opinion by Third opinion by Exact head: |
Summary
The quests growth campaign is over. This PR removes the /quests surface from peanut-ui entirely: the route tree, the quests API service, and every inbound reference. Pure deletion — 30 files, ~+35/−1330.
Task
TASK-22082 — https://app.notion.com/p/3ce83811757981719552f04078b611da
What was removed
src/app/quests/**(15 files): pages (list, explore + loading,[questId]), layout, components (QuestCard, QuestsHero, QuestLeaderboard, UserRankCard, QuestArrowCta, QuestHeroDecoration), hooks (useQuests), constants, types, footer test.src/services/quests.ts— orphaned by the deletion (only consumer wasuseQuests).EN_LANDING_STRINGSexport inlandingStrings.ts— orphaned (only consumer was the quests page).seo-route-policy.js(noindex + robots-disallow lists),constants/routes.tsDEDICATED_ROUTES,support-context.tsidentifier prefixes,scripts/native-build.jsexport exclusions, locale-switcher doc comment + test row, friendly-error test row, stale comments (Manteca, PartnerLockup, landingContentHrefs, demo-api).Redirects (decision)
Campaign links to /quests may exist in the wild, so instead of letting them 404:
/questsand/quests/:path*→/(non-permanent, inredirects.json)/devconnect(previously →/quests) →/STATIC_REDIRECT_ROUTES(the list for redirect-handled slugs). The deep-link mapper returns null and the in-app browser opens the web URL, which redirects home — same behavior as every other retired slug (/pints,/foodie). Exact + nested-path tests added.Deliberately kept
src/types/api.generated.ts/api.openapi.jsonkeep the/quests/*endpoints — they mirror the backend openapi snapshot and are gated bycheck:api. Removing them here would create drift.src/app/(mobile-ui)/dev/ds/audit/**) mention quests file paths in prose/data — they are point-in-time audit records, not live references.Other flags
engineering/qa/ui/scenarios.mjs— nothing to prune there.product/rewards.md,content/help/rewards-*,content/blog/rewards-v2-the-receipts/*. Legal (content/legal/) verified clean — pure surface deletion, no data-flow change.Cross-repo note
GET /quests/leaderboardsandGET /quests/{questId}/leaderboard. No FE consumer remains after this PR. Backend removal is a separate peanut-api-ts task — not bundled here.Recovery
quests last existed at
a3a7ed22f1de6a64a1b6add866a85c99029a07ba(the parent of the deletion commit). To restore:plus revert the reference edits this PR makes.
Full deleted-file list
QA
npm run typecheckclean,npm test392 suites / 4984 passed,npm run buildgreen,pnpm prettier --check .clean.node scripts/ds-lint-counts.mjs --check— ratchet ok, counts dropped (rawHex 65→61, rawHexFiles 41→37, stockTextSize 362→275, nonDsClassesInViews 138→122, useSearchParamsFiles 47→44). Baseline json untouched.src/,e2e/, config) — no visual change to any remaining screen.Screenshots: N/A (pure deletion; no surviving surface changes)