Skip to content

fix(downloads): do not save a permanent block from the repeated-download dialog - #1037

Open
jhordanleandro wants to merge 1 commit into
rafatosta:mainfrom
jhordanleandro:fix/multiple-download-block
Open

jhordanleandro wants to merge 1 commit into
rafatosta:mainfrom
jhordanleandro:fix/multiple-download-block

Conversation

@jhordanleandro

@jhordanleandro jhordanleandro commented Nov 16, 2026 •

Copy link
Copy Markdown

Refs #1018 (also #1006 and #992, which were closed as duplicates of #1018)

Problem

After the first download of a session, DownloadManager._authorize_repeated_download asks "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

  • Block, Esc and closing the dialog refuse only the current request; the dialog appears again on the next repeated download.
  • Always allow is still remembered.
  • A block that is already saved keeps working and can be cleared with Reset.
  • No new strings, so no translation changes.

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

  • New 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.
  • New test_always_allow_decision_is_still_remembered.
  • Full suite in the Flatpak: the only failures are the 4 failures and 4 errors that already occur on main. check_unused_code, test_documentation_structure and git diff --check pass.
  • Not tested with a real WhatsApp download or the real dialog; the tests mock the dialog answer.

…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
Copilot AI balanced review requested due to automatic review settings November 16, 2026 09:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T10:16:36.841286Z 6de54b4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jhordanleandro

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6de54b4a64

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@jhordanleandro

Copy link
Copy Markdown
Author

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.

This branch has not been deployed

No deployments
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.

2 participants