**Asset Deployment Infrastructure:** - Enhanced RenderingEngineManager with complete asset deployment - Automatic plugin source directory discovery and asset copying - File system operations with proper directory structure preservation - Comprehensive error handling for missing assets **CLI Integration:** - Automatic asset deployment when using plugin engines - Verbose output showing deployment progress and statistics - Asset verification and accessibility validation - Production-ready deployment to _markitect/plugins/ structure **TestDrive JSUI Assets:** - Complete CSS asset suite (editor, controls, GitHub theme) - Placeholder image assets for testing deployment - Proper asset organization following plugin conventions - All 18 assets now deployed correctly **Testing Infrastructure:** - Comprehensive asset deployment testing - CLI integration verification with asset shipping - File existence and accessibility validation - Complete directory structure verification **Key Features:** - Assets deployed to `_markitect/plugins/testdrive-jsui/` when using --edit - HTML references match deployed asset locations - 18 total assets: 12 JS, 3 CSS, 3 images - Automatic deployment without --ship-assets flag needed - Clean separation of development vs production asset handling **Example Output:** ``` 🎯 Using rendering engine: testdrive-jsui (supports: edit, view) 📦 Deploying assets for engine 'testdrive-jsui'... 📄 Deployed 18 asset files js: 12 files css: 3 files images: 3 files ✅ Rendered with INTERACTIVE editing mode ``` This fixes the "HTML assets not found" issue when using explicit output directories with plugin engines. All plugin assets are now properly deployed and accessible. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
TestDrive JSUI Plugin
Independent JavaScript UI plugin for Markitect markdown editing. Designed for standalone development and testing of JavaScript components without requiring the full Python Markitect environment.
Features
- Independent Development: Work on UI components without Python setup
- Clean Architecture: JSON-based configuration interface
- Modular Components: Compass-positioned control panels
- Real-time Editing: Click any section to edit inline
- Asset Management: Proper separation of JS/CSS/image assets
Directory Structure
testdrive-jsui/
├── static/
│ ├── js/ # JavaScript components
│ │ ├── core/ # Core systems (debug, sections)
│ │ ├── components/ # UI components (panels, controls)
│ │ └── controls/ # Control panels (contents, status, edit, debug)
│ └── css/ # Stylesheets
├── images/ # Icons and images
├── templates/ # HTML templates
├── test-documents/ # Sample markdown files
└── package.json # Node.js configuration
Development Setup
Standalone Development (No Python Required)
-
Start Development Server:
cd testdrive-jsui npm run dev # or use Python's built-in server: python -m http.server 8080 -
Open Test Document: Navigate to
http://localhost:8080/test.htmlto see the UI in action. -
Edit JavaScript:
- Modify files in
static/js/ - Refresh browser to see changes
- Use browser DevTools for debugging
- Modify files in
Integration with Markitect
The plugin integrates with Markitect through the rendering engine system:
# Use with Markitect (when integrated)
markitect md-render --engine testdrive-jsui --mode edit document.md
JavaScript Architecture
Core Components
main.js: Application entry point and initializationconfig-loader.js: Configuration interface (Python ↔ JavaScript)section-manager.js: Document section managementdom-renderer.js: DOM manipulation and rendering
Control Panels (Compass Positioning)
- Northwest: Contents/Navigation control
- Northeast: Edit actions control
- East: Status display control
- Southeast: Debug information control
Configuration Interface
All Python data passes through a clean JSON interface:
<script id="markitect-config" type="application/json">
{
"markdownContent": "# Document content...",
"mode": "edit",
"theme": "github",
...
}
</script>
Testing
Manual Testing
- Load
test.htmlin browser - Verify all controls load and position correctly
- Test editing functionality
- Check browser console for errors
Automated Testing (Future)
- Unit tests for JavaScript components
- Integration tests for HTML rendering
- Browser automation tests
Asset Management
Development Mode
- Assets served directly from
static/directory - Hot reloading with development server
- No build process required
Production Mode
- Assets copied to
_markitect/plugins/testdrive-jsui/ - Integrated with Markitect deployment
- Configurable asset URLs
Configuration
The plugin supports various configuration options:
{
"pluginName": "testdrive-jsui",
"assetBaseUrl": "_markitect",
"developmentMode": true,
"pluginAssetDir": "_markitect/plugins/testdrive-jsui"
}
Extending the Plugin
Adding New Controls
- Create new control in
static/js/controls/ - Extend
ControlBaseclass - Register in
main.jsinitialization - Add compass position (nw, ne, e, se, s, sw, w, nw)
Adding New Themes
- Create CSS file in
static/css/themes/ - Update theme selection logic
- Test with different markdown content
Adding New Assets
- Add files to appropriate
static/subdirectory - Update
get_required_assets()in plugin class - Reference in templates or JavaScript
Integration Points
The plugin interfaces with Markitect through:
- Plugin Registry: Auto-discovery of rendering engines
- Asset Management: Deployment and URL generation
- Configuration: JSON-based data transfer
- Templates: HTML template system
License
MIT License - see LICENSE file for details.