refactor: Phase 3 — extract Windows toast identity & timer management from app.py#457
Merged
refactor: Phase 3 — extract Windows toast identity & timer management from app.py#457
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app.pyintowindows_toast_identity.pyAccessiWeatherAppintoapp_timer_manager.py(delegation stubs remain in the class)app.pyreduced from 1,693 lines → 1,228 lines (saved 465 lines, 27.5%)Commits
refactor: extract Windows toast identity block into windows_toast_identity.pyrefactor: extract timer management into app_timer_manager.pyTest plan
tests/test_windows_app_user_model_id.py— 20 tests passtests/test_split_update_timers.py— timer tests passtests/test_app_auto_update_checks.py— auto-update timer tests passtests/test_split_notification_timers.py— notification timer tests passruff checkpasses on all modified/created files🤖 Generated with Claude Code