Repository navigation
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 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e6eacf322
ℹ️ 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".
| (permissionPillVisible ? 1 : 0) + | ||
| 4 + | ||
| (showImagePill ? 1 : 0) + | ||
| (showRagPill && ragEnabled && !ragDisabled ? 1 : 0) + |
There was a problem hiding this comment.
Count disabled RAG pills before compacting
When RAG has been enabled and then becomes disabled (for example after loading a local model without tool support), KnowledgeBaseComposerButton still renders the dimmed RAG pill so the user can turn it off. This expression stops counting that visible pill, so in compare mode Compare + permissions + Search + Code + disabled RAG is five visible pills while pillsCompact stays false, leaving full labels in a row that should switch to the compact layout; the normal composer has the same undercount when another optional pill is visible.
Useful? React with 👍 / 👎.
| <span className="composer-pill-glyph"> | ||
| <ActiveIcon className="size-[15px]" strokeWidth={2} /> | ||
| <XIcon className="composer-pill-x" /> | ||
| </span> |
There was a problem hiding this comment.
Avoid hiding the Full access icon on hover
When Full access is selected, the button still has data-active="true", which matches the existing CSS rule that hides .composer-pill-glyph > :not(.composer-pill-x) on hover and expects the X icon to appear. Since this change removes the .composer-pill-x from the permission pill, hovering the Full access pill leaves an empty glyph slot and the danger indicator disappears.
Useful? React with 👍 / 👎.
| <span className="composer-pill-glyph"> | ||
| <ActiveIcon className="size-[15px]" strokeWidth={2} /> | ||
| <XIcon className="composer-pill-x" /> | ||
| </span> | ||
| <span>{active.label}</span> |
There was a problem hiding this comment.
Keep the main composer expanded in off mode
Now that this pill renders even for the off/Run automatically mode, the main composer still computes composerExpanded with permissionMode !== "off"; with no other active tool, selecting Run automatically leaves this pill visible but keeps Search and Code inside the non-rendered expanded branch. That contradicts the new always-visible permission control behavior and hides the primary tool toggles until the user reopens them through the plus menu or activates another tool.
Useful? React with 👍 / 👎.
# Conflicts: # .github/workflows/studio-mac-ui-smoke.yml # .github/workflows/studio-windows-ui-smoke.yml # studio/frontend/src/features/chat/permission-mode-select.tsx
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
|
I built current main and this branch merged with main, served each from an isolated Studio home, and ran the focused permission flow in bundled Chromium. On main the flow fails at the permission step: the menu still shows the legacy Off entry and no Run automatically. On the merged branch it passes end to end, from the renamed labels and legacy setting migration through the Full access confirmation, with LGTM to merge @shimmyshimmer. |
Summary
Tool permissions.Offlabel toRun automaticallywithout changing its stored value or backend behavior.Behavior
Ask for approvalcontinues to useask.Approve for mecontinues to useauto.Run automaticallycontinues to useoff.Full accessremains session-only and still requires explicit confirmation.confirm_tool_callsvalues continue to migrate to the same modes.Browser coverage
The focused permission flow now covers:
CI runs the existing full Chromium flow and adds focused coverage for Firefox, WebKit, installed Chrome, and installed Edge on the available operating-system runners.
Validation
npm run typechecknpm run i18n:checknpm run build