Skip to content

Restore module bootstrap and repair map runtime parsing - #1

Merged
SolutionsAsService merged 4 commits into
mainfrom
copilot/fix-broken-internet-structure-map
Aug 21, 2026
Merged

Restore module bootstrap and repair map runtime parsing#1
SolutionsAsService merged 4 commits into
mainfrom
copilot/fix-broken-internet-structure-map

Conversation

Copilot AI commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

The map stopped loading because index.html executed js/app.js both as an ES module and as a classic script, while js/app.js also contained malformed duplicated code that broke parsing in the node rendering path. This change restores a single valid module entry path and cleans up the broken runtime code so the graph can initialize and render reliably again.

  • Bootstrap / script loading

    • Remove the duplicate legacy <script src="js/app.js"></script> include from index.html
    • Keep js/app.js loaded only once as a module
    • Add a guarded startup path in app.js to prevent duplicate initialization if the entrypoint is invoked more than once
  • Parser and render-path repair

    • Remove the embedded code fence and duplicated hover/click block in renderNodes()
    • Restore valid function boundaries and event wiring in the node render section
    • Keep the existing interaction model intact for node hover, selection, and details display
  • Control compatibility

    • Preserve the current HTML contract by exposing filterLayer and resetView on window
    • Avoid breaking the existing inline button handlers while keeping module-based app loading
  • Render resilience

    • Keep the existing fallback sizing behavior for imperfect SVG/container dimensions
    • Preserve error surfacing in the details panel when initialization fails
    • Add safe color fallbacks and a cached normalized color lookup so node/label rendering remains stable even when color tokens are imperfect
if (document.readyState === "loading") {
    document.addEventListener("DOMContentLoaded", startApplication, { once: true });
} else {
    startApplication();
}

function startApplication() {
    if (mapState.isInitializing || mapState.hasInitialized) return;
    mapState.isInitializing = true;
    initializeMap().finally(() => {
        mapState.isInitializing = false;
    });
}

@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
internet-structure Ready Ready Preview Aug 21, 2026 12:24am

Co-authored-by: SolutionsAsService <152567394+SolutionsAsService@users.noreply.github.com>
Co-authored-by: SolutionsAsService <152567394+SolutionsAsService@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix broken Internet Structure map JavaScript for reliable loading Restore module bootstrap and repair map runtime parsing Aug 15, 2026
@SolutionsAsService
SolutionsAsService marked this pull request as ready for review August 21, 2026 00:21
@SolutionsAsService

Copy link
Copy Markdown
Owner

@copilot resolve the merge conflicts in this pull request

Co-authored-by: SolutionsAsService <152567394+SolutionsAsService@users.noreply.github.com>
@SolutionsAsService
SolutionsAsService merged commit 3800ecb into main Aug 21, 2026
2 checks passed
@SolutionsAsService
SolutionsAsService deleted the copilot/fix-broken-internet-structure-map branch August 21, 2026 00:25

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Resolved in e03953f.

Copilot stopped work on behalf of SolutionsAsService due to an error August 21, 2026 00:25
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