Repository navigation
fix(extension): capture downloads other extensions start, such as media downloaders - #608
Conversation
Codex Review SummaryThis 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. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
…ia downloaders Downloads started by another extension were always left to the browser, so the videos a media downloader extension saves never reached Ketch. They are captured again, under the same rules as other downloads; a new "Capture downloads from other extensions" switch, on by default, leaves them to their extension. The extension's own downloads, such as Download in browser, are still never captured. Closes #606
28e0b1e to
3b90569
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28e0b1eac8
ℹ️ 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".
…stead of canceling them A download another extension starts may carry request headers of its own, which the browser does not expose, so neither Ketch nor a new browser download can repeat it. While the dialog is open the browser now holds the original: Chromium keeps its file name decision pending, Firefox keeps it paused. Download in browser and closing the dialog let it continue as that extension started it, and it is canceled only once Ketch accepts the download; after an uncertain send it goes back paused, as when sending without the dialog.
Closes #606.
Media downloader extensions save the videos they find with
downloads.download(). Since #400, the extension left every download with abyExtensionIdto the browser, so these never reached Ketch.Changes
captureDecisionskips only the extension's own downloads (itsbyExtensionId), such as Download in browser, as it did before Add browser capture rules and per-server cookie permissions #400. Downloads from other extensions go through the same rules as any other download: private windows,blob:/data:links, site exclusions, file types and sizes.captureExtensionDownloads(settings page: Capture downloads from other extensions, on by default, also for existing installs). Turning it off leaves these downloads to the extension that started them, as before. It is hidden in Safari, which has no capture.Testing
node --testinapp/browser-extension: 185 pass. New tests cover a download another extension starts being captured (incaptureDecision, and held throughonDeterminingFilenameuntil Download in browser gives it back), a held original going back, being removed only after Ketch accepts, and going back paused after an uncertain send, the switch turned off, and the default for settings saved before the switch existed.node build.mjsbuilds all targets.