Skip to content

fix(web): pluralize day/mention counts in metric breakdown sheet - #602

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/insights-metric-breakdown-pluralization
Aug 3, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/insights-metric-breakdown-pluralization

Conversation

@d180

@d180 d180 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes hardcoded plural strings in the Insights metric breakdown sheet. The default 24h date preset resolves to windowDays === 1, so the subtitle read "Last 1 days vs previous 1 days" instead of "Last 1 day vs previous 1 day". Similarly, a mentions delta of exactly 1 rendered "gained 1 mentions"/"lost 1 mentions" instead of the singular form. Both strings now pluralize based on the count, matching the existing pattern used elsewhere on the page (page.tsx:773).

Related issue

Closes #586

Type of change

  • fix — Bug fix

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix, matches the existing pluralization pattern exactly. Thanks!

@gkhngyk
gkhngyk merged commit 335c557 into ansvisor:main Aug 3, 2026
4 checks passed
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.

Insights: metric breakdown sheet reads "Last 1 days vs previous 1 days" on the default 24h view

2 participants