Skip to content

refactor: Phase 3 — extract Windows toast identity & timer management from app.py#457

Merged
Orinks merged 2 commits intodevfrom
refactor/monolith-phase3
Mar 15, 2026
Merged

refactor: Phase 3 — extract Windows toast identity & timer management from app.py#457
Orinks merged 2 commits intodevfrom
refactor/monolith-phase3

Conversation

@Orinks
Copy link
Owner

@Orinks Orinks commented Mar 15, 2026

Summary

  • Extracted the ~390-line module-level Windows toast identity block from app.py into windows_toast_identity.py
  • Extracted 7 timer management methods from AccessiWeatherApp into app_timer_manager.py (delegation stubs remain in the class)
  • app.py reduced from 1,693 lines → 1,228 lines (saved 465 lines, 27.5%)
  • All existing tests pass; monkeypatch paths updated to new module locations

Commits

  1. refactor: extract Windows toast identity block into windows_toast_identity.py
  2. refactor: extract timer management into app_timer_manager.py

Test plan

  • tests/test_windows_app_user_model_id.py — 20 tests pass
  • tests/test_split_update_timers.py — timer tests pass
  • tests/test_app_auto_update_checks.py — auto-update timer tests pass
  • tests/test_split_notification_timers.py — notification timer tests pass
  • No circular imports introduced
  • ruff check passes on all modified/created files

🤖 Generated with Claude Code

Orinks and others added 2 commits March 15, 2026 00:47
…ntity.py

Move the ~390-line module-level Windows toast identity block out of app.py
into a dedicated windows_toast_identity.py module. Reduces app.py from
1693 to ~1296 lines.

- New module: windows_toast_identity.py with all AppUserModelID, shortcut
  repair, and stamp caching functions
- Update test imports and monkeypatches to use the new module path
- No behavior changes; all 20 toast identity tests pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move 7 timer management methods out of AccessiWeatherApp into a dedicated
app_timer_manager.py module. Replace method bodies with one-line delegation
calls, preserving all method signatures.

- New module: app_timer_manager.py with stop/start/on_ functions for
  background update timers and automatic update-check timers
- app.py reduced from 1693 to 1228 lines (saved 465 lines)
- All 14 timer tests pass unchanged

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Orinks Orinks merged commit a9af076 into dev Mar 15, 2026
6 checks passed
@Orinks Orinks deleted the refactor/monolith-phase3 branch March 15, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant