Skip to content

fix(ui): refine auto-approval line for subagent and todo tools - #12556

Merged
bagatao-anaconda merged 2 commits into
mainfrom
fix/explain-tool-auto-approval
Jul 27, 2026
Merged

fix(ui): refine auto-approval line for subagent and todo tools#12556
bagatao-anaconda merged 2 commits into
mainfrom
fix/explain-tool-auto-approval

Conversation

@bagatao-anaconda

Copy link
Copy Markdown
Collaborator

Issue

https://anaconda.slack.com/archives/C0BJ2GQ40HM/p1784921579512329

Context

The auto-approval line felt disconnected on subagent cards, was unwanted on todo lists, and showed a noisy catch-all */* rule for blanket agent defaults. This refines its display on those tools.

Implementation

  • Subagent (task): attach the line to the card's trigger (under the title) instead of forcing open a collapsible body.
  • Todo writes (todowrite): hide the line — it's orchestration, not a mutating action to audit.
  • Wording: drop the matched * rule * fragment when the winning rule is the catch-all agent default, so it reads "by the {agent} agent"; specific/per-tool rules are still shown.

All changes are in Kilo-owned packages/kilo-ui/ — no shared upstream touch.

How to Test

Reviewer test steps

  1. Prompt for a subagent ("use a subagent to …") → line appears attached under the subagent title.
  2. Prompt for a todo list ("make a todo list …") → no auto-approval line.
  3. Run a tool auto-approved by the code agent's default → reads "Auto-approved · by the code agent" (no */*).

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Comment thread packages/kilo-ui/src/components/basic-tool.tsx Outdated
@kilo-code-bot

kilo-code-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Resolved since last review

  • packages/kilo-ui/src/components/basic-tool.tsx: the Show gating the auto-approval line now checks inBody() && approval() instead of approval() alone, so approvalPlacement="hidden" correctly suppresses the line for tools with children (e.g. todowrite). Backed by a new shouldRenderApprovalInBody unit test in basic-tool.test.ts.
Files Reviewed (6 files)
  • packages/kilo-ui/src/components/basic-tool.css
  • packages/kilo-ui/src/components/basic-tool.test.ts
  • packages/kilo-ui/src/components/basic-tool.tsx
  • packages/kilo-ui/src/components/message-part.tsx
  • packages/kilo-ui/src/components/tool-approval.test.ts
  • packages/kilo-ui/src/components/tool-approval.tsx
Previous Review Summary (commit 61c8622)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 61c8622)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-ui/src/components/basic-tool.tsx 43 approvalPlacement="hidden" doesn't hide the approval line when the tool passes children (e.g. todowrite), contradicting the PR's stated goal

Other notes

  • This is a user-facing behavior change (auto-approval line placement/visibility) with no changeset added. Consider adding one per AGENTS.md guidance on user-facing changes.
  • Everything else is confined to packages/kilo-ui/ (Kilo-owned), the */* catch-all rule suppression logic is correct, and the new resolveToolApproval tests exercise the real implementation.
Files Reviewed (5 files)
  • packages/kilo-ui/src/components/basic-tool.css
  • packages/kilo-ui/src/components/basic-tool.tsx - 1 issue
  • packages/kilo-ui/src/components/message-part.tsx
  • packages/kilo-ui/src/components/tool-approval.test.ts
  • packages/kilo-ui/src/components/tool-approval.tsx

Fix these issues in Kilo Cloud


Reviewed by claude-sonnet-5 · Input: 28 · Output: 4.4K · Cached: 633.2K

Review guidance: REVIEW.md from base branch main

@bagatao-anaconda
bagatao-anaconda merged commit ee77f9e into main Jul 27, 2026
28 checks passed
@bagatao-anaconda
bagatao-anaconda deleted the fix/explain-tool-auto-approval branch July 27, 2026 13:22
@bagatao-anaconda bagatao-anaconda self-assigned this Jul 27, 2026
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…-approval

fix(ui): refine auto-approval line for subagent and todo tools
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.

2 participants