1.3 KiB
Refactor Plan: Non-Window Logic Migration from windowManager.js
Goal
windowManager.js
를 순수 창 관리 모듈로 만들기 위해 비즈니스 로직을 해당 서비스와 featureBridge.js
로 이전.
Steps (based on initial plan)
-
Shortcuts: Completed. Logic moved to
shortcutsService.js
and IPC tofeatureBridge.js
. UsedinternalBridge
for coordination. -
Screenshot: Next. Move
captureScreenshot
function and related IPC handlers fromwindowManager.js
toaskService.js
(since it's primarily used there). UpdateaskService.js
to use its own screenshot method. Add IPC handlers tofeatureBridge.js
if needed. -
System Permissions: Create new
permissionService.js
insrc/features/common/services/
. Move all permission-related logic (check, request, open preferences, mark completed, etc.) and IPC handlers fromwindowManager.js
to the new service andfeatureBridge.js
. -
API Key / Model State: Completely remove from
windowManager.js
(e.g.,setupApiKeyIPC
and helpers). Ensure all usages (e.g., inaskService.js
) directly require and usemodelStateService.js
instead.
Notes
- Maintain original logic without changes.
- Break circular dependencies if found.
- Use
internalBridge
for inter-module communication where appropriate. - After each step, verify no errors and test functionality.