fix(card): remove hardcoded-stats rejection-share captions#2486
Conversation
The numbers-flex caption in the appeal-tweet pool hardcoded the original '213 tried, 7 got in' placeholder, so shared tweets contradicted the rejection screen itself, which already renders the real computeDoorTally counts. Build the pool per share from the same tally so the two surfaces always agree.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughRejection sharing now generates captions from the current applicant and admitted tallies. The caption pool formats applicant counts for en-US display, and the rejection screen passes the computed tally into caption selection. Jest coverage verifies dynamic values, formatting, and pool compatibility. ChangesRejection caption flow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Code-analysis diffPainscore total: 6230.89 → 6231.57 (+0.68) |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Konrad's call: rather than interpolating the live tally into the share
caption, remove the fake-stats caption entirely ('213 tried, 7 got in')
and de-number 'rejection #1' → 'my first rejection'. A no-digits test
locks the invariant so stat-flavored captions can't sneak back in.
Summary
The "Tweet to appeal" caption pool on the card rejection screen included captions with hardcoded fake stats that contradict the live door tally the screen itself renders. Removed rather than templated:
Single-file diff. (Earlier revisions of this PR interpolated the live tally and added a caption test suite — both superseded/removed; final diff is
rejectionCaptions.tsonly.)Risks / breaking changes
None. Pool shrinks 25 → 24;
pickRejectionCaption()unchanged; single consumer (CardRejectionScreen).QA
npx jest src/components/Card— 112 tests green.🤖 Generated with Claude Code