#849 Plugin Components #851
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #849
● Plugin-Components System Implementation
Summary
Implements a new Plugin-Components system that allows developers to create lightweight initialization plugins that
run once after the UI is finalized. This follows the same architecture as Plugin-Tools and Plugin-Backend, completing the plugin ecosystem for MMGIS.
Related Issue: #849
Overview
Components are one-time initialization plugins that provide a way to add:
Components have a single init(vars) lifecycle method and receive their configured variables from the mission
configuration.
Key Features
✅ Build-time component discovery - Scans for Private-Components and Plugin-Components directories
✅ Configure page integration - New Components tab for enabling/configuring components
✅ Real-time configuration - Changes save immediately (no save button)
✅ Dynamic forms - Uses existing Maker component for variable configuration
✅ Error isolation - Component errors don't crash MMGIS
✅ Full documentation - Updated Contributing.md with component development guide
✅ Comprehensive testing - 130 new tests (all passing)
Architecture
Build System
npm run build
└─> API/updateTools.js
├─> Scans src/essence/ for component directories
├─> Reads config.json from each component
├─> Generates configure/public/componentConfigs.json
└─> Generates src/pre/components.js (ES6 imports/exports)
Runtime Flow
Frontend Load
└─> essence.js
└─> fina() // UI finalization
└─> ComponentController.initializeComponents()
├─> Reads L_.configData.components[]
├─> Filters enabled components (on: true)
├─> Calls component.init(variables) for each
└─> Logs timing and errors
Configure Page
Configure Page
└─> Components Tab (conditional rendering)
├─> Fetches componentConfigs.json on mission load
├─> Displays component cards (sorted alphabetically)
├─> Shows active/inactive status indicators
└─> Opens ComponentModal on card click
├─> ON/OFF toggle
├─> Icon field (optional)
└─> Dynamic variable form (if hasVars: true)
Files Added
Core Implementation
Configure Page
Example Component
Tests
Documentation
Files Modified
Build System
Frontend
Configure Page
Documentation
Co-Authored-By: Claude noreply@anthropic.com