Home / archive / 2024 / HTML-AUDIT-REPORT

LARC HTML Files Audit Report

Date: November 13, 2025 Purpose: Verify correct pan-bus instantiation and script paths

Summary

  • Total HTML files found: 125
  • Files audited: Key files (playground, root, test files)
  • Status: ✅ Core playground files are correct
  • Issues Found: See details below

✅ PLAYGROUND (Primary Focus)

/playground/index.html

Status:CORRECT Pan-bus Setup:
  • ✅ Has element at end of body
  • ✅ Inline module script imports pan-bus conditionally
  • ✅ Path: ../core/pan-bus.mjs ← CORRECT
  • ✅ Then imports ./playground.mjs ← CORRECT
All Script Paths Verified:
  • ./styles/playground.css exists
  • ./playground.mjs exists
  • ../core/pan-bus.mjs exists
Components Used:
  • ← Loaded by playground.mjs
  • ← Loaded by playground.mjs
  • ← Loaded by playground.mjs
  • ← Loaded by playground.mjs
  • ← Loaded by playground.mjs
Verdict: Ready for use. All paths resolve correctly.

Submodule Directories

/core/ - Core Pan-bus Implementation

  • Contains: pan-bus.mjs
  • Status: ✅ File exists and is the source for playground

/components/ - Component Library

  • Contains: src/components/ with 49 components
  • Status: ✅ All 36 components with pan-client imports fixed
  • Import path: ../../../core/pan-client.mjs

/examples/ - Example Applications

  • Status: ✅ All paths fixed and verified (36 files updated)
  • Note: Examples directory is a git submodule with its own repo
  • Fixed patterns:
- All ./src/pan.js../core/pan-bus.mjs - All ../src/pan.js../../core/pan-bus.mjs - All ../../src/pan.js../../../core/pan-bus.mjs - All pan-client imports updated to correct relative paths - Added missing elements to 24 HTML files
  • Committed to examples submodule: ab2d792

Key Path Patterns

Correct Import Patterns

From /playground/index.html:
import('../core/pan-bus.mjs')  // ✅ Correct
import('./playground.mjs')                      // ✅ Correct
From /playground/components/pg-canvas.mjs:
import('../../components/pan-card.mjs')  // ✅ Correct
From /components/pan-card.mjs:
import('../../../core/pan-client.mjs')  // ✅ Correct (Fixed)

Pan-bus Element Usage

Correct Pattern:
<script type="module">
  // Load pan-bus module first
  if (!customElements.get('pan-bus')) {
    await import('../core/pan-bus.mjs');
  }
  // Then load your app
  await import('./your-app.mjs');
</script>
<!-- Pan-bus element in body -->
<pan-bus debug="true"></pan-bus>

File System Verification

Verified Paths from Web Server Root (/Users/cdr/Projects/larc-repos/):
✅ playground/index.html
✅ playground/playground.mjs
✅ playground/styles/playground.css
✅ playground/component-registry.json
✅ playground/components/pg-palette.mjs
✅ playground/components/pg-canvas.mjs
✅ playground/components/pg-properties.mjs
✅ playground/components/pg-exporter.mjs
✅ playground/components/pg-bus-monitor.mjs
✅ playground/examples.mjs
✅ core/pan-bus.mjs
✅ core/pan-client.mjs
✅ components/ (49 component files)

Testing from Browser

Server Running: http://localhost:8080 Accessible URLs:
  • ✅ http://localhost:8080/playground/ ← Main playground
  • ✅ http://localhost:8080/playground/index.html
  • ✅ http://localhost:8080/playground/styles/playground.css
  • ✅ http://localhost:8080/playground/component-registry.json
  • ✅ http://localhost:8080/core/pan-bus.mjs
  • ✅ http://localhost:8080/components/pan-card.mjs
All resources are accessible via web server without CORS issues.

Issues Fixed During Development

  • ❌ Pan-bus Double Registration
  • - Fixed: Line 697 trying to register same constructor twice - Solution: Removed pan-bus-enhanced duplicate registration
  • ❌ Wrong pan-client Import Path (36 files in components/)
  • - Was: ./pan-client.mjs (wrong directory) - Fixed: ../../../core/pan-client.mjs - Files affected: 36 component files
  • ❌ Wrong pan-client Import Path (30+ files in examples/)
  • - Was: Various wrong paths like ./, ../, etc. - Fixed: Correct relative paths to core/pan-client.mjs - Files affected: 36 files in examples directory
  • ❌ Wrong pan-bus Script Tags (20+ files in examples/)
  • - Was: