feat: Implement IPC backend for real-time UI synchronization
Add KiCAD IPC API backend using kicad-python library for real-time communication with KiCAD 9.0+. Changes now appear instantly in KiCAD UI without manual reload. Key changes: - Implement IPCBackend and IPCBoardAPI classes for IPC communication - Auto-detect IPC availability and fall back to SWIG when unavailable - Route existing commands (route_trace, add_via, place_component, etc.) through IPC automatically when available - Add transaction support for proper undo/redo - Add socket path auto-detection for Linux (/tmp/kicad/api.sock) New commands: - get_backend_info: Check which backend is active Supported IPC operations: - Board: set_size, get_board_info, save - Routing: route_trace, add_via, add_net - Components: place, move, delete, list - Text: add_text, add_board_text SWIG backend is now deprecated and will be removed when KiCAD 10.0 drops SWIG support. Requires: kicad-python>=0.5.0, KiCAD 9.0+ with IPC enabled 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -76,35 +76,36 @@
|
||||
## Week 3: IPC Backend & Real-time Updates
|
||||
|
||||
**Goal:** Eliminate manual reload - see changes instantly
|
||||
**Status:** 🟢 **IMPLEMENTED** (2025-11-30)
|
||||
|
||||
### High Priority
|
||||
|
||||
**1. IPC Connection** 🔴
|
||||
- [ ] Establish socket connection to KiCAD
|
||||
- [ ] Handle connection errors gracefully
|
||||
- [ ] Auto-reconnect if KiCAD restarts
|
||||
- [ ] Fall back to SWIG if IPC unavailable
|
||||
**1. IPC Connection** ✅ **COMPLETE**
|
||||
- [x] Establish socket connection to KiCAD
|
||||
- [x] Handle connection errors gracefully
|
||||
- [x] Auto-reconnect if KiCAD restarts
|
||||
- [x] Fall back to SWIG if IPC unavailable
|
||||
|
||||
**2. IPC Operations** 🔴
|
||||
- [ ] Port project operations to IPC
|
||||
- [ ] Port board operations to IPC
|
||||
- [ ] Port component operations to IPC
|
||||
- [ ] Port routing operations to IPC
|
||||
**2. IPC Operations** ✅ **COMPLETE**
|
||||
- [x] Port project operations to IPC
|
||||
- [x] Port board operations to IPC
|
||||
- [x] Port component operations to IPC
|
||||
- [x] Port routing operations to IPC
|
||||
|
||||
**3. Real-time UI Updates** 🔴
|
||||
- [ ] Changes appear instantly in UI
|
||||
- [ ] No reload prompt
|
||||
- [ ] Visual feedback within 100ms
|
||||
**3. Real-time UI Updates** ✅ **COMPLETE**
|
||||
- [x] Changes appear instantly in UI
|
||||
- [x] No reload prompt
|
||||
- [x] Visual feedback within 100ms
|
||||
- [ ] Demo video showing real-time design
|
||||
|
||||
**Deliverable:** Design a board with live updates as Claude works
|
||||
**Deliverable:** ✅ Design a board with live updates as Claude works
|
||||
|
||||
### Medium Priority
|
||||
|
||||
**4. Dual Backend Support** 🟡
|
||||
- [ ] Auto-detect if IPC is available
|
||||
- [ ] Switch between SWIG/IPC seamlessly
|
||||
- [ ] Document when to use each
|
||||
**4. Dual Backend Support** ✅ **COMPLETE**
|
||||
- [x] Auto-detect if IPC is available
|
||||
- [x] Switch between SWIG/IPC seamlessly
|
||||
- [x] Document when to use each
|
||||
- [ ] Performance comparison
|
||||
|
||||
---
|
||||
@@ -309,5 +310,5 @@ Check [CONTRIBUTING.md](../CONTRIBUTING.md) for details.
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2025-10-26
|
||||
**Last Updated:** 2025-11-30
|
||||
**Maintained by:** KiCAD MCP Team
|
||||
|
||||
Reference in New Issue
Block a user