-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Refactor Chrome Extension to Modular Architecture
Overview
Refactor panel.js (29K) and screenshot.js (44K) into modular, maintainable components following systematic plan.
Documentation
- Architectural Map: ARCHITECTURAL_MAP.md
- Refactoring Plan: REFACTORING_PLAN.md
Phases
Phase 1: Shared Utilities (Low Risk)
- Extract listener-pool.js
- Extract retry-logic.js
- Extract thread-safe-state.js
- Update screenshot.js, navigation.js to use shared utilities
Phase 2: Screenshot Module (Medium Risk)
- Extract filename-generator.js
- Extract screenshot-capture.js
- Extract screenshot-ui.js
- Refactor screenshot-manager.js (44K → ~15K)
Phase 3: Panel Components (High Risk)
- Extract settings-manager.js
- Extract log-display.js
- Extract ui-controller.js
- Extract connection-manager.js
- Refactor panel.js to orchestrator only (29K → ~10K)
Phase 4: ES6 Modules (Optional)
- Convert to module system
- Update manifest.json
- Modern build setup
Success Criteria
- File sizes reduced by 50%+
- Code duplication eliminated
- All features working as before
- Memory leaks eliminated
- Clear module boundaries
Implementation Timeline
- Week 1: Shared utilities
- Week 2: Screenshot module
- Week 3: Panel components
- Week 4: Integration & testing
Related Issues
- 📸 Enhance Screenshot Directory UI and Fix File Saving #64 (Clipboard functionality)
Strategy
Build modular pieces one by one, test after each step, maintain backward compatibility.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request