Studio: clarify tool permission controls#7181
Conversation
There was a problem hiding this comment.
Code Review
This pull request rebrands "Bypass permissions" to "Tool permissions" across the user interface, renames the "Off" permission level to "Run automatically", and reorders the permission options so that "Full access" is positioned last. Additionally, it removes the ability to dismiss the permission pill directly from the composer and simplifies the pill compacting logic. Feedback is provided regarding the pillsCompact calculation in thread.tsx, which should account for whether the RAG tool is disabled to ensure consistent pill collapsing behavior.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| // More than 4 pills: collapse to icons only. Search, Code, and permissions | ||
| // always show; Images, RAG, Canvas and MCP are conditional. | ||
| const pillsCompact = | ||
| 2 + | ||
| (permissionMode !== "off" ? 1 : 0) + | ||
| 3 + | ||
| (ragEnabled ? 1 : 0) + |
There was a problem hiding this comment.
The pillsCompact calculation in thread.tsx counts the RAG pill whenever ragEnabled is true. However, if the active model does not support tools or is an external model, the RAG pill is disabled and hidden (ragDisabled is true). To ensure consistency with shared-composer.tsx and prevent incorrect pill collapsing, we should retrieve ragDisabled using the useRagToolDisabled() hook and check !ragDisabled in the calculation.
| // More than 4 pills: collapse to icons only. Search, Code, and permissions | |
| // always show; Images, RAG, Canvas and MCP are conditional. | |
| const pillsCompact = | |
| 2 + | |
| (permissionMode !== "off" ? 1 : 0) + | |
| 3 + | |
| (ragEnabled ? 1 : 0) + | |
| const ragDisabled = useRagToolDisabled(); | |
| // More than 4 pills: collapse to icons only. Search, Code, and permissions | |
| // always show; Images, RAG, Canvas and MCP are conditional. | |
| const pillsCompact = | |
| 3 + | |
| (ragEnabled && !ragDisabled ? 1 : 0) + |
|
Codex Review: Didn't find any major issues. 👍 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". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d7b582fd6
ℹ️ 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".
|
|
||
| - name: Cross-browser permission controls | ||
| run: | | ||
| bash .github/scripts/run-studio-permission-browser.sh 18893 firefox |
There was a problem hiding this comment.
Include the permission helper in UI CI triggers
This new step depends on .github/scripts/run-studio-permission-browser.sh, but the workflow's pull_request.paths list only includes the app/test directories and this YAML, not the new helper script. A PR that changes only the helper can therefore alter the command these browser runs execute without running Studio UI CI, so regressions in the helper won't be caught until another workflow trigger happens; add the helper path to the trigger list.
Useful? React with 👍 / 👎.
| - name: Cross-browser permission controls | ||
| run: | | ||
| bash .github/scripts/run-studio-permission-browser.sh 18895 webkit | ||
| bash .github/scripts/run-studio-permission-browser.sh 18895 chromium chrome |
There was a problem hiding this comment.
Avoid Chrome-channel runs with the pinned Mac driver
In this macos-14 job, the install step pins Playwright to >=1.55,<1.58, but this new run launches the runner's branded Chrome via channel='chrome'. Playwright 1.57's release notes list Google Chrome 139 as the tested stable channel, while the current GitHub macos-14 runner image lists Chrome 149, so this check can fail or become flaky from a browser/protocol mismatch; use the bundled Chromium here or update/unpin Playwright before adding a Chrome-channel run.
Useful? React with 👍 / 👎.
Summary
Offmode toRun automaticallyBypass permissionscontrols toTool permissionsWhy
This is a frontend follow-up to #7079.
The
offvalue does not disable tool execution. It runs tool calls automatically inside the sandbox, so theOfflabel hid an important behavior. The composer also hid the permission pill in that mode, selecting the active row silently changed the mode, and the pill placed a second interactive control inside its dropdown button.The updated controls show the active policy at all times, describe each mode by what it does, and require an explicit menu choice for every permission change.
Validation
npm run typechecknpm run i18n:checknpm run build