Repository navigation
fix(downloads): do not save a permanent block from the repeated-download dialog - #1037
jhordanleandro wants to merge 1 commit into
Conversation
…oad dialog Choosing Block, pressing Esc or closing the repeated-download dialog stored a permanent block. Every later WhatsApp download was then refused with no dialog to undo it, so only the first download of each session worked until the permission was reset in Settings. Block, Esc and closing the dialog now refuse only the current request. Always allow is still remembered, and an already saved block still works and can be cleared with Reset. Tests: new tests for the one-time block and for Always allow; full suite run in the Flatpak with only the failures that already occur on main. Refs rafatosta#1006, rafatosta#992
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Quick update: besides the mocked tests, I also tried the real dialog (headless, with simulated clicks and Esc). With this change, Esc, closing the window and Block all refuse just that one download and nothing gets saved, so the next repeated download asks again. Always allow is still remembered. On main, Esc saved a permanent block. I still haven't tried it with a real WhatsApp download, only the dialog and the permission logic. |
Refs #1018 (also #1006 and #992, which were closed as duplicates of #1018)
Problem
After the first download of a session,
DownloadManager._authorize_repeated_downloadasks "WhatsApp wants to download multiple files." Any answer other than "Allow once" or "Always allow" saves a permanent block: clicking Block, pressing Esc and closing the dialog (Block is both the default and the escape button). The dialog then never appears again and every later download is refused silently, so only the first download of each session works until the permission is reset in Settings → Language and Download. Two users reported exactly this (#992, #1006), and one of them said they never saw the dialog, so a block may have been saved without a deliberate choice.Change
Trade-off: the dialog no longer offers "block forever". If you want it, it can be a separate, explicit button with a new string. The behavior change is also proposed in the #1006 thread.
I could not find out how the reporter ended up with a saved block without seeing the dialog, so this prevents any dismissal from saving one but does not explain that case.
Tests
test_block_decision_refuses_once_without_saving_a_permanent_block: fails without the change ('block' != 'ask') and checks that the next repeated download asks again.test_always_allow_decision_is_still_remembered.main.check_unused_code,test_documentation_structureandgit diff --checkpass.