Repository navigation
Studio: Always allow on the browser script prompt saves that site's Scripts rule - #17959
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Nov 16, 2026
danielhanchen
pushed a commit
to danielhanchen/unsloth-staging-2
that referenced
this pull request
Nov 16, 2026
[skip ci]
Member
Author
|
@codex review |
1 similar comment
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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". |
1 task done
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.
Fixes #17837
Problem
When the browser agent wants to run a script on a page, the prompt only offers Deny and Allow. #16707 added hands-off options for scripts, but only in Settings > Browser (Run scripts: Always allow, or a per-site Scripts rule under Agent permissions). Nothing on the prompt leads there. A user who keeps answering the prompt keeps getting it on every script, so a task left running on a trusted site stalls until someone comes back to click Allow again. The "Always allow" answers people give on other prompts (opening a site, sign-ins, risky buttons) never cover scripts, which reads as if Always allow is ignored.
What changes
www.dropped, as the Settings site list does), so later scripts on that site run without asking. Other sites still ask.Clicking Always allow again is never needed (the next script on that site is not asked), and saving the same rule twice gives the same stored value.
Tests
tests/browser-agent-script-allow.test.ts: drives the real executor. The script prompt offers Always allow; answering it runs the script, storesscripts: "allow"on the existing site rule while keeping its other fields (downloads: "block"survives); the next script on that site runs without a prompt; a script on another site still asks and does not run. Fails on main (the prompt offers no Always allow there).tests/browser-agent-gate.test.ts:scriptSiteRulesaves the page's own host rather than a broader matching rule, keeps the broader rule's fields, updates an existing rule in place, returns null for about:blank and for a full list while still updating a site already on it.Local:
npm run typecheckclean,npm test16407 tests, 16406 pass, 1 skipped, 0 failures.Screenshots
Base (
501ad46cb, merge base) vs this PR, each from its own checkout: the real executor and agent bar in a Vite harness, with only the page answered by a stub (as in the node tests). A script onshop.example.comis asked, answered, then a second script on the same site is sent.The script prompt gains Always allow.
Settings > Browser after answering. Before: Allow saves nothing and the second script asks again. After: Always allow adds
shop.example.comwith Scripts set to Always allow, and the second script runs without a prompt.