Skip to content

fix(extension): capture downloads other extensions start, such as media downloaders - #608

Merged
linroid merged 2 commits into
mainfrom
fix/capture-extension-downloads
Oct 20, 2026
Merged

linroid merged 2 commits into
mainfrom
fix/capture-extension-downloads

Conversation

@linroid

@linroid linroid commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Closes #606.

Media downloader extensions save the videos they find with downloads.download(). Since #400, the extension left every download with a byExtensionId to the browser, so these never reached Ketch.

Changes

  • captureDecision skips only the extension's own downloads (its byExtensionId), 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.
  • New setting 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.
  • While the download dialog is open, the browser holds another extension's original download instead of canceling it: Chromium leaves its file name decision pending, Firefox keeps it paused. The browser doesn't expose the headers an extension adds to its request, so neither Ketch nor a new browser download could repeat them. Download in browser, or closing the dialog, lets the original continue as the extension started it. It is canceled only once Ketch accepts the download, and after an uncertain send it goes back paused, as when sending without the dialog. Ketch itself still gets only the link, cookies and referrer.
  • Strings in all 10 locales, plus README and AGENTS.md.

Testing

  • node --test in app/browser-extension: 185 pass. New tests cover a download another extension starts being captured (in captureDecision, and held through onDeterminingFilename until 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.mjs builds all targets.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T09:03:14.801401Z 28e0b1e PR opened
ℹ️ 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.

@claude

claude Bot commented Oct 20, 2026

Copy link
Copy Markdown

Code review

No 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
@linroid
linroid force-pushed the fix/capture-extension-downloads branch from 28e0b1e to 3b90569 Compare October 20, 2026 09:02

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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.
@linroid
linroid merged commit db66cb0 into main Oct 20, 2026
11 checks passed
@linroid
linroid deleted the fix/capture-extension-downloads branch October 20, 2026 09:20
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.

一些媒体嗅探的浏览器插件嗅探的内容不能被软件接管下载。

1 participant