mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-27 06:12:05 -07:00
2.0 KiB
2.0 KiB
id, title, status, assignee, created_date, labels, milestone, dependencies, references, parent_task_id, priority
| id | title | status | assignee | created_date | labels | milestone | dependencies | references | parent_task_id | priority | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-238.1 | Extract main-window and overlay-window composition from src/main.ts | To Do | 2026-03-26 20:49 |
|
m-0 |
|
TASK-238 | high |
Description
src/main.ts still directly owns several BrowserWindow construction and window-lifecycle paths, including overlay-adjacent windows and setup flows. That keeps the composition root far larger than intended and makes window behavior hard to test in isolation. Extract the remaining window/bootstrap composition into named runtime modules so src/main.ts mostly wires dependencies and app lifecycle events together.
Acceptance Criteria
- #1 At least the main overlay window path plus two other window/setup flows are extracted from direct
BrowserWindowconstruction insidesrc/main.ts. - #2 The extracted modules expose narrow factory/handler APIs that can be tested without booting the whole app.
- #3
src/main.tsbecomes materially smaller and easier to scan, with window creation concentrated behind well-named runtime surfaces. - #4 Relevant runtime/window tests pass, and new tests are added for any newly isolated window composition helpers.
Implementation Plan
- Map the remaining direct
BrowserWindowcreation sites insrc/main.tsand group them by shared lifecycle concerns. - Extract coherent modules for construction, preload/path resolution, and open/focus/reuse behavior rather than moving raw option objects wholesale.
- Update the composition root to consume the new modules and keep side effects/app state ownership explicit.
- Verify with focused runtime/window tests plus
bun run typecheck.