Repository navigation
feat: setup asks for Chrome's Allow User Scripts; the model is told when only the switch blocks scripts - #4
Merged
Conversation
…hen only the switch blocks scripts Run script is Ask by default, but Chrome's Allow User Scripts switch is off for every new install, so pi dropped run_script without the user or the model knowing why (design 6.23). - Setup: once the provider is ready, while Run script is Ask or On and the switch is off, the chat view shows "Let pi run scripts on pages" with "Open pi's Chrome details page" and Skip. It does not block the message box. The panel reads the switch on focus, when shown, and every second while the card shows; when it sees the switch on, the card closes and "Scripts enabled in Chrome" stays outside it for a few seconds and is announced. - Skip ends the step only: Run script, Settings > Tools, and the note to the model stay. Only that the step is done is saved (settings.scriptsOnboarded), never the switch, so the step does not come back if the switch goes off later. - Model: while only the switch keeps run_script back, the instructions say why and where to enable it, to mention it only when the task materially needs a script. run_script stays unoffered; the note names no tool. - Settings > Tools: the off line says to scroll down on the details page. - Docs: page-tools.md (the note, the setup step), guide, READMEs, privacy. Tests: unit tests for the setting and the note; e2e for the step shown, turned on with the confirmation, staying closed after the switch goes off, and Skip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jWSj3brZcX45UHmLWfNW4
The setup card for Allow User Scripts showed at the top of the chat view in this suite (provider ready, Run script on Ask, switch off), pushing the transcript down so "diagrams in view" (a diagram's top 40 to 200 px from the top) could never hold. The suite measures diagram layout, not setup: it seeds the step as done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jWSj3brZcX45UHmLWfNW4
yzhg1983
added a commit
that referenced
this pull request
Nov 2, 2026
…hen only the switch blocks scripts (#4) * feat: setup asks for Chrome's Allow User Scripts; the model is told when only the switch blocks scripts Run script is Ask by default, but Chrome's Allow User Scripts switch is off for every new install, so pi dropped run_script without the user or the model knowing why (design 6.23). - Setup: once the provider is ready, while Run script is Ask or On and the switch is off, the chat view shows "Let pi run scripts on pages" with "Open pi's Chrome details page" and Skip. It does not block the message box. The panel reads the switch on focus, when shown, and every second while the card shows; when it sees the switch on, the card closes and "Scripts enabled in Chrome" stays outside it for a few seconds and is announced. - Skip ends the step only: Run script, Settings > Tools, and the note to the model stay. Only that the step is done is saved (settings.scriptsOnboarded), never the switch, so the step does not come back if the switch goes off later. - Model: while only the switch keeps run_script back, the instructions say why and where to enable it, to mention it only when the task materially needs a script. run_script stays unoffered; the note names no tool. - Settings > Tools: the off line says to scroll down on the details page. - Docs: page-tools.md (the note, the setup step), guide, READMEs, privacy. Tests: unit tests for the setting and the note; e2e for the step shown, turned on with the confirmation, staying closed after the switch goes off, and Skip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jWSj3brZcX45UHmLWfNW4 * test: the diagrams suite starts with the Allow User Scripts step done The setup card for Allow User Scripts showed at the top of the chat view in this suite (provider ready, Run script on Ask, switch off), pushing the transcript down so "diagrams in view" (a diagram's top 40 to 200 px from the top) could never hold. The suite measures diagram layout, not setup: it seeds the step as done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013jWSj3brZcX45UHmLWfNW4 --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Why
Run script defaults to Ask, but Chrome's "Allow User Scripts" switch is off on every new install. Until now pi quietly dropped
run_scriptin that case, and neither the user nor the model knew why. The only hint was a line in Settings > Tools. This PR treats scripts as a core feature and makes the gap visible (design 6.23).What changes
Setup step
run_script; nothing retries automatically.settings.scriptsOnboardedis stored, never the switch. If the switch is already on, the step is marked done without showing. The step never comes back, even if the switch is turned off later.Model hint
run_scriptstays unoffered while the switch is off.SCRIPTS_BLOCKED) that names no tool: say so, and where to enable it, only when the task materially needs a script. Nothing changes when Run script is Off.Settings > Tools
Docs
docs/page-tools.md: the hint word for word, plus a new "Setup: Allow User Scripts" section.docs/guide.md, both READMEs (Quick start step 4) andPRIVACY.md.Tests
npm test: 615 passed. New unit tests cover the setting's default and that Skip changes nothing else, and that the hint appears only while the switch alone is blocking (not when Run script is Off, not when the switch is on).test:page-tools(61 checks), with new checks for:test:localization(268 checks), with new checks for the card in English, Skip, and the card staying closed after a restart in Chinese.test:screenshots,test:slash,test:edit,test:attachmentsandtest:selectionstill pass.Generated by Claude Code