Skip to content

Redesign the Comparison page into an anonymous financial mirror - #56

Merged
pacifinance-ops merged 2 commits into
mainfrom
redesign/comparison-page
Aug 19, 2026
Merged

Redesign the Comparison page into an anonymous financial mirror#56
pacifinance-ops merged 2 commits into
mainfrom
redesign/comparison-page

Conversation

@alessiospera

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the Comparison page's dense, always-visible stat grids with a narrative, progressive-disclosure "financial mirror": a hero percentile gauge and plain-language headline insight up front, everything else (cashflow, savings rate, assets, spending, behavior) tucked behind an accordion. Drop confirmed-dead code (Leaderboard import, renderLegacyRankingsTab, motivational popup) along the way.
  • Add a real "compare by country" view, built on the existing custom-cohort endpoint with the location factor isolated — no backend changes needed — plus a "Region & city" placeholder that's honest about not collecting that data yet.
  • All underlying percentile/cohort/privacy calculation logic (including MIN_COHORT, benchmark_consent, and getBenchmarkOptInCopy) is unchanged — this is a presentation-layer rewrite.
  • Update comparison.* i18n keys across all 6 locales, remove translation keys that became orphaned once the dead code was dropped, and extend todo.md/roadmap with the geographic-comparison follow-ups (region/city profile field, clickable map, location/job change simulator).

Test plan

  • npm run lint — 0 errors (121 pre-existing warnings elsewhere, none in touched files)
  • npm test — 105 files / 1783 tests passed, including Comparison.optInCopy.test.js, translationCompleteness.test.js, translationUnusedKeys.test.js
  • npm run build — succeeds
  • Manual check on the PR preview: hero gauge + insight, accordion expand/collapse, cohort factor customizer, the new "Per Paese" view, geography "coming soon" card, dark/light mode, mobile width

🤖 Generated with Claude Code

…a new by-country view

Replace the dense always-visible stat grids and dead legacy-rankings/motivational-popup
code with a narrative, progressive-disclosure layout: a percentile gauge and plain-language
headline insight up front, everything else tucked behind an accordion. Add a compare-by-country
view built on the existing custom-cohort endpoint, and a Region & city placeholder with a clear
roadmap toward a future clickable map and location/job change simulator. All underlying
percentile/cohort/privacy logic is unchanged.
@alessiospera
alessiospera requested a review from BolleA7X as a code owner August 19, 2026 12:30
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pacifinance Ready Ready Preview Aug 19, 2026 1:50pm

… redesigned Comparison page

Custom comparison cohorts now broaden themselves when the exact requested
factor combination has too few matches, dropping household then life stage
then career while never touching geography, and always tell the user which
factors the result actually used. The main comparison also shows a running
"X of N people so far" count while the community is still small.

The public demo account previously hit the opt-in wall and, for the factor
customizer, "compare by country" and behaviour sections, called endpoints
that don't exist without a real backend. It now ships with consent already
granted, realistic cohort/population numbers, and mocked responses for those
endpoints - including a demo-only preview of the new relaxation behavior.
@pacifinance-ops
pacifinance-ops merged commit c4c9077 into main Aug 19, 2026
7 of 8 checks passed
@pacifinance-ops
pacifinance-ops deleted the redesign/comparison-page branch August 19, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants