Skip to content

Studio: remember download answers for a site or every site, programs included - #16658

Merged
shimmyshimmer merged 2 commits into
mainfrom
studio-download-remember
Nov 4, 2026
Merged

shimmyshimmer merged 2 commits into
mainfrom
studio-download-remember

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

What changes

The browser panel's "Download this file?" prompt had a single "Remember for next time" checkbox. It covered only the current site. It was hidden for files that can run programs (.dmg, .exe, .msi, ...), so downloading the Unsloth Desktop .dmg asked every time, with no way to stop it.

The checkbox is now a three-way choice:

  • Ask next time is the default and remembers nothing.
  • Always for {site}:
    • Download allows that site from then on. Cancel blocks it, as before.
    • Allowing a program file this way also covers that site's later program files. The new per-site choice for this is Allow programs too.
  • Always download, from every site:
    • Download turns off the download prompt everywhere. Cancel only cancels this file and blocks nothing.
    • Choosing it while a program file is being asked about also turns off asking for program files.

Program files

  • Still asked by default. "Always" on an ordinary file never covers them.
  • Stop only when you choose it while a program file is being asked about, or in Settings.
  • Downloads started by the browser agent still always ask for program files, whatever was remembered.

Settings > Browser

  • Site download permissions gains Allow programs too next to Always allow and Always block.
  • New switch: Ask before downloading programs (on by default). It turns the program prompt back on after "every site" was chosen.

Verified

  • Checks: npm run typecheck, biome lint on the changed files (no errors) and npm run build pass. npm test gives 14875 passed. Three timing-sensitive tests failed in the full run (streaming-latex-retro-edit, codex-picker-catalog-fallback, llama-cpp-auto-reload); none touch these files, and all three pass when rerun alone.
  • New test in tests/browser-settings.test.ts. It replaces the source-text check that the program prompt had no checkbox, and covers:
    • a program remembered for a site (other sites still ask);
    • Cancel with "every site" not being kept;
    • "every site" on an ordinary file leaving programs asking;
    • "every site" on a program turning that off;
    • agent program downloads still asking.
  • In an isolated Studio: opening the latest Unsloth-Desktop-MacOS.dmg release link in the browser panel shows the new choices:

Download prompt with the remember choices

Not covered

  • Only English strings are updated. Other locales fall back to English for the new keys. In those locales, the old empty-list hint in Settings still mentions the checkbox.

shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 4, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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-11-04T13:18:32.822208Z e8a81c8 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.

@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: 1f576fdca0

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

Comment on lines +95 to +99
const covered = (other: DownloadRequest) => !(allow && other.dangerous && !programs);
const answered = everywhere
? queue.filter((other) => other === request || covered(other))
: site
? queue.filter((other) => other === request || (other.origin === request.origin && covered(other)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve agent approval requirements when settling queued downloads

If a program download is awaiting approval and another program download from the browser agent is queued behind it, choosing Download with “Always for this site” (for the same origin) or “Always download, from every site” also approves the agent's program without presenting its prompt. covered() checks only whether the file is dangerous, and queued requests do not retain agentRule, so this bypasses the explicit agent-program approval requirement enforced in approveDownload(). Retain the request's agent approval requirement and exclude those requests from remembered bulk approvals.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in e8a81c8: queued requests now record whether they came from the agent's tab, and a remembered answer never settles those; covered by a test.

Comment on lines +57 to +59
{(["once", "site", "all"] as const)
// Without a web origin (data:, an opaque blob) there's no site to remember.
.filter((option) => option !== "site" || request.origin)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor the global remember choice for context-menu downloads

For a program downloaded through the native browser's context menu, this now offers “Always download, from every site,” but choosing it does not prevent the next context-menu program download from asking again. native-view.ts routes these downloads through approveChosenDownload(), which unconditionally queues dangerous files without checking askBeforeProgramDownloads. The choice therefore disables prompts for ordinary navigation downloads while leaving the very flow where it was selected unchanged. Make that path honor the global program preference, or avoid offering an inapplicable remember choice there.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in e8a81c8: approveChosenDownload now skips the prompt for programs once askBeforeProgramDownloads is off; covered by a test.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 4, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: e8a81c8ddc

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

@shimmyshimmer
shimmyshimmer merged commit eec7711 into main Nov 4, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-download-remember branch November 4, 2026 13:20
danielhanchen added a commit that referenced this pull request Nov 4, 2026
…ompts in every locale (#16677)

## Summary

`Frontend build + bundle sanity` runs `npm run i18n:check:strict`, and
that step fails on main for every PR. For example #16671, which only
touches the glass wallpaper:

```
=== nl ===
Missing keys (will fall back to en): 9
  - browser.agent.step.tabs
  - browser.agent.step.readFile
  - browser.agent.step.editFile
  - browser.askBeforeProgramDownloadsSetting
  - browser.askBeforeProgramDownloadsSettingDescription
  - browser.downloadSiteAllowAll
  - browser.downloadPrompt.once
  - browser.downloadPrompt.site
  - browser.downloadPrompt.all
Missing keys above. Add them to every overlay, or run without --strict to accept the English fallback.
```

The same 9 keys are missing from all 24 overlays. Two PRs added them to
`en.ts` only:

- #16644 (`71c643e02a`) added the browser agent's `tabs`, `readFile` and
`editFile` steps.
- #16658 (`eec7711a42`) added the program download setting, "Allow
programs too", and the three `downloadPrompt` choices.

Both features are fine. They only skipped the overlay step the strict
gate asks for, so non-English users currently see these strings in
English.

## Change

`studio/frontend/src/i18n/locales/*.ts`, every overlay except `en.ts`.
Each one gets the 9 keys, placed where `en.ts` has them:

- the three agent steps after `drag` in `browser.agent.step`;
- the two program download settings after
`askBeforeDownloadingSettingDescription`;
- `downloadSiteAllowAll` after `downloadSiteAllow`;
- `once`, `site` and `all` after `remember` in `browser.downloadPrompt`.

The wording follows each locale's existing neighbours. Agent steps use
the same form as that locale's other steps, for example "Zieht" / "Liest
die Datei" in German, "Arrastrando" / "Leyendo el archivo" in Spanish,
and "正在拖动" / "正在读取文件" in Simplified Chinese. The download strings reuse
that locale's terms for "download", "always allow" and "site". `{host}`
is kept in every `site` string. `es-419` uses the same text as `es`. No
English string and no other key changes.

## Testing

- `npm run i18n:check:strict`: main fails with 9 missing keys in each of
the 24 overlays. This branch passes, `Missing keys (will fall back to
en): 0` for every locale, "All locale overlays pass parity."
- Removing `browser.downloadPrompt.site` from `nl.ts` again makes the
strict check fail and name that key, so the gate still catches a missing
key.
- `tests/lazy-locale-loading.test.ts` and
`tests/locale-detection.test.ts`: 35 passed.
- `tsc --noEmit -p tsconfig.app.json` reports nothing in `src/i18n`.
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