Skip to content

chore: back-merge main → dev (post badge-platform, 2026-08-07) - #2643

Open
Hugo0 wants to merge 5 commits into
devfrom
chore/backmerge-main-into-dev-20260807b
Open

chore: back-merge main → dev (post badge-platform, 2026-08-07)#2643
Hugo0 wants to merge 5 commits into
devfrom
chore/backmerge-main-into-dev-20260807b

Conversation

@Hugo0

@Hugo0 Hugo0 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Second back-merge today — the badge-platform UI work (#2613) merged straight to main after the first one, which made the release PR #2642 dirty.

Conflict: src/types/api.openapi.json and src/types/api.generated.ts. Both are generated artifacts, and both sides added endpoints — FX on dev, badges on main. Hand-merging either would have dropped one side's paths, so instead the openapi snapshot was replaced with the merged backend openapi.json (which already carries both) and pnpm gen:api regenerated the types.

Verified: /fx/rate and the badge paths are both present, typecheck clean, 2890 tests pass.

0xkkonrad and others added 5 commits August 5, 2026 15:24
Settle typed campaign claims across invite, signup, and send-link paths; preserve published links and normal-app fallbacks; and honor badge capabilities independently of public/internal provenance.
badge.utils.ts carried 48 hand-written badge-code -> asset-path entries, a
parallel catalog that could drift from the backend silently. It now reads
src/types/badge-assets.json, generated from the API badge catalog.

That turns the existing "every fallback asset is checked in" test into the UI
half of a cross-repo contract: peanut-api-ts CI asserts the manifest still
matches its catalog, and this test asserts every path in it resolves to a real
file. Adding a badge without its artwork now fails CI in the repo that can fix
it, without API CI needing a checkout of this repo — which would have forced
the API to merge before the UI and inverted the rollout order.

utm_campaign values are still forwarded, but the backend now resolves only its
own dated aliases (today just `offramp`, expiring 2026-09-07). A marketing link
can no longer mint a badge as a side effect.

Regenerates the vendored OpenAPI snapshot and client: badge claims no longer
return 503, so the readiness error shape is gone.
main is 247 commits ahead of this branch's base and shipped two things that
overlap it: a full i18n pass, and Konrad's own root-domain/stackable-campaign
work (3e7dda6), which solved the same problem this platform replaces. 21
conflicts. GitHub was not running CI at all while the PR was CONFLICTING.

campaign-maps.ts stays deleted — its multi-campaign resolution is superseded
by badge-campaign-context + the typed claim queue. But three things it carried
would have been lost silently, and are preserved:

- comma-separated campaign values (`?campaign=a,b`). Our parser only read
  repeated params, so a published CSV link would have awarded just the first
  badge. Split at the URL boundary only: a stored queue identity may itself
  contain a comma and must round-trip unchanged.
- the root-domain redirect's dead-bare-link guard, retargeted at the badge
  campaign namespace.
- 42 per-badge `shareLine` strings, now their own frontend-owned map. Share
  copy is first-person English presentation and deliberately not backend
  catalog data, which owns third-person descriptions.

InvitesPage had reverted to hardcoded English for its CTA, login label, title
and description. main localized all four, and the existing invites keys map
exactly — a bare badge-campaign link is the localized vanity-claim case.

useZeroDev keeps emitting the singular `campaign_tag` alongside the plural so
the INVITE_ACCEPTED funnel does not step at deploy.

Typecheck clean, prettier clean, 2,820 tests passing across 222 suites.
feat(badges): consume the capability platform, generate the asset map
…into-dev-20260807b

# Conflicts:
#	src/types/api.generated.ts
#	src/types/api.openapi.json
@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview Aug 7, 2026 5:09pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a4151327-1157-45ba-a5b0-059fac7e7817

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 7093.99 → 7141.94 (+47.95)
Findings: +23 net (+482 new, -459 resolved)

🆕 New findings (482)

  • critical complexity — src/components/Claim/Link/Initial.view.tsx — CC 214, MI 50.68, SLOC 730
  • critical complexity — src/app/(mobile-ui)/card/page.tsx — CC 132, MI 56.25, SLOC 514
  • critical complexity — src/components/Claim/Link/views/BankFlowManager.view.tsx — CC 110, MI 46.95, SLOC 425
  • critical complexity — src/services/badge-campaigns.ts — CC 91, MI 60.16, SLOC 240
  • critical complexity — src/components/Invites/JoinWaitlistPage.tsx — CC 84, MI 56.04, SLOC 293
  • critical complexity — src/components/Invites/InvitesPage.tsx — CC 79, MI 54.61, SLOC 196
  • critical complexity — src/hooks/useHomeCarouselCTAs.tsx — CC 67, MI 57.4, SLOC 295
  • critical complexity — src/components/Card/share-asset/shareAssetLayout.ts — CC 57, MI 47.09, SLOC 266
  • critical complexity — src/utils/deferred-link.ts — CC 55, MI 58.06, SLOC 204
  • high structural-dup — types/api.generated.ts:139 — 72 duplicate lines / 269 tokens with types/api.generated.ts:10018
  • high structural-dup — types/api.generated.ts:139 — 70 duplicate lines / 264 tokens with types/api.generated.ts:10104
  • high structural-dup — types/api.generated.ts:139 — 67 duplicate lines / 249 tokens with types/api.generated.ts:9695
  • high structural-dup — types/api.generated.ts:11107 — 61 duplicate lines / 188 tokens with types/api.generated.ts:11209
  • high structural-dup — types/api.generated.ts:9640 — 55 duplicate lines / 162 tokens with types/api.generated.ts:9792
  • high structural-dup — types/api.generated.ts:9640 — 55 duplicate lines / 162 tokens with types/api.generated.ts:9963
  • high structural-dup — types/api.generated.ts:9640 — 55 duplicate lines / 165 tokens with types/api.generated.ts:10221
  • high complexity — src/app/shhhhh/ShhhhhLandingPage.tsx — CC 48, MI 56.68, SLOC 304
  • high complexity — src/components/Claim/useClaimLink.tsx — CC 48, MI 56.17, SLOC 266
  • high complexity — src/components/Invites/badge-campaign-context.ts — CC 48, MI 63.25, SLOC 171
  • high hotspot — src/app/(mobile-ui)/card/page.tsx — 46 commits, +1099/-487 lines since 6 months ago

…and 462 more.

✅ Resolved (459)

  • src/components/Claim/Link/Initial.view.tsx — CC 213, MI 50.68, SLOC 731
  • src/app/(mobile-ui)/card/page.tsx — CC 132, MI 56.28, SLOC 513
  • src/components/Claim/Link/views/BankFlowManager.view.tsx — CC 110, MI 46.92, SLOC 426
  • src/components/Invites/JoinWaitlistPage.tsx — CC 80, MI 56.7, SLOC 278
  • src/hooks/useHomeCarouselCTAs.tsx — CC 67, MI 57.33, SLOC 297
  • src/components/Invites/InvitesPage.tsx — CC 62, MI 56.54, SLOC 163
  • src/components/Card/share-asset/shareAssetLayout.ts — CC 57, MI 47.1, SLOC 266
  • src/utils/deferred-link.ts — CC 56, MI 58.15, SLOC 204
  • types/api.generated.ts:139 — 72 duplicate lines / 269 tokens with types/api.generated.ts:9701
  • types/api.generated.ts:139 — 70 duplicate lines / 264 tokens with types/api.generated.ts:9787
  • types/api.generated.ts:139 — 67 duplicate lines / 249 tokens with types/api.generated.ts:9378
  • types/api.generated.ts:10790 — 61 duplicate lines / 188 tokens with types/api.generated.ts:10892
  • types/api.generated.ts:9323 — 55 duplicate lines / 162 tokens with types/api.generated.ts:9475
  • types/api.generated.ts:9323 — 55 duplicate lines / 162 tokens with types/api.generated.ts:9646
  • types/api.generated.ts:9323 — 55 duplicate lines / 165 tokens with types/api.generated.ts:9904
  • src/components/Claim/useClaimLink.tsx — CC 47, MI 56.31, SLOC 264
  • src/app/shhhhh/ShhhhhLandingPage.tsx — CC 46, MI 56.95, SLOC 285
  • src/app/(mobile-ui)/card/page.tsx — 45 commits, +1098/-487 lines since 6 months ago
  • src/components/Badges/badge.utils.ts — 42 commits, +462/-120 lines since 6 months ago
  • src/context/authContext.tsx — 37 commits, +199/-141 lines since 6 months ago

…and 439 more.

📈 Painscore deltas (top movers)

File Before After Δ
src/services/badge-campaigns.ts 0.0 9.1 +9.1
src/services/post-auth-redirect.ts 0.0 7.1 +7.1
src/components/Invites/badge-campaign-context.ts 0.0 6.8 +6.8
src/services/invite-response.ts 0.0 5.5 +5.5
src/services/invite-acquisition.ts 0.0 5.2 +5.2
src/components/Badges/BadgeImage.tsx 0.0 4.8 +4.8
src/services/acquisition-navigation.ts 0.0 3.9 +3.9
src/app/shhhhh/shhhhh-acquisition.ts 0.0 3.5 +3.5
src/services/registration-acquisition.ts 0.0 3.2 +3.2
src/app/actions/invites.ts 6.8 9.6 +2.8
src/services/invites.ts 7.7 9.2 +1.5
src/components/Invites/InvitesPage.tsx 12.3 13.7 +1.4
src/hooks/useZeroDev.ts 9.1 8.5 -0.6
src/hooks/useLogin.tsx 9.0 8.3 -0.6
src/hooks/useAccountSetup.ts 10.6 9.6 -1.1
src/components/Badges/badge.utils.ts 12.4 11.2 -1.2
src/components/Invites/campaign-maps.ts 8.8 0.0 -8.8

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 2893 ran, 0 failed, 0 skipped, 34.4s

📊 Coverage (unit)

metric %
statements 66.1%
branches 50.8%
functions 56.0%
lines 66.8%
⏱ 10 slowest test cases
time test
2.3s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
0.6s src/utils/__tests__/demo-api.test.ts › isDemoMode() is false when not running under Capacitor
0.4s src/i18n/app/__tests__/messages.test.ts › every es-419 message compiles and formats
0.3s src/utils/__tests__/sentry.utils.test.ts › defaults to the client budget under a browser global
0.3s src/app/(mobile-ui)/withdraw/__tests__/withdraw-states.test.tsx › Bank withdrawal keeps the $1 minimum for sub-$1 amounts
0.3s src/utils/__tests__/sentry.utils.test.ts › still lets a per-call timeoutMs win over the default
0.2s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › every sticker stays within canvas at any count
0.2s src/components/Request/__tests__/request-states.test.tsx › API failure shows error message and toast
0.2s src/utils/__tests__/auth-token.test.ts › authReady does not park — hydrates the plain token without an unlock
0.2s src/utils/__tests__/auth-token.test.ts › ignores the guarded marker and falls back to the plain token
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants