Repository navigation
feat(editor): show counts next to every filter dropdown option, for the region or nationwide - #168
Merged
Merged
Conversation
…he region or nationwide Industry, Feature Type, Aquifer Type and Well classification now show how many entities each option would find: in the selected state or counties, or nationwide with none. Each count is the run's own count step with the filter left open (buildOptionCountQuery), so it checks the region exactly as the run does. Hancock wells: 7,296, where a subdivision-only count gave 11,644. Live queries on federation, cached for the session, no stored values. Measured 2026-11-17: 1.8s or less everywhere except Illinois aquifers cold (30s). Closes #165
|
🚅 Deployed to the explorer-app-pr-168 environment in sawgraph-explorer
1 service not affected by this PR
|
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #165
Summary
Every filter dropdown now counts its options, for the block's region or nationwide with none. A count is the run's own count step with the filter left open, so it checks the region exactly as the run does.
buildIndustryCountsQuery/useIndustryCountsare removed (they skipped the #145 facility region check).Evidence
Before: Hancock wells counted by subdivision link alone: 11,644. The run finds 7,296.
After: the count uses the run's check. Hancock Maine bedrock wells: 7,236 (live, 2026-11-17).
Before: Feature Type in Maine showed no numbers.
After (read from the running app):
Tests (
npm test: 638 passed,query-shapes.txtunchanged):Live cost (first run,
federation): 1.8s or less for every type, nationwide and for ME, Hancock, IL. Exception: Illinois aquifers cold took 30.1s (0.46s rerun; the run's own count step for that block took 25.8s cold), so the first open there may show no numbers.npm run buildpasses.npm run lint: the 15 pre-existing errors, none new.Merge Danger
Door: two-way
No stored data, no cache key or wire change, and no change to the SPARQL any question sends. Revert restores the old dropdowns.
Blast Radius: editor dropdowns
Opening a filter panel now sends one count query per type and region per session to
federation(two for Surface Water, which counts water bodies and flowlines together). Wiki "Industry counts" page is retitled "Option counts" (same file, links unchanged).