Follow-up: /people/[id] redesign + conversion-loss fixes#82
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR redesigns the person profile experience as a campaign/treaty profile centered on suffering prevention and referral sharing, extends the parameter model with medical toolchain and war trial redirect costs, and unifies the "forward message" theme across all email and web surfaces to emphasize preventing suffering and disease. ChangesCampaign Profile Redesign & Parameter Model Extensions
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes The PR spans multiple interconnected systems (parameter model, person profile rendering, data fetching, messaging/copy, UI components) with significant logic density in the person profile redesign and parameter calculations. While changes are largely cohesive and well-organized by feature, the variety of files affected (data layer, page components, server helpers, email templates, UI components) and the semantic complexity of campaign profile detection and treaty status computation demand careful review across several domains. Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Preview deploy — one-click review linksLatest preview: https://optimitron-ogmwdhaoc-mike-p-sinns-projects.vercel.app
|
35e0b92 to
712a68f
Compare
…+ roadmap Carries over from PR #81 working tree: - /people/[id] redesigned as a conversion surface (Codex bpf2z3avk): face + 1-line trust signal + hours-prevented social-proof big number + primary CTA (SIGN if not signed / FORWARD MY REFERRAL if signed) + below-fold public signatures and public campaign tasks. Reuses SufferingPreventedMetric extracted from SignatoriesLeaderboard. - SignatoriesLeaderboard: extract SufferingPreventedMetric as a shared export so /people/[id] can reuse the same visual treatment. - tasks.server.ts: add personTaskProfilePersonSelect fragment for the /people/[id] data fetch (Person + referendumVotes + recruited count). - parameters-calculations-citations.ts: add reference parameters for medical-toolchain historical budgets (HGP, OWS, CRISPR NIH funding, HITECH EHR, Brain Initiative, PCORnet) and corporate-damages prosecutor gross-exposure parameters (aging intake, disease DALY, medical misallocation, pleading exposure total). - e2e/utils/visual-routes.ts + scripts/build-visual-review.mjs: register /people/mike for visual review. - NotificationPreferencesCard: add data-testid affordance for e2e selectors. - TODO.md: P1 Person/Org Conversion Surfaces roadmap (5 follow-up PRs) per Mike's 2026-05-15 brainstorm. Known follow-up scope in this branch: - /donate above-fold sticky CTA on iPhone (cold-stranger finding) - /endorse grant calculator jargon trim (cold-stranger finding) - /plaintiffs 1949 wrongful-death cutoff section (Mike's framing, 1913+36yr-eradication math) - Humanity Manager promotion lead: 'Forward this message.' -> 'Forward this message to everyone you don't want to suffer and die of horrible diseases.' (Mike's wording) - Referral-impact overcount fix: split own-hours vs referral-credit on /people/[id] Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…m, /plaintiffs 1949 cutoff, Humanity Manager wording Four parallel Codex agents responding to Mike's 2026-05-16 brief and the cold-stranger audit findings: - /donate (bpekodvr5): sticky above-fold DONATE button on iPhone so strangers don't bounce before reaching the calculator - /endorse (btxqar798): OrganizationGrantCalculator restructure — gloss the jargon labels (MESSAGE REACH %, SURVEY RESPONSE RATE %, MEMBER SHARING LIFT, GRANT $ PER RESPONSE) with plain-English subtitles OR collapse them behind a Show assumptions disclosure, leading with the grant total + lives-saved summary - /plaintiffs (bcoercnkx): new wrongful-death cutoff section anchored to 1949 (1913 + 36yr counterfactual eradication if treaty existed at fed-reserve-era cumulative military spending). Anyone who died of disease after 1949 = wrongful death plaintiff by government negligence. Math anchored to manual declaration-of-optimization page - Humanity Manager (bmhu7h78h): heading update from "Forward this message." to "Forward this message to everyone you don't want to suffer and die of horrible diseases." (Mike's verbatim). Test assertion in email-screenshots.spec.ts updated to new phrase. Snapshot regens propagated through /signatories + post-vote-share.email.md + monthly-chain-digest.email.md Incidental: TreatyPostVoteShareFlow.tsx parameter import refactor (NUCLEAR_OVERKILL_SPARE_LAYERS -> FLOW_WASTEFUL_APOCALYPSES). NOT INCLUDED: blrse53o8 referral-overcount split (Mike 2026-05-16: "We're not trying to win Math olympiad. If it requires everyone to be in agreement then everyone is potentially responsible for the entirety of the prevented suffering." — keep single big number per /people/[id] page, no split). qa-passed: each Codex verified locally (copy:preview / email:preview-md / tsc --noEmit where applicable). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codex stop-review flagged that bcoercnkx defined CORPORATE_DAMAGES_COUNTERFACTUAL_ERADICATION_START_YEAR and CORPORATE_DAMAGES_COUNTERFACTUAL_ERADICATION_YEAR inline in plaintiffs/page.tsx, contradicting the canonical source-of-truth at parameters-calculations-citations.ts. Per CLAUDE.md (grep parameters-calculations-citations before typing a number), every parameter lives in the central file. Moved both parameters next to the existing CORPORATE_DAMAGES_* cluster. plaintiffs/page.tsx now imports them via @optimitron/data/parameters like every other parameter on the page. Math unchanged: 1913 (Fed-era anchor) + round(35.96) = 1949 (counterfactual eradication year). qa-passed: tsc --noEmit exit 0. copy:preview regen of /plaintiffs produced no diff (rendered output identical). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This reverts commit c77de32.
…iers), inclusive cutoff Mike 2026-05-16: I just want you to check parameters, calculations and citations and be using the best parameters that we currently have in there because we recently regenerated it. Replaces the inline-defined CORPORATE_DAMAGES_COUNTERFACTUAL_ERADICATION_* pair (1913 + 1949) that bcoercnkx shipped earlier with the canonical regenerated params from the data team: - WAR_TRIAL_REDIRECT_DISEASE_PLEADING_CUTOFF_YEAR = 1950 (disease cutoff) - WAR_TRIAL_REDIRECT_AGING_PLEADING_CUTOFF_YEAR = 1990 (aging cutoff, ~40yr after disease per geroscience lag) Headline now addresses both classes: "IF SOMEONE YOU LOVE DIED OF DISEASE IN OR AFTER 1950, OR AGING IN OR AFTER 1990, IT IS WRONGFUL DEATH." The IN OR AFTER wording is INCLUSIVE of the cutoff year (stop-review caught that bare AFTER would exclude 1950/1990 deaths themselves). Section reordered ABOVE the register-plaintiff form so the moral case hits before the field labels. Math paragraph trimmed: "The cited math counts the time to build medical tools and clear the treatment queue, then puts the disease line at 1950. Aging gets about 40 more years and lands at 1990; biology was harder, not innocent." Closer "It is wrongful death." matches the headline. Inline START_YEAR/YEAR constants deleted; imports from @optimitron/data/parameters. qa-passed: tsc --noEmit clean. /plaintiffs snapshot regen confirms new inclusive wording. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
712a68f to
88b16f6
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/data/src/parameters/parameters-calculations-citations.ts (1)
9071-9101: 💤 Low valueNote: Negative lower bounds in confidence intervals for count/year quantities.
WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_YEARShas CI[-6.0, 59.0]andWAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_PLAINTIFFShas a negative lower bound. This is mathematically consistent with uncertainty propagation (if the cutoff year exceeds the end year in extreme scenarios), but consumers should clamp to zero if using these bounds in calculations that require non-negative values.Not a blocking issue since it's a modeling characteristic, not a code defect.
🤖 Prompt for 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. In `@packages/data/src/parameters/parameters-calculations-citations.ts` around lines 9071 - 9101, The confidenceInterval lower bounds for the count/year parameters WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_YEARS and WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_PLAINTIFFS can be negative; update their definitions so the lower bound is clamped to zero (i.e., set the first element of confidenceInterval to 0 or compute Math.max(0, currentLower) when constructing these Parameter objects) to ensure downstream consumers that expect non-negative bounds receive valid ranges; update both WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_YEARS and WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_PLAINTIFFS accordingly.
🤖 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 `@packages/web/src/lib/tasks.server.ts`:
- Around line 67-73: The referendumVotes where-clause currently filters votes by
answer, deletedAt, isPublic and voteSource but does not exclude votes whose
parent referendum is deleted; update both referendumVotes where objects in
packages/web/src/lib/tasks.server.ts to include referendum: { deletedAt: null }
so only votes tied to non-deleted referendums are counted (apply this change to
the two occurrences around the referendumVotes definitions so the
VotePosition.YES/Self filters continue to work but now also verify the parent
referendum is not deleted).
---
Nitpick comments:
In `@packages/data/src/parameters/parameters-calculations-citations.ts`:
- Around line 9071-9101: The confidenceInterval lower bounds for the count/year
parameters WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_YEARS and
WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_PLAINTIFFS can be negative; update their
definitions so the lower bound is clamped to zero (i.e., set the first element
of confidenceInterval to 0 or compute Math.max(0, currentLower) when
constructing these Parameter objects) to ensure downstream consumers that expect
non-negative bounds receive valid ranges; update both
WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_YEARS and
WAR_TRIAL_REDIRECT_POST_CUTOFF_AGING_PLAINTIFFS accordingly.
🪄 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: a034c5df-fc09-4646-b4ff-0ecb846ba4b7
📒 Files selected for processing (20)
TODO.mdpackages/data/src/parameters/parameters-calculations-citations.tspackages/web/e2e/email-screenshots.spec.tspackages/web/e2e/utils/visual-routes.tspackages/web/scripts/build-visual-review.mjspackages/web/src/app/donate/page.tsxpackages/web/src/app/endorse/page.logged-out.mdpackages/web/src/app/people/[id]/page.logged-out.mdpackages/web/src/app/people/[id]/page.tsxpackages/web/src/app/plaintiffs/page.logged-out.mdpackages/web/src/app/plaintiffs/page.tsxpackages/web/src/app/signatories/page.logged-out.mdpackages/web/src/components/dashboard/NotificationPreferencesCard.tsxpackages/web/src/components/landing/TreatyPostVoteShareFlow.tsxpackages/web/src/components/organizations/OrganizationGrantCalculator.tsxpackages/web/src/components/referendum/SignatoriesLeaderboard.tsxpackages/web/src/lib/email/monthly-chain-digest.email.mdpackages/web/src/lib/email/post-vote-share.email.mdpackages/web/src/lib/humanity-manager-promotion-content.tsxpackages/web/src/lib/tasks.server.ts
💤 Files with no reviewable changes (1)
- packages/web/src/app/people/[id]/page.logged-out.md
There was a problem hiding this comment.
Pull request overview
Follow-up work on the campaign conversion surfaces, primarily refining the /people/[id] public profile into a campaign-focused “trust + impact + CTA” page and tightening related conversion copy/UX across donate/endorse/plaintiffs flows.
Changes:
- Refactors
/people/[id]into a campaign profile (impact metric, referral forwarding CTA, public signatures, and campaign task highlights), plus supporting data fetch/select changes. - Updates conversion messaging and UI across Humanity Manager promo/email templates, donate sticky CTA (mobile), endorse grant calculator (accordion assumptions), and plaintiffs page framing/cutoff section.
- Extends parameter catalog with new medical-toolchain and corporate-damages parameters/citations; adjusts treaty share-flow placeholder wiring.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| TODO.md | Adds roadmap notes for Person/Org conversion-surface follow-ups. |
| packages/web/src/lib/tasks.server.ts | Extracts a reusable Prisma PersonSelect for person task profile data, adding votes + user counts. |
| packages/web/src/lib/humanity-manager-promotion-content.tsx | Updates promo headline copy. |
| packages/web/src/lib/email/post-vote-share.email.md | Updates email headline copy. |
| packages/web/src/lib/email/monthly-chain-digest.email.md | Minor formatting tweak (line-wrapping). |
| packages/web/src/components/referendum/SignatoriesLeaderboard.tsx | Extracts SufferingPreventedMetric component for reuse. |
| packages/web/src/components/organizations/OrganizationGrantCalculator.tsx | Moves assumptions under an accordion; reshapes intro + swaps KPI ordering. |
| packages/web/src/components/landing/TreatyPostVoteShareFlow.tsx | Switches nuclear-overkill placeholder value source to FLOW_WASTEFUL_APOCALYPSES. |
| packages/web/src/components/dashboard/NotificationPreferencesCard.tsx | Adds data-testid for testing. |
| packages/web/src/app/signatories/page.logged-out.md | Updates logged-out headline copy. |
| packages/web/src/app/plaintiffs/page.tsx | Adds wrongful-death cutoff section + anchor CTA; imports new parameters. |
| packages/web/src/app/plaintiffs/page.logged-out.md | Mirrors wrongful-death cutoff section in logged-out markdown. |
| packages/web/src/app/people/[id]/page.tsx | Major redesign of the public person page into a campaign conversion surface. |
| packages/web/src/app/people/[id]/page.logged-out.md | Removes some 404 copy lines. |
| packages/web/src/app/endorse/page.logged-out.md | Updates grant-calculator copy and adds “Show assumptions” heading. |
| packages/web/src/app/donate/page.tsx | Adds a mobile sticky “Donate” jump CTA and anchor for the calculator. |
| packages/web/scripts/build-visual-review.mjs | Adds a seeded /people/mike route to visual review ordering. |
| packages/web/e2e/utils/visual-routes.ts | Adds /people/mike to seeded visual routes. |
| packages/web/e2e/email-screenshots.spec.ts | Updates expected email text for visual coverage. |
| packages/data/src/parameters/parameters-calculations-citations.ts | Adds new medical-toolchain + corporate-damages parameters/citations; removes NUCLEAR_OVERKILL_SPARE_LAYERS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88b16f68ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code reviewNon-sanctioned CSS variable on public campaign headings `[font-family:var(--v0-font-libre-baskerville)]` is applied to three public campaign headings in `packages/web/src/app/people/[id]/page.tsx` (the ` ` and two `` elements). The `v0-` prefix identifies this as a variable generated by v0.dev — it is not in the sanctioned treaty CSS variable list defined in CLAUDE.md.CLAUDE.md rule (Visual Style Rules):
The three affected elements are:
Suggested fix: remove the No other issues found. Checked for bugs and CLAUDE.md compliance. |
Code reviewTwo confirmed CLAUDE.md violations. No bugs found. Issue 1 —
|
Summary
Follow-up to #81. Picks up the uncommitted /people/[id] redesign + conversion-loss fixes the cold-stranger audit surfaced.
Currently committed
In-flight Codex (will append commits)
bpekodvr5/donate above-fold sticky CTA on iPhonebtxqar798/endorse grant calculator jargon trimbcoercnkx/plaintiffs 1949 wrongful-death cutoff section (Mike's framing)bmhu7h78hHumanity Manager lead line update ('Forward this message to everyone you do not want to suffer and die of horrible diseases.')Still to dispatch
Diff against main
This branch is based on PR #81's HEAD. Until #81 merges, the diff shows both branches' commits together. Will rebase cleanly onto main after #81 merges.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Updates