Repository navigation
Studio: confirm browser downloads, choose the download folder - #12832
Merged
Merged
Conversation
shimmyshimmer
force-pushed
the
studio-download-approval
branch
from
October 6, 2026 06:30
5a988f5 to
e365af5
Compare
This comment has been minimized.
This comment has been minimized.
Base automatically changed from
studio-download-history
to
studio-browser-settings
October 6, 2026 06:38
shimmyshimmer
force-pushed
the
studio-download-approval
branch
from
October 6, 2026 08:39
e365af5 to
1d33f86
Compare
shimmyshimmer
force-pushed
the
studio-download-approval
branch
from
October 6, 2026 10:58
1d33f86 to
e92aebc
Compare
Member
Author
|
@codex security review |
This comment has been minimized.
This comment has been minimized.
shimmyshimmer
force-pushed
the
studio-download-approval
branch
from
October 6, 2026 12:16
944eb17 to
4b7fa78
Compare
Files from websites now ask before they are saved, with a Remember for next time checkbox that always allows or blocks the site. In the desktop app a page download lands in a staging folder until it is allowed, then moves to the download folder; cancelled ones are deleted. Settings > Browser > Downloads adds Location (desktop app), Ask before downloading and Site download permissions. Ask where to save each file now works in the desktop app too.
…pt on outside click
shimmyshimmer
force-pushed
the
studio-download-approval
branch
from
October 6, 2026 12:36
706a614 to
da5cf2b
Compare
Member
Author
|
@codex security review |
Downloads - Quarantine files saved from the panel with their source URL, so Gatekeeper/SmartScreen check them; they now skip the save dialog by default. - Keep a site's download answer for the page that started it. blob: and data: downloads have no host, and one answer for "" covered them on every site. - Escape or an outside click cancels once; only the Cancel button remembers. - Answer every native download prompt: deny when the tab is gone, catch decide failures, refuse past 3 unanswered per tab, and deny after 10 minutes. - Hold a lock from picking a free name to taking it, so two saves can't pick the same one. Module inlining - Check integrity metadata before inlining, since the attribute is dropped. - Leave modules alone that any origin may load (Access-Control-Allow-Origin *). - Cache answers per module URL (bounded, 10 min), so a site's pages don't refetch the same bundles. - Count inlined code toward the page size limit; one failing fetch leaves the page as it was.
- Read script attributes with a start-tag tokenizer, so "src" or "type" inside another attribute's value (onerror="this.src='x'") isn't taken for the tag's own; repeated attributes keep the first. - Keep remembered download answers per account (their own store named with accountDatabaseName), like history and bookmarks. - A remembered answer also settles the site's other downloads still waiting. - Copy across volumes into a temp file beside the target and rename it in place, so a failed copy never truncates the file being replaced. - Report a download location that can't be saved, and keep it only once it is on disk. - Make website file names safe on every platform (Windows-reserved characters and device names, trailing dots, 240-byte limit), for panel saves and page downloads alike.
Member
Author
|
@codex review |
- Keep remembered download answers per origin (scheme, host, port), as
browsers scope site permissions; the short host is only the label.
- With "Ask where to save" on in the web build, a download that finishes
after the click expired waits for a Save click instead of saving without
the dialog (showSaveFilePicker needs a recent click).
- Cache fetched modules only as long as Cache-Control allows (max-age,
s-maxage less Age, at most 10 min), and never for no-store, no-cache or
private: a deploy at the same URL shows on the next load.
- Treat a comment between "import"/"from" and the specifier as an import,
so lazy chunks (import /* name */ ("./a.js")) stay external.
Member
|
@codex review |
1 similar comment
Member
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
This was referenced Oct 7, 2026
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.
Pages in the browser panel could save files without asking. In the desktop app's native views a page could start a download with no click and it went straight into Downloads, limited only by the rate cap. This adds a confirmation for files from websites and lets desktop users choose where downloads go.
Download confirmation
Download location (desktop app)
browser-download-folder.jsonin app data). The webview never sends a path, so a page can't point downloads at another folder. A chosen folder that no longer exists falls back to Downloads.browser_download_decide,browser_download_folder,browser_download_folder_pickandbrowser_download_folder_reset.Other settings
Module scripts in the web panel
Testing
tsc -b,npm run i18n:check:strictandnpm run bundle:checkpass, with no new eslint findings in the touched files. Browser and settings tests pass (46), including a new test for remembering, changing and forgetting a site's answer.pytest tests/test_browser_routes.pypasses (31), with new tests for inlining and for each case that keeps the tag. A live fetch of google.com/chrome comes back withsimplify-downloaddefined inline.cargo check --testspasses.cargo testforbrowser_downloads,native_file_dialogsandbrowser_webviewpasses, with a new test for moving a staged file to its target.Screenshots
Settings > Browser > Downloads, before and after: the new Ask before downloading and Site download permissions rows (Location is desktop only, so it is hidden on the web build).
The web browser panel opening an installer (7-zip.org): before, the page only says the file can't be shown; after, it asks Download this file? with Remember for next time, naming the site that was asked for rather than the host it redirected to.