Mandlix VS Code Extension
Transform Mandlix analysis into GitHub Copilot fix prompts for automated UI/UX improvements.
Features
- 🔍 Browse Issues: View all UI/UX issues organized by project and page in a sidebar tree view
- 🤖 Copilot Integration: Send fix prompts directly to GitHub Copilot
- 📁 File Mapping: Map analyzed URLs to your local project files
- 🔄 Auto-Sync: Automatically sync issues from Mandlix backend
- 🔧 One-Click Fixes: Apply AI-generated fixes with a single click
- 🌿 Git Integration: Create branches and pull requests for your fixes
- 📊 Export Reports: Generate comprehensive fix reports
Installation
From VSIX
- Build the extension:
npm install
npm run compile
npm run package
- Install in VS Code:
- Go to Extensions view (Ctrl+Shift+X)
- Click "..." menu → "Install from VSIX"
- Select the generated
.vsix file
From Marketplace (Future)
Search for "Mandlix" in the VS Code Extensions marketplace.
Setup
1. Login to Mandlix
- Open Command Palette (Ctrl+Shift+P)
- Run
Mandlix: Login
- Enter your Mandlix API URL, email, and password
2. Sync Your Project
- Run
Mandlix: Map URL to File command
- Select your Mandlix project
- Confirm or adjust automatic file mappings
Open VS Code settings (Ctrl+,) and search for "Mandlix":
mandlix.apiUrl - Your Mandlix API endpoint
mandlix.autoSync - Auto-sync on startup
mandlix.copilotModel - Copilot model to use
mandlix.createGitBranch - Create git branch for fixes
Usage
Viewing Issues
- Open the Explorer sidebar
- Find the "Mandlix Issues" panel
- Expand your project to see pages and issues
- Click on an issue to view details
Fixing Issues
Method 1: Fix with Copilot Chat
- Select an issue in the tree
- Click "Fix with Copilot" button
- Choose "Open in Copilot Chat"
- Copilot will analyze and suggest fixes
Method 2: Copy Prompt
- Click "Copy Prompt" in the issue detail panel
- Paste into Copilot chat manually
- Apply the suggested fix
Method 3: Direct Apply
- Ensure file is mapped
- Click "Apply Fix Directly"
- Review the diff and confirm
File Mapping
Map URLs to local files:
- Right-click a page in the tree
- Select "Mandlix: Map URL to File"
- Enter the relative path (e.g.,
src/pages/home.tsx)
Or sync the entire project:
- Run
Mandlix: Sync Project
- Select your Mandlix project
- Confirm automatic mappings
Creating Pull Requests
- Apply your fixes
- Run
Mandlix: Create Pull Request
- Review the generated PR
- Open in GitHub to submit
Configuration File
The extension creates a .mandlixrc.json file in your workspace:
{
"projectId": "proj_abc123",
"baseUrl": "https://example.com",
"framework": "react",
"mappings": [
{
"url": "https://example.com/",
"pattern": "^/$",
"filePath": "src/pages/home.tsx"
}
],
"autoApply": false,
"createPullRequests": true
}
Keyboard Shortcuts
Ctrl+Shift+U - Refresh Mandlix issues
Ctrl+Shift+F - Fix selected issue with Copilot
Requirements
- VS Code 1.86.0 or higher
- GitHub Copilot extension (for AI fix generation)
- Git (for branch/PR management)
- GitHub CLI
gh (optional, for PR creation)
API Integration
The extension expects these backend endpoints:
POST /api/v1/auth/login - Authentication
GET /api/v1/projects - List projects
GET /api/v1/projects/:id/pages - Get pages
GET /api/v1/pages/:id/issues - Get issues
GET /api/v1/issues/:id - Get issue details
GET /api/v1/issues/:id/fix-prompt - Get fix prompt JSON
POST /api/v1/issues/:id/status - Update issue status
Development
Build
npm install
npm run compile
Watch
npm run watch
Package
npm run package
Test
npm test
Extension Structure
src/
├── extension.ts # Entry point
├── commands/ # VS Code commands
│ ├── login.ts
│ ├── refreshIssues.ts
│ ├── applyFix.ts
│ └── syncProject.ts
├── providers/ # Tree view & webview providers
│ ├── IssuesTreeProvider.ts
│ └── IssueDetailProvider.ts
├── services/ # Business logic
│ ├── apiService.ts
│ ├── copilotService.ts
│ ├── fileMapper.ts
│ └── gitService.ts
├── types/ # TypeScript interfaces
│ ├── issue.ts
│ ├── page.ts
│ └── project.ts
├── utils/ # Utilities
│ ├── config.ts
│ ├── constants.ts
│ └── helpers.ts
└── templates/ # HTML templates
└── fixPromptTemplate.ts
License
MIT
Support
For issues and feature requests, please use the GitHub issue tracker.
Roadmap
- [ ] Real-time updates via WebSocket
- [ ] Batch fix operations
- [ ] Custom fix templates
- [ ] Integration with other AI providers
- [ ] Issue filtering and search
- [ ] Screenshot comparison in webview