Skip to content

feat(cli): cycle Shift+Tab through Full Access and add ⏵⏵ auto mode label#27158

Open
emersonbusson wants to merge 1 commit into
google-gemini:mainfrom
emersonbusson:feat/full-access-cycle-and-labels
Open

feat(cli): cycle Shift+Tab through Full Access and add ⏵⏵ auto mode label#27158
emersonbusson wants to merge 1 commit into
google-gemini:mainfrom
emersonbusson:feat/full-access-cycle-and-labels

Conversation

@emersonbusson
Copy link
Copy Markdown
Contributor

@emersonbusson emersonbusson commented May 16, 2026

Summary

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 CLI flag or Ctrl+Y, with no visible cue in the footer that it exists.

Details

  • Shift+Tab cycle is now linear and includes Full Access: DEFAULT → AUTO_EDIT → PLAN? → YOLO? → DEFAULT.
    • PLAN is skipped when !allowPlanMode.
    • YOLO is skipped when config.isYoloModeDisabled() (i.e. 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 (was auto-accept edits, warning color)
    • plan mode on (was plan, success color)
    • ⏵⏵ auto mode on (was YOLO, error color)
    • Subtext shows the next destination: Shift+Tab to plan / Shift+Tab to auto mode / Shift+Tab to manual.
  • allowYoloMode prop added to UIState and plumbed through AppContainerStatusRowApprovalModeIndicator, mirroring how allowPlanMode is already wired.
  • Existing guards (disableYoloMode, secureModeEnabled, untrusted folders) all remain authoritative — the cycle just respects them.

Scope

UX/UI only. No changes to:

  • Settings schema or settings.json parsing (a follow-up PR will let users persist defaultApprovalMode: "full_access" once the alias work in feat(cli): add full-access approval controls #27026 lands).
  • Policy engine.
  • Shell execution.
  • The ApprovalMode enum, --yolo flag, or any existing CLI path.

Related Issues

Closes #27035

Related to (platform-specific variants of the broken Shift+Tab cycle):

How to Validate

  1. gemini → footer shows Shift+Tab to accept edits (unchanged default).
  2. Press Shift+Tab once: footer shows ⏵⏵ accept edits on Shift+Tab to plan (or to auto mode if plan is disabled).
  3. Continue pressing Shift+Tab and watch it cycle through plan mode on⏵⏵ auto mode on → default.
  4. From any state, Ctrl+Y toggles directly to/from ⏵⏵ auto mode on.
  5. With ~/.gemini/settings.json containing { "security": { "disableYoloMode": true } }, Shift+Tab skips YOLO in the cycle (cycle: default → ⏵⏵ accept edits on → plan mode on → default).

Pre-Merge Checklist

  • Tests added/updated (useApprovalModeIndicator.test.ts, ApprovalModeIndicator.test.tsx + regenerated snapshot, StatusRow.test.tsx, AppContainer.test.tsx)
  • No breaking changes — ApprovalMode.YOLO, --yolo, Ctrl+Y, and the auto_edit/plan cycle entries all behave the same way externally
  • Validated on Linux (Ubuntu 24.04, Node 24.15.0)

…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.
@emersonbusson
Copy link
Copy Markdown
Contributor Author

Related: #27156, #27157 — sibling Full Access UX improvements opened together. Each is independently reviewable and mergeable. A small follow-up will let users persist defaultApprovalMode: "full_access" in settings once #27026 lands.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Shift+Tab Cycle Update: The Shift+Tab approval mode cycle is now linear and includes 'Full Access' (formerly YOLO) mode, following the sequence: DEFAULT → AUTO_EDIT → PLAN? → YOLO? → DEFAULT.
  • UI/UX Improvements: Added a clear '⏵⏵ auto mode on' indicator and updated labels to match the Claude Code visual language, providing better visibility into the current approval state.
  • Conditional Mode Availability: The cycle intelligently skips modes based on configuration; PLAN is skipped if disabled, and Full Access is skipped if restricted by security settings or untrusted folders.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gemini-cli gemini-cli Bot added priority/p3 Backlog - a good idea but not currently a priority. area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. labels May 16, 2026
@emersonbusson
Copy link
Copy Markdown
Contributor Author

@google-gemini/gemini-cli-maintainers Could a maintainer please reconsider the 🔒 maintainer only label on this PR?

The body now links to #27035 ("Shift+Tab does not change mode" — area/core, effort/small, priority/p2, not maintainer-only) as the issue this PR closes. The fix is entirely in the in-session approval-mode cycle (useApprovalModeIndicator.ts) and the rendering of the footer indicator (ApprovalModeIndicator.tsx) — UX surface that matches the area/core placement of the linked issue rather than the auto-applied area/agent label here.

Per CONTRIBUTING.md, the 🔒 maintainer only tag would normally close this PR from external contribution. Happy to scope down further or split if there's a piece you'd like to keep maintainer-owned; otherwise, the change is straightforward (10 files, mostly mechanical prop plumbing for allowYoloMode, plus the cycle and label changes). Thanks!

@gemini-cli gemini-cli Bot added priority/p2 Important but can be addressed in a future release. area/core Issues related to User Interface, OS Support, Core Functionality labels May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. priority/p2 Important but can be addressed in a future release. priority/p3 Backlog - a good idea but not currently a priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shift+Tab does not change mode

1 participant