Skip to content

Troubleshoot map display with new data source#3

Draft
fchen13 wants to merge 2 commits intomainfrom
cursor/troubleshoot-map-display-with-new-data-source-95ec
Draft

Troubleshoot map display with new data source#3
fchen13 wants to merge 2 commits intomainfrom
cursor/troubleshoot-map-display-with-new-data-source-95ec

Conversation

@fchen13
Copy link
Owner

@fchen13 fchen13 commented Aug 8, 2025

Introduces a debug-enhanced WireMaps.html and a data comparison utility to diagnose issues with EBP network data files not displaying maps.


Open in Cursor Open in Web

Summary by Sourcery

Introduce debugging tools for the EBP network map by adding a debug-enhanced HTML page with data validation panels and filters, and a standalone JavaScript utility for comparing and diagnosing differences between two data files.

New Features:

  • Add WireMaps.html "Debug Version" page with live data-loading checks, interactive filter panel, and map rendering debug logs
  • Add debug_data_comparison.js utility to compare two EBP network data files, summarize structural differences, and report data quality issues

Co-authored-by: lori.chenfang <lori.chenfang@gmail.com>
@cursor
Copy link

cursor bot commented Aug 8, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@sourcery-ai
Copy link

sourcery-ai bot commented Aug 8, 2025

Reviewer's Guide

Introduces a debug‐enhanced map HTML template (WireMaps.html) with real‐time loading diagnostics and interactive filtering, plus a new JavaScript utility (debug_data_comparison.js) to compare and validate EBP network data files

Class diagram for the new data comparison utility

classDiagram
    class DataComparisonResults {
      +summary: object
      +differences: string[]
      +issues: string[]
    }
    class compareDataFiles {
      +compareDataFiles(data1, data2, fileName1, fileName2)
    }
    class validateDataStructure {
      +validateDataStructure(data, fileName, results)
    }
    class findDataIssues {
      +findDataIssues(data, fileName)
    }
    class getTypeCounts {
      +getTypeCounts(data)
    }
    compareDataFiles --|> validateDataStructure
    compareDataFiles --|> findDataIssues
    compareDataFiles --|> getTypeCounts
    compareDataFiles --> DataComparisonResults
Loading

Class diagram for the debug-enhanced map display logic

classDiagram
    class WireMaps {
      +debugDataLoading()
      +initMap(worldJson)
      +updateVisualization()
      +updateHeadquartersVisibility(centerVisible)
    }
    class FilteredData {
      +name: string
      +type: string
      +latitude: number
      +longitude: number
      +visible: boolean
      +rawData: object
    }
    class AggregatedData {
      +name: string
      +type: string
      +value: array
      +itemStyle: object
      +rawData: object
    }
    WireMaps --> FilteredData
    WireMaps --> AggregatedData
Loading

File-Level Changes

Change Details Files
Debug‐enhanced map interface and data loading diagnostics
  • Added debug panel with real‐time data loading checks
  • Implemented debugDataLoading to validate structure, fields and coordinates
  • Integrated filter panel UI with event‐driven map updates
  • Enhanced initMap with error fallback, logging and dynamic source selection
source files/WireMaps.html
Data comparison utility for EBP network data files
  • Implemented compareDataFiles to produce summary, field diffs and project comparisons
  • Added validateDataStructure and findDataIssues for field, coordinate and duplicate checks
  • Auto-ran comparison on load when both data sets are present and exposed functions globally
source files/debug_data_comparison.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Co-authored-by: lori.chenfang <lori.chenfang@gmail.com>
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