Skip to content

fix(web): keep plan review pending in yolo mode#920

Open
tt-a1i wants to merge 1 commit into
MoonshotAI:mainfrom
tt-a1i:fix/web-plan-approval-yolo
Open

fix(web): keep plan review pending in yolo mode#920
tt-a1i wants to merge 1 commit into
MoonshotAI:mainfrom
tt-a1i:fix/web-plan-approval-yolo

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Jun 20, 2026

Copy link
Copy Markdown

Related Issue

Resolve #870

Problem

See linked issue.

What changed

  • Kept web plan-review approvals pending in YOLO mode instead of client-side auto-approving them.
  • Preserved auto mode behavior so approvals are still handled automatically there.
  • Added regression coverage for incoming and already-pending plan approvals in YOLO mode.
  • Added a patch changeset for the bundled web UI behavior fix.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a20b78c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tt-a1i tt-a1i marked this pull request as ready for review June 20, 2026 04:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a20b78c022

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


function shouldAutoApproveApproval(approval: AppApprovalRequest, mode: PermissionMode): boolean {
if (mode === 'auto') return true;
if (mode === 'yolo') return !isPlanReviewApproval(approval);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent session-scoped approvals for YOLO plan reviews

When a YOLO ExitPlanMode/plan_review request reaches this branch, it is no longer auto-approved and is rendered through the existing generic ApprovalCard. That card always offers “Approve for this session” and respondApproval forwards scope: 'session'; choosing it records a session-scoped ExitPlanMode approval, so later plan exits in the same session can bypass explicit review instead of using the TUI-style plan-review choices. Please add a plan-review-specific pending approval path or suppress the session-scoped action for these requests.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI- In Plan Mode using YOLO, when it finishes, it doesn't ask the user if they want to implement it, unlike the TUI

1 participant