AntFleet

Disagreement · de288601-openai-0

Possible hydration mismatch risk from using Number.toLocaleString() without a fixed locale

solo GPT-5
repo e24ef98c·PR #7·reviewed 2 weeks ago

GPT-5 finding

Possible hydration mismatch risk from using Number.toLocaleString() without a fixed locale

mediumbughigh
  • apps/web/app/activity/ActivityView.tsx
Client components are server-rendered in Next.js. Number.toLocaleString() without an explicit locale may format differently between server and client environments (e.g., comma vs dot thousands separator), causing hydration mismatch warnings and visible flicker. The file explicitly avoids date mismatches but leaves number formatting locale-dependent.

Recommendation

Use a deterministic formatter across SSR and client, e.g., Intl.NumberFormat('en-US').format(value), or pass preformatted strings from the server. Alternatively, explicitly pass a fixed locale to toLocaleString, e.g., value.toLocaleString('en-US').

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →