Skip to content

Fix a render crash in the Comparison page's percentile gauge - #57

Merged
pacifinance-ops merged 3 commits into
mainfrom
fix/comparison-gauge-arc-crash
Aug 19, 2026
Merged

Fix a render crash in the Comparison page's percentile gauge#57
pacifinance-ops merged 3 commits into
mainfrom
fix/comparison-gauge-arc-crash

Conversation

@alessiospera

Copy link
Copy Markdown
Collaborator

Summary

  • GaugeArc (added by Redesign the Comparison page into an anonymous financial mirror #56) interpolated a styled-components keyframes object into a plain inline style string instead of an actual styled-components tagged template, which styled-components deliberately rejects at runtime. It crashed the whole Comparison page as soon as benchmark consent was on and the gauge had a value to animate - surfaced on the deployed preview as a styled-components error Bump the npm-minor-patch group with 29 updates #12 and a cascade of unrelated-looking downstream failures (manifest fetch, API calls, etc. - all consequences of the React crash, not separate causes).
  • Fix: moved the animation into a real styled.path component (AnimatedArcPath) so the keyframes are interpolated correctly.
  • Added a render smoke test for Comparison (mounting it with demo-realistic data) so this class of runtime-only bug - invisible to lint, types, and pure-function tests - fails a test run instead of only showing up in production.

redesign/comparison-page (#56) was squash-merged and deleted between when the bug was introduced and this fix, so this branches from and targets main directly.

Test plan

  • npm run lint — clean
  • npm test — 1785/1785 passed, including the 2 new render smoke tests
  • npm run build — succeeds

🤖 Generated with Claude Code

GaugeArc interpolated a styled-components keyframes object into a plain
inline style string instead of an actual styled-components template, which
styled-components deliberately rejects at runtime. It crashed the whole
page as soon as benchmark consent was on and the gauge had a value to
animate, surfacing in the browser console as a styled-components error #12
and a cascade of unrelated-looking downstream failures.

Moved the animation into a real styled.path component so keyframes are
interpolated correctly, and added a render smoke test for Comparison so
this class of runtime-only bug - invisible to lint, types, and pure-function
tests - fails a test run instead of only showing up in production.
@alessiospera
alessiospera requested a review from BolleA7X as a code owner August 19, 2026 14:15
@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 2:53pm

…dark-mode info icon

Rebuild the percentile gauge as a full ring instead of a semicircle dome, so
the value centers with plain flexbox instead of a hand-tuned percentage that
never quite lined up. Make clear what the percentages actually mean: the
gauge caption now states the comparison explicitly, and a new line under the
headline chips clarifies that higher is always better, including for
frugality. Fix the "your comparison group" info icon rendering black in dark
mode (no theme-aware color was set). Add the missing "vs. your comparison
group" line to the spending-by-category breakdown, matching every other
accordion section.
… page width

The Comparison gauge caption was missing margin: 0 auto on its max-width box,
so it hugged the left edge of the card instead of centering under the
circular gauge above it.

Insert Data's secondary tools row (CSV/Excel, Ricorrenti, Spese condivise)
was still capped at an old 1000px width on desktop after the page around it
was widened to 1400px, leaving a wide empty strip on the right instead of
aligning with the form card beneath it.
@pacifinance-ops
pacifinance-ops merged commit b5df923 into main Aug 19, 2026
7 of 8 checks passed
@pacifinance-ops
pacifinance-ops deleted the fix/comparison-gauge-arc-crash branch August 19, 2026 14:55
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