Skip to content

AI Traffic: platforms with zero visits in the selected period inflate the Platforms KPI and table #606

Closed

Description

@gkhngyk

Problem

getTrafficSummary builds platformBreakdown from the union of the current and previous window platform maps, so a platform that only had traffic in the previous period is returned with visits: 0. Downstream this:

  • inflates the "Platforms" KPI ("unique AI sources" counts platforms with zero visits in the selected period),
  • adds 0-visit rows with a -100% badge to the "Referrals by Platform" table,
  • while the pie/bar chart on the same screen filters visits > 0 — so the chart and the table/KPI disagree about how many platforms there are.

Evidence

Suggested fix

The union is needed to compute deltas, so keep it in the action — but drop visits === 0 entries from the returned platformBreakdown (or filter at the two render sites). Decide the product behavior explicitly: a platform present yesterday but absent today probably shouldn't count as a current "unique AI source" or occupy a table row at 0 (-100%).

Acceptance criteria

  • The Platforms KPI counts only platforms with ≥ 1 visit in the selected period.
  • The platform table no longer lists 0-visit rows.
  • The KPI, table, and chart agree on the platform count.

Activity

  1. added
    bug
    good first issue
    on Aug 3, 2026
  2. added a commit that references this issue on Aug 3, 2026
    b99a658
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