Skip to content

Troubleshoot wireMaps display issue with new database#2

Draft
fchen13 wants to merge 1 commit intomainfrom
cursor/troubleshoot-wiremaps-display-issue-with-new-database-6838
Draft

Troubleshoot wireMaps display issue with new database#2
fchen13 wants to merge 1 commit intomainfrom
cursor/troubleshoot-wiremaps-display-issue-with-new-database-6838

Conversation

@fchen13
Copy link
Owner

@fchen13 fchen13 commented Aug 7, 2025

Add a new HTML debug tool to diagnose issues with EBPnetwork database files for WireMaps.

This tool helps identify common problems such as incorrect variable declaration, data type mismatches (e.g., latitude/longitude as strings), missing required fields, or invalid 'type' values, which prevent the map from displaying data.


Open in Cursor Open in Web

Summary by Sourcery

Add a standalone HTML-based debug tool to diagnose and fix issues in EBPnetwork database files used by WireMaps.

New Features:

  • Add a Database Debug Tool HTML page for diagnosing WireMaps EBPnetwork database files
  • Include JavaScript syntax testing and projectsData array validation for required fields and types
  • Provide data comparison against an expected schema and display recommended fixes

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

cursor bot commented Aug 7, 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 7, 2025

Reviewer's Guide

This PR introduces a new standalone HTML debug tool (debug_database.html) that provides an interactive UI and JavaScript logic to identify and diagnose common issues in EBPnetwork database files for WireMaps, including syntax errors, structural inconsistencies, type mismatches, and offers schema comparisons and fix suggestions.

Class diagram for the debug tool's main data structure validation

classDiagram
    class projectsData {
        <<Array>>
        projectName: string
        continent: string
        type: string (Headquarters|Center|Site)
        address: string
        website: string
        latitude: number
        longitude: number
    }
    class DebugTool {
        +testDatabase(content: string)
        +validateStructure(projectsData)
        +compareWithExpectedStructure(projectsData)
        +suggestFixes(issues)
    }
    DebugTool --> projectsData : validates
Loading

File-Level Changes

Change Details Files
Add standalone HTML debug tool layout and styles
  • Define page structure with container, multiple debug sections, textarea, buttons, and result panels
  • Add CSS for typography, container styling, and message states (error, success, warning)
  • Include onload instruction to display initial testing hint
debug_database.html
Implement JavaScript diagnostics and recommendation engine
  • Create testDatabase() to eval pasted content, detect syntax errors, and check for 'projectsData' variable
  • Validate projectsData as an array, ensure required fields exist, and enforce number types for latitude/longitude
  • Compare against expected schema and render recommended fixes for missing fields, type issues, and invalid values
debug_database.html

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

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