Skip to content

fix(card): space in physical-waitlist position copy ("#16on" → "#16 on")#2311

Merged
Hugo0 merged 1 commit into
mainfrom
hotfix/card-waitlist-position-space
Jun 29, 2026
Merged

fix(card): space in physical-waitlist position copy ("#16on" → "#16 on")#2311
Hugo0 merged 1 commit into
mainfrom
hotfix/card-waitlist-position-space

Conversation

@Hugo0

@Hugo0 Hugo0 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

The physical-card waitlist "joined" state renders "You are #16on the list" (missing space) in production. Confirmed live on both peanut.me and staging.peanut.me — the shipped bundle is ["You are #", position, "on the list…"] with no leading space.

The source looks correct (#{data.position} on the list, space on the same line), and:

  • prettier enforces that literal space (it reverts an explicit {' '} back to a literal space), and
  • a clean @next/swc compile of the current source keeps the space.

So the live no-space output is a stale build artifact, not a source bug. This fix sidesteps the whole class of problem by moving the sentence into a template literal — the space becomes a literal character inside one JS string, immune to JSX whitespace handling, and the module change guarantees a fresh compile (no stale-artifact reuse). Matches the existing template-literal pattern in JoinWaitlistPage.tsx.

Risk

Minimal. One-line, copy-only change in PhysicalCardScreen.tsx; no logic, props, imports, or types touched. data.position is interpolated identically; ' → literal ' inside the template string renders the same apostrophe.

QA

Load /card/physical as a user already on the physical-card waitlist → the joined state should read "You are #16 on the list." (space present). Verifiable on staging once back-merged to dev.

Back-merge

Staging shows the same bug, so after this lands on main it should be back-merged to dev.

…e literal

The "You are #N on the list" copy ships to prod AND staging as
`["You are #", position, "on the list…"]` — no leading space — so it
renders "You are #16on the list". The source has a same-line space
(prettier enforces it and reverts `{' '}`), and a clean next-swc compile
keeps the space, so the live no-space bundle is a stale build artifact.
A template literal bakes the space into one JS string (immune to JSX
whitespace handling) and changes the module so the stale artifact can't
be reused. Matches the existing pattern in JoinWaitlistPage.tsx.
@vercel

vercel Bot commented Jun 29, 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, Comment Jun 29, 2026 3:40pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1f9b488d-b3e0-4a64-ad68-b3769aeeb9f9

📥 Commits

Reviewing files that changed from the base of the PR and between 9de604b and e187dcc.

📒 Files selected for processing (1)
  • src/components/Card/PhysicalCardScreen.tsx

Walkthrough

A single line in PhysicalCardScreen.tsx is updated to replace a manually split string with an HTML ' entity with a template literal that interpolates data.position.

Changes

Waitlist Message Fix

Layer / File(s) Summary
Template literal in waitlist message
src/components/Card/PhysicalCardScreen.tsx
Replaces the hardcoded split string using ' with a template literal that interpolates data.position directly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the PR's main fix: correcting the missing space in the physical-card waitlist copy.
Description check ✅ Passed The description directly explains the same copy fix and the stale-build context, so it is clearly on-topic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

@github-actions

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 1618 ran, 0 failed, 0 skipped, 26.4s

📊 Coverage (unit)

metric %
statements 54.5%
branches 37.1%
functions 42.3%
lines 54.4%
⏱ 10 slowest test cases
time test
3.7s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
0.5s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › every sticker stays within canvas at any count
0.4s src/app/actions/__tests__/api-headers-extended.test.ts › should not include apiKey in updateUserById body
0.3s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in updateUserById
0.1s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › Manteca PIX form ready shows merchant card + amount input + pay button
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid 9-digit US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle maximum length (17 digits) US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle too long for US account
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle valid US account with spaces
0.1s src/components/Global/GeneralRecipientInput/__tests__/GeneralRecipientInput.test.tsx › should handle minimum length (6 digits) US account
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@github-actions

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 5851.3 → 5851.46 (+0.16)
Findings: 0 net (+2 new, -2 resolved)

🆕 New findings (2)

  • medium complexity — src/components/Card/PhysicalCardScreen.tsx — CC 11, MI 61.21, SLOC 46
  • low high-mdd — src/components/Card/PhysicalCardScreen.tsx:22 — PhysicalCardScreen: MDD 12.0 (uses across many lines from declarations)

✅ Resolved (2)

  • src/components/Card/PhysicalCardScreen.tsx — CC 11, MI 61.43, SLOC 46
  • src/components/Card/PhysicalCardScreen.tsx:22 — PhysicalCardScreen: MDD 12.1 (uses across many lines from declarations)

@Hugo0 Hugo0 marked this pull request as ready for review June 29, 2026 15:54
@Hugo0 Hugo0 merged commit ee38e7d into main Jun 29, 2026
22 of 24 checks passed
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.

1 participant