feat(jetbrains): add From PR and From Branch tabs to New Worktree dialog - #13440
Merged
Conversation
Split the New Worktree dialog into three tabs — New, From PR, From Branch — replacing the radio-button import source picker. The selected tab alone determines what OK does, so import failures now surface tab-specific notifications. Extract PR-URL parsing into shared ai.kilocode.rpc.parsePrUrl so both the frontend dialog and backend importPr use one parser. Add BranchPicker, an editable branch combo, and guard the platform BasicComboBoxUI.getDisplaySize NPE by reinstalling the UI editor before size computation.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (13 files)
Previous Review Summary (commit 67b9629)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 67b9629)Status: No Issues Found | Recommendation: Merge Files Reviewed (11 files)
Reviewed by grok-4.6 · Input: 109.6K · Output: 20.6K · Cached: 848.8K Review guidance: REVIEW.md from base branch |
marius-kilocode
approved these changes
Aug 26, 2026
Collaborator
|
@kirillk Interesting, would love a screeenshot. |
Contributor
Author
there's nothing fancy, just split it into 3 views since they're exclusive to each other
|
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Issue
No linked issue — this is a follow-up refinement to the JetBrains Agent Manager New Worktree flow.
Context
The JetBrains plugin's New Worktree dialog previously used a single "Import" tab with a
radio pair to choose between importing a GitHub pull request and importing a local branch.
The radios were redundant chrome: the two inputs are mutually exclusive, so the choice is
better expressed as tabs. This PR splits the dialog into three top-level tabs — New,
From PR, and From Branch — and removes the radio buttons.
It also fixes a crash: opening the dialog on IntelliJ 2026.1 / JBR 25 could throw an NPE
from the platform's editable-combo layout code (
BasicComboBoxUI.getDisplaySizedereferencinga null
editor), taking down the whole dialog.Implementation
DialogTabbecomesNEW | PR | BRANCH; the selected tab alone decideswhat OK does, so
submit()is a direct dispatch tosubmitCreate()/submitPr()/submitBranch(). The radio pair, itsButtonGroup, and all the document/focus listenersthat only existed to flip the radios are gone.
WorktreeControllernow carries aCreateKind(
CREATE/BRANCH/PR) through the create/import path and reports failures via aCreateFailurepayload, so the panel can show the right "couldn't import PR/branch" title.parsePrUrl/PrRefmoved from the backend RPC impl intopackages/kilo-jetbrains/shared(ai.kilocode.rpc.parsePrUrl) so the frontend dialog andbackend
importPruse one parser.BranchPicker+ NPE fix. The base/branch combos are now a smallBranchPicker(editable, fuzzy-matching branch combo).
DarculaComboBoxUItolerates a transient nulleditor everywhere it overrides, but the inherited
BasicComboBoxUI.getDisplaySizedereferences it for editable combos.
BranchPicker.getPreferredSizereinstalls the UIeditor if the platform dropped it, before size computation reads it.
.kilo/plans/**intentionally excluded from this commit per repo policy.Screenshots / Video
N/A — I can't capture the running IDE from here. The visible change is the New Worktree
dialog showing three tabs (New / From PR / From Branch) instead of one New tab plus an
Import tab with two radio buttons.
How to Test
Manual/local verification
./gradlew :frontend:test --tests ai.kilocode.client.agentManager.worktree.NewWorktreeDialogTest— 19 tests pass (agent-executed), including the new three-tab routing test and the dropped-editor layout regression../gradlew typecheck— passes (agent-executed)../gradlew test— full JetBrains suite passes (agent-executed).Reviewer test steps
Run IDE (Split Mode)or./gradlew runIde), open Agent Manager, trigger New Worktree.Blocked checks and substitute verification
Checklist
package.jsonversioning, not the monorepo changeset flow)Get in Touch