feat: persist progress visibility after modal dismissal#24
Merged
Conversation
The progress modal is already shown automatically when a transfer starts, but once the user dismissed it there was no way to bring it back — you had to wait for the transfer to finish. Fixes #230. - ProgressModalContent now accepts an `onUserDismiss` callback so the poller can distinguish between a manual dismiss and a programmatic Close() call. - When the user dismisses the modal while a transfer is still active, emit a long-lived recovery toast (duration 10s popup, 24h tray expiration). Tapping the toast reopens the modal via showModal(). - The toast auto-dismisses when the modal is reopened, when the operation completes/errors, or when the programmatic close fires. - A `closingModalProgrammatically` guard prevents our own Close() calls from triggering the recovery toast.
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
Addresses lobinuxsoft/capydeploy#230: when the user dismissed the transfer progress modal, there was no way to bring it back — they had to wait for the transfer to finish without any feedback.
Approach
Most of the infrastructure was already in place (
progressStatesingleton with subscribers,ProgressModalContentmodal, background poller that survives the QAM panel unmount). What was missing was the trigger to resurface the modal once the user navigated away from it.Instead of adding a dedicated "resume" button (which still requires the user to remember to go look for it), the progress comes to the user via a persistent Decky toast.
Changes
ProgressModalContentnow accepts anonUserDismisscallback so the poller can distinguish manual dismisses (X / Esc / back) from programmaticClose()calls.showModal().closingModalProgrammaticallyguard prevents our ownClose()calls from triggering the recovery toast path.Test plan
./build.shproduces a working ZIPcompleteevent → recovery toast disappears, success toast appears