Repository navigation
Stop the Pomodoro before the plugins when the application exits - #182
Merged
Merged
Conversation
vesnicancz
force-pushed
the
fix/pomodoro-stops-before-plugins
branch
from
November 5, 2026 12:51
65a0d7a to
fb30111
Compare
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.
PomodoroService.DisposeAsyncturns the status indicators off, but it only ran when the host was disposed, and by thenApp.ShutdownCleanuphad already disposed the plugins. The list of running indicators was empty, so the code did nothing, and the LED went dark only if the plugin did that itself on shutdown. The Pomodoro timer also kept running while the plugins were shutting down, so a phase ending in that moment could still reach them.What changes
Appdisposes the Pomodoro after plugin startup finishes and before the plugins. The order lives inStopPomodoroAndPluginsAsyncso that a test can check it.PomodoroService.DisposeAsyncturns the indicators off only during a Pomodoro. Now that this code actually runs, it would otherwise sendIdleon every exit, and Luxafor would open a device nothing had used just to turn it off.Behavior to check
Idleto the indicators first, and then Luxafor turns the device off again on its own shutdown. That's two commands with the same result, bounded by the existing 3-second timeout within the 10-second teardown limit.Testing