feat: Peanut Welcome Club onboarding quiz (static HTML in public/)#2471
Conversation
The Welcome-@anon handbook's real pitfalls (comms rules, urgency hierarchy, task ownership, DoD, sick/weekend policy, security, invoicing) as a 23-question quiz, so new joiners actually retain them. Single self-contained file in public/ per the quiz paved path: zero deps, zero build-graph impact. Linked from /dev with a plain <a> (public/ files aren't app routes). Prettier-ignored like dev-quiz: hand-tuned inline CSS/JS.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a standalone “PEANUT WELCOME CLUB” onboarding quiz with scoring, animations, results, and share-card generation. The Dev Tools page links to it using standard navigation for the public static file, and Prettier ignores the quiz directory. ChangesOnboarding quiz
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant DevToolsPage
participant Browser
participant QuizRuntime
participant ShareCanvas
participant Clipboard
DevToolsPage->>Browser: Open Peanut Welcome Club link
Browser->>QuizRuntime: Load static quiz page
QuizRuntime->>Browser: Render questions and update score
Browser->>QuizRuntime: Submit answers and finish run
QuizRuntime->>ShareCanvas: Render result card
ShareCanvas->>Clipboard: Copy generated PNG when supported
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Code-analysis diffPainscore total: 6233.83 → 6233.08 (-0.75) 🆕 New findings (2)
✅ Resolved (2)
📈 Painscore deltas (top movers)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@public/onboarding-quiz/index.html`:
- Around line 538-587: Update the fallback branch in shareCard so feedback
targets the button corresponding to mode: when mode is 'copy', update btnCopy
after the fallback download; otherwise retain btnDl for download mode. Preserve
the existing download behavior and reset the same button’s label after the
timeout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 457d12bb-e448-4cc3-a7ce-bc2c90a6d032
📒 Files selected for processing (3)
.prettierignorepublic/onboarding-quiz/index.htmlsrc/app/(mobile-ui)/dev/page.tsx
Safari drops transient user activation across the awaited toBlob, so clipboard.write always rejected and COPY silently became a download — construct the ClipboardItem synchronously around the Promise<Blob>. Guard the null-blob path (createObjectURL(null) threw uncaught and killed both buttons), defer revokeObjectURL past the download fetch, skip petal-rain repaints while the tab is hidden, and derive the boot banner count from QUESTIONS.length.
Summary
The Welcome-@anon handbook's real pitfalls — comms rules (zero follow-ups, @silent, SHIFT+reply), thread hygiene, task ownership, Definition of Done, sick/weekend policy, security, invoicing, referral tree — as a 23-question quiz so new joiners actually retain them. Questions curated + approved by Konrad from the Notion onboarding pages.
Follows the quiz paved path (same engine as the dev-quiz PR #2465, reskinned "ironically kawaii"): ONE self-contained static HTML file in
public/onboarding-quiz/— zero deps, zero build-graph impact, served ungated atpeanut.me/onboarding-quiz/index.htmlafter prod release.public/onboarding-quiz/index.html— the quiz (23 Qs: 7 easy / 8 mid / 8 hard, levels, points, streaks, clown option, retry-missed, 1080×1080 share card)/devindex — new entry withstatic: true→ plain<a>(public/ files aren't app routes). Mechanism is line-identical to feat(dev): funnel-definitions quiz — 1337 squ1rr3l squ4d (single static HTML) #2465's so both merge cleanly..prettierignore—public/onboarding-quiz/(hand-tuned inline CSS/JS)Risks / breaking changes
None. Static file copied at deploy; no bundle/build-graph impact. Only app-code change is the
/devtools list. Content is internal-handbook material, intentionally world-readable (no secrets, no sensitive numbers).QA
Headless playwright against the static file, 375px + 1280px:
Local gate: prettier ✅ · typecheck ✅ (0 errors in changed files; pre-existing @capacitor TS2307s are the known stale-worktree-env artifact) · jest: 3 pre-existing failing suites untouched by this diff (countryCurrencyMapping, GeneralRecipientInput, request-states) — CI is the arbiter.
Summary by CodeRabbit
New Features
Chores
Design notes / accepted trade-offs