Port /feedback and /missions into the campaign app - #315
Conversation
Both routes still lived only on optimitron.com and 404'd on warondisease.org. Feedback intake moves to packages/site-kit so any site app can mount the form; the missions page takes only the profile-status slice of Optimitron's dating.server.ts and links profiles, discovery, and messages back to optimitron.com through optimitronUrl(). Copy, form fields, validation, honeypot, and rate limiting are unchanged from the source pages. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Warning Review limit reachedNext included review available in 58 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (10)
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7adaaf747d
ℹ️ 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".
There was a problem hiding this comment.
🟢 Approval recommended
The port closely mirrors the existing Optimitron implementations, and the new site-kit intake + new warondisease routes appear consistent and type-safe with no verified functional or security regressions in the diff.
Pull request overview
Ports the previously optimitron.com-only /feedback and /missions pages into the apps/warondisease campaign app so the menu entries resolve on warondisease.org (instead of 404), while keeping copy, form behavior, and mission-status display aligned with the Optimitron originals.
Changes:
- Added
/missionscampaign page (plus safety notice + minimal server-side status fetch) that links back to optimitron.com for profile/discovery/messages. - Added
/feedbackcampaign page and moved the feedback intake intopackages/site-kitso multiple site apps can reuse it. - Registered both routes for visual-route coverage and campaign search indexing, and added logged-out copy snapshots.
File summaries
| File | Description |
|---|---|
| scripts/site-app-visual-routes.mjs | Registers /missions and /feedback for the public warondisease visual routes list (with covers mapping). |
| packages/site-kit/src/lib/feedback.server.ts | Implements reusable server-side feedback intake that creates a private task under the Optimitron dev parent. |
| apps/warondisease/app/search/campaign-search.server.ts | Adds /missions and /feedback to campaign search documents for discoverability. |
| apps/warondisease/app/missions/page.tsx | Adds the campaign-facing Missions landing page, wrapping in campaign Layout and linking into optimitron.com for deeper flows. |
| apps/warondisease/app/missions/page.logged-out.md | Generated logged-out snapshot for copy/visual review coverage of /missions. |
| apps/warondisease/app/missions/missions.server.ts | Adds the minimal Prisma query needed to show the signed-in user’s mission-profile status. |
| apps/warondisease/app/missions/mission-safety.ts | Ports the mission safety copy and computed daily-deaths figure used in the notice. |
| apps/warondisease/app/missions/mission-safety-notice.tsx | Renders the mission safety notice (compact/full). |
| apps/warondisease/app/feedback/page.tsx | Adds the campaign feedback form page + server action wiring to create feedback tasks. |
| apps/warondisease/app/feedback/page.logged-out.md | Generated logged-out snapshot for copy/visual review coverage of /feedback. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
PR review packetStart here
Agent preflightThe agent checks this only after rerunning the review until every diff is intentional. It resets for each commit.
Human review checklistAgents leave these boxes unchecked. Mike checks them after reviewing the linked evidence.
Changed files considered
Updated automatically when this PR's preview or visual review reruns. |
|
Superseded by #319, which merges this branch with --no-ff so its commits and review threads carry over. |
Summary
/feedbackand/missionswere menu entries that still resolved only on optimitron.com and returned 404 on warondisease.org. This ports both pages intoapps/warondisease. Copy, form fields, validation, and post-submit behavior are unchanged from the source pages.What changed
Feedback
apps/warondisease/app/feedback/page.tsx— the form, wrapped in the campaignLayout. Same fields (message, page URL, email), same lengths, same honeypot, same?sent=1confirmation state.packages/site-kit/src/lib/feedback.server.ts— the intake, moved into site-kit so any site app can mount the form. Uses the site-kit Prisma shim. Optimitron builds the task through its genericcreateTask; this intake has one fixed shape (private, explicit parent, first-admin assignee), so it writes the resolved row directly, the way the other site-kit task writers do. Honeypot rejection, the 20-per-10-minutes global burst limit, URL/email cleaning, the task title prefix, the description template, and thecontextJsonmetadata are all carried over unchanged.Missions
apps/warondisease/app/missions/page.tsx— the landing page, wrapped inLayout.apps/warondisease/app/missions/missions.server.ts— the one slice of Optimitron's 910-linedating.server.tsthis page needs: the visitor's own mission-profile status. Profiles, photos, blocks, matches, and messaging stay on optimitron.com.apps/warondisease/app/missions/mission-safety-notice.tsxandmission-safety.ts— the safety notice and its copy.OPTIMITRON_LINKS/optimitronUrl()frompackages/site-kit/src/lib/optimitron-links.ts.Registration
scripts/site-app-visual-routes.mjs— both routes added topublicSiteAppRoutes.warondisease.apps/warondisease/app/search/campaign-search.server.ts— both pages added toCAMPAIGN_PAGES.page.logged-out.mdsnapshots for both routes viapnpm copy warondisease.packages/site-kit/src/lib/nav-items.tsandsite-config.tsare untouched; the menu is handled separately.Pages to review
The preview root is in the Vercel comment on this PR.
/feedback?logout=1/feedback?sent=1&logout=1— the post-submit confirmation state/missions?logout=1/missions?login=demo— adds the mission-status cardVerification
pnpm --filter @apps/warondisease typecheck— passespnpm --filter @apps/warondisease lint— passespnpm --filter @apps/warondisease test:unit— 19 files, 75 tests, all passpnpm test:site-app-navigation— 19/19 pass🤖 Generated with Claude Code