feat(cli): cycle Shift+Tab through Full Access and add ⏵⏵ auto mode label#27158
feat(cli): cycle Shift+Tab through Full Access and add ⏵⏵ auto mode label#27158emersonbusson wants to merge 1 commit into
Conversation
…abel
Adds Full Access (the existing --yolo / ApprovalMode.YOLO mode) to the
in-session Shift+Tab cycle and renders a clear "⏵⏵ auto mode on"
indicator. Closes the UX gap where Full Access is reachable only via
the CLI flag or Ctrl+Y, with no visible cue in the footer.
- Shift+Tab cycles linearly:
DEFAULT → AUTO_EDIT → PLAN? → YOLO? → DEFAULT
PLAN is skipped when !allowPlanMode; YOLO is skipped when
config.isYoloModeDisabled() (settings.security.disableYoloMode,
admin.secureModeEnabled, or untrusted folder).
- Ctrl+Y still works as the direct manual ↔ auto toggle.
- Indicator labels match Claude Code's visual language (extracted
from the public claude binary v2.1.143):
"⏵⏵ accept edits on" (warning)
"plan mode on" (success)
"⏵⏵ auto mode on" (error)
Subtext shows the next destination ("Shift+Tab to plan" /
"...to auto mode" / "...to manual").
- allowYoloMode prop plumbed through UIState/AppContainer/StatusRow
mirroring how allowPlanMode is already wired.
Scope is UX only. No changes to settings schema, policy engine, shell
execution, the ApprovalMode enum, --yolo flag, or any existing path.
Existing guards (disableYoloMode, secureModeEnabled) remain authoritative
— the cycle just respects them.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the in-session approval mode UX by integrating 'Full Access' mode into the standard Shift+Tab cycle. It addresses a previous gap where this mode was only accessible via CLI flags or keyboard shortcuts, providing users with a more intuitive and visible way to toggle between different approval states while respecting existing security and configuration constraints. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request implements a linear cycling logic for approval modes (DEFAULT → AUTO_EDIT → PLAN → YOLO → DEFAULT) and introduces the ability to disable "YOLO" mode (now referred to as "Full Access mode" in user-facing strings) based on configuration or folder trust levels. It adds a new allowYoloMode state to the UI context, updates the ApprovalModeIndicator component with new glyphs and text, and includes comprehensive test coverage for the updated cycling behavior and security constraints. I have no feedback to provide as no review comments were submitted.
|
@google-gemini/gemini-cli-maintainers Could a maintainer please reconsider the The body now links to #27035 ("Shift+Tab does not change mode" — Per |
Summary
Adds Full Access (the existing
--yolo/ApprovalMode.YOLOmode) to the in-sessionShift+Tabcycle and renders a clear⏵⏵ auto mode onindicator. Closes the UX gap where Full Access is reachable only via CLI flag orCtrl+Y, with no visible cue in the footer that it exists.Details
Shift+Tabcycle is now linear and includes Full Access:DEFAULT → AUTO_EDIT → PLAN? → YOLO? → DEFAULT.PLANis skipped when!allowPlanMode.YOLOis skipped whenconfig.isYoloModeDisabled()(i.e.security.disableYoloMode,admin.secureModeEnabled, or untrusted folder).Ctrl+Ystill works as the direct manual ↔ auto toggle.claudebinary v2.1.143):⏵⏵ accept edits on(wasauto-accept edits, warning color)plan mode on(wasplan, success color)⏵⏵ auto mode on(wasYOLO, error color)Shift+Tab to plan/Shift+Tab to auto mode/Shift+Tab to manual.allowYoloModeprop added toUIStateand plumbed throughAppContainer→StatusRow→ApprovalModeIndicator, mirroring howallowPlanModeis already wired.disableYoloMode,secureModeEnabled, untrusted folders) all remain authoritative — the cycle just respects them.Scope
UX/UI only. No changes to:
settings.jsonparsing (a follow-up PR will let users persistdefaultApprovalMode: "full_access"once the alias work in feat(cli): add full-access approval controls #27026 lands).ApprovalModeenum,--yoloflag, or any existing CLI path.Related Issues
Closes #27035
Related to (platform-specific variants of the broken Shift+Tab cycle):
How to Validate
gemini→ footer showsShift+Tab to accept edits(unchanged default).Shift+Tabonce: footer shows⏵⏵ accept edits on Shift+Tab to plan(orto auto modeif plan is disabled).Shift+Taband watch it cycle throughplan mode on→⏵⏵ auto mode on→ default.Ctrl+Ytoggles directly to/from⏵⏵ auto mode on.~/.gemini/settings.jsoncontaining{ "security": { "disableYoloMode": true } },Shift+Tabskips YOLO in the cycle (cycle:default → ⏵⏵ accept edits on → plan mode on → default).Pre-Merge Checklist
useApprovalModeIndicator.test.ts,ApprovalModeIndicator.test.tsx+ regenerated snapshot,StatusRow.test.tsx,AppContainer.test.tsx)ApprovalMode.YOLO,--yolo,Ctrl+Y, and theauto_edit/plancycle entries all behave the same way externally