Skip to content

refactor(agent-manager): remove redundant header buttons#4568

Merged
marius-kilocode merged 2 commits into
mainfrom
am-remove-dulicate-header-buttons
Dec 19, 2025
Merged

refactor(agent-manager): remove redundant header buttons#4568
marius-kilocode merged 2 commits into
mainfrom
am-remove-dulicate-header-buttons

Conversation

@marius-kilocode
Copy link
Copy Markdown
Collaborator

Removes redundant header buttons form header

Remove the 'New Agent' (Plus) and 'Refresh messages' (RefreshCw) buttons
from the session detail header. These actions are already available in
the sidebar, making the header buttons redundant.

Changes:
- Remove am-header-actions div with both buttons
- Remove unused imports: Plus, RefreshCw, selectedSessionIdAtom, useSetAtom
- Remove handleRefresh and handleNew functions
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 19, 2025

🦋 Changeset detected

Latest commit: 1a4a066

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

This PR includes changesets to release 1 package
Name Type
kilo-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

Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot Bot left a comment

Choose a reason for hiding this comment

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

✅ No Issues Found

2 files reviewed | Confidence: 95% | Recommendation: Merge

Review Details

Files:

  • .changeset/remove-agent-manager-header-buttons.md (new)
  • webview-ui/src/kilocode/agent-manager/components/SessionDetail.tsx (modified)

Checked: Security, bugs, unused code, import cleanup

Analysis:

  • All removed imports (useSetAtom, selectedSessionIdAtom, RefreshCw, Plus) are correctly cleaned up
  • Removed functions (handleRefresh, handleNew) were only used by the deleted buttons
  • No orphaned code or unused variables remain
  • Clean refactoring with proper changeset documentation

Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot Bot left a comment

Choose a reason for hiding this comment

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

✅ No Issues Found

2 files reviewed | Confidence: 95% | Recommendation: Merge

Review Details

Files:

  • .changeset/remove-agent-manager-header-buttons.md (changeset)
  • webview-ui/src/kilocode/agent-manager/components/SessionDetail.tsx (source)

Analysis:

This PR cleanly removes redundant "New Agent" and "Refresh messages" buttons from the SessionDetail component header. The changes are well-structured:

  1. Removed imports are correctly cleaned up:

    • useSetAtom removed from jotai (no longer needed)
    • selectedSessionIdAtom removed from sessions atoms
    • RefreshCw and Plus icons removed from lucide-react
  2. Removed handlers are safe to delete:

    • handleRefresh() - sent agentManager.refreshSessionMessages message
    • handleNew() - called setSelectedSessionId(null)
  3. Functionality preserved elsewhere:

    • The "New Agent" functionality is available in SessionSidebar.tsx via the handleNewSession() function which also calls setSelectedId(null)
    • The refresh functionality for remote sessions is available in SessionSidebar.tsx via handleRefresh() which sends agentManager.refreshRemoteSessions
  4. No breaking changes:

    • The removed buttons were UI-only; no API contracts or external interfaces affected
    • The selectedSessionIdAtom is still exported and used by SessionSidebar.tsx

Checked: Security, bugs, performance, error handling, dead code

@marius-kilocode marius-kilocode enabled auto-merge (squash) December 19, 2025 10:04
Copy link
Copy Markdown
Contributor

@eshurakov eshurakov left a comment

Choose a reason for hiding this comment

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

🚀

@marius-kilocode marius-kilocode merged commit b1702cd into main Dec 19, 2025
20 of 21 checks passed
@marius-kilocode marius-kilocode deleted the am-remove-dulicate-header-buttons branch December 19, 2025 10:32
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