-
-
Notifications
You must be signed in to change notification settings - Fork 301
Open
Labels
blockedThis issue depends on external projectsThis issue depends on external projectsenhancementNew feature or requestNew feature or requestrefactoring
Description
Describe the feature
Improve code testability and add automated test coverage. This phase begins after Phase 1 completion.
Motivation
Labels: refactoring, phase-2, blocked
Parent Epic: #1959
Blocked By: #1960 (Phase 1)
Detailed Plan: incremental-refactoring-plan.md#phase-2
Tasks
-
Singleton Refactoring
- Export classes instead of instances
- Enable fresh instances for testing
- Modules:
connectionManager,screenSharingService
-
IPC Registration Pattern
- Move IPC registration out of constructors
- Add explicit
initialize()methods - Module:
menus/tray.jsand others with constructor IPC
-
Automated Testing
- Add 20+ tests using existing Playwright setup
- E2E tests for critical paths (startup, notifications, screen sharing)
- Unit tests for extracted modules
-
Documentation Automation
- Auto-generate IPC API docs from code
- Generate module dependency diagrams
- Keep documentation in sync with code
Success Criteria
- ✅ Zero singleton exports (all classes)
- ✅ IPC registration in
initialize()not constructors - ✅ 20+ automated tests passing
- ✅ Test coverage >40%
- ✅ IPC docs auto-generated
Status
⏸️ Blocked - Waiting for Phase 1 completion
After Phase 1, we'll evaluate whether to continue with Phase 2 or shift to feature implementation based on:
- User priorities
- Value delivered from Phase 1
- Available time and energy
Notes
This phase is optional.
Alternatives
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
blockedThis issue depends on external projectsThis issue depends on external projectsenhancementNew feature or requestNew feature or requestrefactoring