Skip to content

Topics KPI strip: "1 prompts without a topic" pluralization and +4 vs 4.0 pts formatting mismatch #596

Closed

Description

@gkhngyk

Problem

Two small display inconsistencies in the Topics KPI strip:

  1. Pluralization — kpi.unassignedPrompts is a plain interpolation, so a single unassigned prompt renders "1 prompts without a topic". The appearedIn string has the same issue ("Appeared in 1 of 1 prompts").
  2. Decimal formatting — the "Top mover" KPI renders the raw change value (+4 pts), while the leaderboard's Trend column formats the identical value with one decimal (4.0 pts).

Evidence

  • en.json topics block — "unassignedPrompts": "{count} prompts without a topic" and "appearedIn": "Appeared in {visible} of {active} prompts" (no ICU plural)
  • ICU plural precedent already in the same file: "{count, plural, one {# domain} other {# domains}}" (citations block)
  • Raw value: topics/page.tsx#L426 — `${...visibilityChange > 0 ? '+' : ''}${...visibilityChange}`
  • Formatted counterpart: topics/page.tsx#L558 — Math.abs(topic.visibilityChange).toFixed(1)

Suggested fix

Convert the two strings to ICU plural form ({count, plural, one {# prompt} other {# prompts}} etc.) and apply .toFixed(1) to the Top mover value so both surfaces show +4.0 pts.

Acceptance criteria

  • With exactly 1 unassigned prompt, the KPI reads "1 prompt without a topic".
  • The Top mover KPI and the leaderboard Trend column format the same change identically (one decimal).

Activity

  1. added
    bug
    good first issue
    on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions