Parent issue: #17
Goal
Refactor src/ui/main_window.py into smaller orchestration-focused modules while preserving all application workflows and UI behavior.
Current Problems
The file currently combines:
- menu construction
- actions
- dialogs
- file workflows
- status handling
- editor/canvas orchestration
- settings integration
- warning handling
- localization updates
- navigation glue logic
This results in:
- very large change surfaces
- difficult navigation
- difficult testing
- hidden coupling
- difficult typing and maintenance
Proposed Target Structure
src/ui/mainwindow/
main_window.py
menus.py
actions.py
statusbar.py
file_workflows.py
dialog_management.py
Architectural Goals
- Keep orchestration responsibilities explicit
- Avoid hidden cross-module coupling
- Keep business logic outside the main window
- Improve readability and testability
- Reduce merge conflicts for future work
Suggested Extraction Order
- Status bar handling
- Menu creation
- QAction setup
- Dialog management
- File workflows
- Final orchestration cleanup
Requirements
- Preserve all shortcuts
- Preserve workflow behavior
- Preserve editor/canvas synchronization
- Preserve localization behavior
- Keep tests green throughout migration
Acceptance Criteria
main_window.py reduced substantially
- Responsibilities clearly separated
- Existing workflows preserved
- Existing tests still pass
- Reduced coupling and easier future maintenance
Parent issue: #17
Goal
Refactor
src/ui/main_window.pyinto smaller orchestration-focused modules while preserving all application workflows and UI behavior.Current Problems
The file currently combines:
This results in:
Proposed Target Structure
src/ui/mainwindow/main_window.pymenus.pyactions.pystatusbar.pyfile_workflows.pydialog_management.pyArchitectural Goals
Suggested Extraction Order
Requirements
Acceptance Criteria
main_window.pyreduced substantially