Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
Solid launch flow improvements. The new dedicated landing page, improved routing, and mobile layout fix all work well together. A few minor observations:
What works well:
- The CalculatorLaunchPage component properly uses design tokens throughout (colors, spacing, typography)
- Text correctly uses sentence case everywhere
- The mobile layout fix in StandardLayout (
tw:max-w-fullon mobile,sm:tw:max-w-[calc(100vw-300px)]on desktop) properly addresses the width bug - The
?scope=householddeep-link pattern withgetPopulationLaunchPrefillis clean and well-tested - Empty state improvements in Reports.page give first-time users clear next steps
- Routing changes (/ → /:countryId → launch page instead of /reports) make sense for a product launch
- IngredientReadView's custom
emptyStateprop is a good pattern - Tests cover the new behavior
Minor observations:
-
In CalculatorLaunchPage.tsx:101, the country fallback (
LAUNCH_CONTENT[countryId] ?? LAUNCH_CONTENT.us) is defensive but countries outside us/uk will see US content. This seems acceptable for now since only those two are defined. -
The removed "Title Section" in IngredientReadView.tsx (lines 84-97 in the diff) means the title now only appears in the header area. The test confirms this renders exactly once, which is correct.
-
StandardLayout.tsx:59 - the responsive max-width pattern looks correct: mobile gets full width, desktop gets sidebar-aware width. The ordering matters here (mobile-first, then
sm:override).
The PR achieves its stated goals: better first-run experience, SPM-focused framing, faster household path, and mobile layout fix. No bugs, edge cases, or security issues found.
What changed
This PR makes the calculator behave like a launchable poverty-analysis product instead of an internal saved-reports shell.
/to/:countryIdinstead of dropping new users directly into saved reports?scope=householdWhy
The previous first-run experience was weak for launch:
User impact
Validation
cd app && bun run vitest --run src/tests/unit/components/IngredientReadView.test.tsx src/tests/unit/pages/Reports.page.test.tsx src/tests/unit/pathways/population/launchPrefill.test.tsbun run --filter=@policyengine/calculator typecheckcd app && bun run typecheckbun run --filter=@policyengine/calculator build/,/us,/us/households/create?scope=household, and/us/reportson desktop and narrow mobile viewport