Skip to content

Fix filtering and add clustering for large-scale environments - #15

Merged
Jackass4life merged 4 commits into
mainfrom
claude/review-existing-issues
Mar 23, 2026
Merged

Fix filtering and add clustering for large-scale environments#15
Jackass4life merged 4 commits into
mainfrom
claude/review-existing-issues

Conversation

@Claude

@Claude Claude AI commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Two open issues reported filter limitations and performance problems with 1000+ locations.

Issue #13: Enhanced Filtering

Added Status and Parent filters to complement existing Type and Tenant filters. All filters now work correctly together:

// Filter logic applies all constraints with AND semantics
const filtered = allLocations.filter((loc) => {
  if (statusVal && loc.status !== statusVal) return false;
  if (typeVal && loc.location_type !== typeVal) return false;
  if (parentVal && loc.parent !== parentVal) return false;
  if (tenantVal && loc.tenant !== tenantVal) return false;
  return true;
});
  • Status filter: Active, Planned, Other (matches legend)
  • Parent filter: Hierarchical location filtering
  • Clear Filters button: Reset all filters at once

Issue #14: Performance Optimization

Implemented grid-based marker clustering for environments with 100+ locations:

const CLUSTER_THRESHOLD = 100;
const gridSize = currentZoom < 5 ? 2 : currentZoom < 8 ? 1 : 0.5;

// Group markers by grid cells at current zoom level
const clusters = {};
for (const loc of locations) {
  const key = `${Math.floor(loc.latitude / gridSize)},${Math.floor(loc.longitude / gridSize)}`;
  if (!clusters[key]) clusters[key] = [];
  clusters[key].push(loc);
}
  • Zoom-adaptive grid sizing: coarser at low zoom, finer at high zoom
  • Interactive cluster markers show location count and list
  • Click clusters to zoom in and reveal individual markers
  • Automatic re-clustering on zoom events
  • Progressive loading indicators with status messages

Zero external dependencies. No breaking changes. All 63 tests pass.

Original prompt

look in to the issues

Claude AI and others added 3 commits March 23, 2026 15:26
- Added Status filter to filter by Active/Planned/Other
- Added Parent location filter for hierarchical filtering
- All four filters (Status, Type, Parent, Tenant) now work together
- Updated tests to verify all filter elements exist
- All 63 tests pass successfully

Co-authored-by: Jackass4life <94110786+Jackass4life@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Jackass4life/Nautobot-maps/sessions/a0e87b75-c988-42b6-bdab-398d68553075
- Implement grid-based clustering for 100+ locations
- Cluster markers automatically adapt to zoom level
- Click clusters to zoom in and see individual markers
- Add progressive loading indicators with status messages
- Optimize rendering with canvas mode (already enabled)
- All 63 tests pass successfully

Co-authored-by: Jackass4life <94110786+Jackass4life@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Jackass4life/Nautobot-maps/sessions/a0e87b75-c988-42b6-bdab-398d68553075
- Add Clear Filters button to reset all filters at once
- Button resets Status, Type, Parent, and Tenant filters
- Improves user experience when exploring different filter combinations

Co-authored-by: Jackass4life <94110786+Jackass4life@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Jackass4life/Nautobot-maps/sessions/a0e87b75-c988-42b6-bdab-398d68553075
@Claude Claude AI changed the title [WIP] Investigate current issues in the project Fix filtering and add clustering for large-scale environments Mar 23, 2026
@Claude
Claude AI requested a review from Jackass4life March 23, 2026 15:29
@Jackass4life
Jackass4life marked this pull request as ready for review March 23, 2026 15:32
@Jackass4life
Jackass4life merged commit 41666d2 into main Mar 23, 2026
3 checks passed
@Jackass4life
Jackass4life deleted the claude/review-existing-issues branch March 24, 2026 07:38
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.

2 participants