Skip to content

Citations: Region filter dropdown is permanently empty #598

Closed

Description

@gkhngyk

Problem

The Region filter dropdown on the Citations page is permanently empty — it only ever shows "All Regions". loadData creates const regions = new Set<string>() and never adds anything to it, so the if (regions.size > 0) guard is always false and availableRegions stays [] forever. The select still renders, offering a filter that can never be used.

The filter side works: picking a region (if one existed) would be applied server-side. Only the option discovery is dead.

Evidence

  • citations/page.tsx#L860-L872 — the never-populated Set and the dead regions.size > 0 branch
  • Always-rendered select fed by availableRegions: filter-bar.tsx#L342-L360
  • The overview payload has no region data to read from: citations.ts#L67-L78 (CitationsOverview type) — region is selected from prompt_results in the queries but never aggregated into the response

Suggested fix

Two acceptable scopes — the issue can be closed with either:

  1. Small: hide the Region select when availableRegions is empty (and delete the dead Set), so no unusable control is shown.
  2. Complete: have getCitationsOverview return the distinct regions it already reads from prompt_results, populate availableRegions from that, and keep the select.

Acceptance criteria

  • Either the Region select is hidden when there are no options, or it lists the regions actually observed in the data.
  • No dead regions code path remains.

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