Skip to content

fix(web): populate the Citations Region filter from observed data - #622

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/citations-region-filter-options
Aug 3, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/citations-region-filter-options

Conversation

@d180

@d180 d180 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The Region filter dropdown on the Citations page was permanently empty — loadData created a Set<string> for regions and never added anything to it, so the dropdown only ever showed "All Regions".
  • getCitationsOverview already selects region from prompt_results while scanning the filtered window, but discarded it before it reached the client.
  • getCitationsOverview now collects the distinct, non-null regions it observes and returns them as availableRegions on CitationsOverview.
  • The page's loadData now populates availableRegions state from that field instead of the dead local Set, using the same accumulate-and-sort merge already used for platform options.

Related issue

Closes #598

Type of change

  • fix — Bug fix

Checklist

  • Branch follows the naming convention (fix/)
  • 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.

Nice — piggybacking on the existing scan keeps this zero-cost, and the accumulate-and-merge keeps options stable while a region filter is active. Thanks!

@gkhngyk
gkhngyk merged commit 6debfb2 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.

Citations: Region filter dropdown is permanently empty

2 participants