Skip to content

Conversation

@marius-kilocode
Copy link
Collaborator

@marius-kilocode marius-kilocode commented Jan 9, 2026

Summary

  • Add "Create PR" button next to existing "Finish worktree" button for worktree sessions
  • Button sends instructions to the agent to handle git operations (commit, push, gh pr create)
  • Agent proposes clean branch name, commit message, PR title/description and waits for user confirmation before any irreversible action

Test plan

  • Start a worktree session and make changes
  • Verify PR button appears next to Finish worktree button
  • Click PR button → agent analyzes changes and proposes details
  • Confirm agent waits for user approval before commit/push
  • Verify PR is created with user-confirmed branch name and description
  • Test with completed session (button should resume session)
  • Test without gh CLI installed (agent should ask user to install)

Screenshots:

image image image

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

⚠️ No Changeset found

Latest commit: b76e88f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 9, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds a "Create Pull Request" button to the Agent Manager UI for worktree sessions. The implementation is clean and follows existing patterns.

Key Changes:

  • Added createPRTitle translation key to all 24 locale files
  • New handleCreatePR function in ChatInput.tsx that sends detailed instructions to the agent
  • New showCreatePR and parentBranch props passed from SessionDetail.tsx
  • Added parentBranch field to ParallelModeInfo interface in sessions.ts

Implementation Notes:

  • The PR button appears for worktree sessions with a branch name (both running and completed sessions)
  • The handler correctly differentiates between resuming completed sessions and queuing messages for running sessions
  • The instructions template guides the agent through a proper PR workflow with user confirmation steps
Files Reviewed (27 files)
  • webview-ui/src/i18n/locales/ar/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/ca/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/cs/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/de/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/en/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/es/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/fr/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/hi/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/id/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/it/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/ja/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/ko/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/nl/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/pl/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/pt-BR/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/ru/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/th/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/tr/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/uk/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/vi/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/zh-CN/agentManager.json - Translation added
  • webview-ui/src/i18n/locales/zh-TW/agentManager.json - Translation added
  • webview-ui/src/kilocode/agent-manager/components/ChatInput.tsx - New PR button and handler
  • webview-ui/src/kilocode/agent-manager/components/SessionDetail.tsx - Props for PR button visibility
  • webview-ui/src/kilocode/agent-manager/state/atoms/sessions.ts - Added parentBranch to interface

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 9, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds a "Create PR" button to the Agent Manager UI for worktree sessions. The implementation is clean and follows existing patterns in the codebase.

Key Changes:

  • Added createPRTitle translation key to all 22 locale files
  • Added handleCreatePR function in ChatInput.tsx that generates instructions for the agent to create a pull request
  • Added showCreatePR and parentBranch props to enable the button for worktree sessions
  • Added parentBranch to the ParallelModeInfo interface

Implementation Notes:

  • The button correctly appears only for worktree sessions with a branch name
  • Handles both running sessions (queues message) and completed sessions (resumes with message)
  • Uses the same styling patterns as existing action buttons
  • Properly adjusts hint text padding to accommodate the new button
Files Reviewed (25 files)
  • webview-ui/src/i18n/locales/ar/agentManager.json - translation added
  • webview-ui/src/i18n/locales/ca/agentManager.json - translation added
  • webview-ui/src/i18n/locales/cs/agentManager.json - translation added
  • webview-ui/src/i18n/locales/de/agentManager.json - translation added
  • webview-ui/src/i18n/locales/en/agentManager.json - translation added
  • webview-ui/src/i18n/locales/es/agentManager.json - translation added
  • webview-ui/src/i18n/locales/fr/agentManager.json - translation added
  • webview-ui/src/i18n/locales/hi/agentManager.json - translation added
  • webview-ui/src/i18n/locales/id/agentManager.json - translation added
  • webview-ui/src/i18n/locales/it/agentManager.json - translation added
  • webview-ui/src/i18n/locales/ja/agentManager.json - translation added
  • webview-ui/src/i18n/locales/ko/agentManager.json - translation added
  • webview-ui/src/i18n/locales/nl/agentManager.json - translation added
  • webview-ui/src/i18n/locales/pl/agentManager.json - translation added
  • webview-ui/src/i18n/locales/pt-BR/agentManager.json - translation added
  • webview-ui/src/i18n/locales/ru/agentManager.json - translation added
  • webview-ui/src/i18n/locales/th/agentManager.json - translation added
  • webview-ui/src/i18n/locales/tr/agentManager.json - translation added
  • webview-ui/src/i18n/locales/uk/agentManager.json - translation added
  • webview-ui/src/i18n/locales/vi/agentManager.json - translation added
  • webview-ui/src/i18n/locales/zh-CN/agentManager.json - translation added
  • webview-ui/src/i18n/locales/zh-TW/agentManager.json - translation added
  • webview-ui/src/kilocode/agent-manager/components/ChatInput.tsx - Create PR button and handler
  • webview-ui/src/kilocode/agent-manager/components/SessionDetail.tsx - Props for Create PR feature
  • webview-ui/src/kilocode/agent-manager/state/atoms/sessions.ts - parentBranch interface addition

@marius-kilocode marius-kilocode merged commit d0c3db6 into main Jan 9, 2026
12 checks passed
@marius-kilocode marius-kilocode deleted the am-pr-button branch January 9, 2026 12:53
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.

3 participants