Skip to content

feat(jetbrains): add Rules settings page; pin CLI to v7.4.13 - #12437

Merged
kirillk merged 4 commits into
mainfrom
feat/jetbrains-rules-settings
Jul 21, 2026
Merged

feat(jetbrains): add Rules settings page; pin CLI to v7.4.13#12437
kirillk merged 4 commits into
mainfrom
feat/jetbrains-rules-settings

Conversation

@kirillk

@kirillk kirillk commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Context

Two JetBrains changes:

  1. Adds a Rules page under Settings → Agent Behavior, matching the VS Code experience for managing instruction files and Claude Code compatibility.
  2. Pins the CLI to v7.4.13 to repair cloud session history import.

Implementation

Rules settings page

  • New Rules page under Settings → Agent Behavior.
  • Manage additional instruction files (the instructions config) in a Skills-style list.
  • Open in Editor, Edit (in-dialog content editor), and Delete per instruction file.
  • Add file dialog with a "..." browse button.
  • Claude Code Compatibility toggle (Load Claude Code Files).
  • Per-row action buttons hide when the list is not focused (applies to all list-based settings pages, including Skills).
  • Unified the add/edit path dialog across Rules and Skills into one reusable dialog.

CLI pin 7.4.117.4.13

JetBrains history loading is broken for cloud-only sessions. Loading such a session triggers a cloud import, which fails against the pinned CLI:

Cloud session import failed: HTTP 400 — {"_tag":"BadRequest"}
  at KiloBackendSessionManager.importCloudSession(KiloBackendSessionManager.kt:242)

The root cause is the pinned CLI binary, not the plugin. The plugin runs the CLI release pinned in packages/kilo-jetbrains/package.json (was 7.4.11). That binary contains the pre-fix cloud-import path, which fails in installed/compiled CLI builds and returns HTTP 400 BadRequest. The bug exists in every stable CLI release up to and including 7.4.11 — it is not a regression. The fix (#12329) landed on main and first ships in CLI v7.4.13; no plugin-side code change is required (the request/response contract is unchanged).

Why a pre-release pin: the normal path is to pin to the latest stable release, but none contains the fix yet:

  • v7.4.13 — published pre-release, includes fix(cli): repair cloud session imports #12329, has all runtime assets. Pinnable and functional.
  • v7.4.14 — draft, 0 assets → the plugin's CLI download would 404 at connect time. Not usable.
  • v7.4.11 / earlier stable — no fix; the bug persists.

When a stable release ≥ 7.4.13 is published, the automated jetbrains-cli-pin-bump PR will move the pin to it and this pre-release pin can be dropped. kilo.cli.pinned stays true (releasable state).

Screenshots / Video

Screen Shot 2026-07-21 at 3 14 50 PM

How to Test

Manual/local verification

  • Opened Settings → Kilo Code → Agent Behavior → Rules; added instruction files via the browse dialog, edited a file's contents in the in-dialog editor, toggled Claude Code compatibility, and confirmed values persist on OK/Apply.
  • Confirmed per-row buttons hide when the list loses focus and reappear when it regains focus.
  • Regenerated the OpenAPI client from the v7.4.13 spec; backend, frontend, and shared sources compile. Cloud session history imports without the HTTP 400 {"_tag":"BadRequest"} error.

Reviewer test steps

  1. Open Settings → Kilo Code → Agent Behavior → Rules.
  2. Click + to add an instruction file (use the "..." button to browse). Apply/OK and reopen to confirm it persisted.
  3. Select a row, click Edit, change contents, OK the dialog, then OK Settings; confirm the file was written.
  4. Toggle Load Claude Code Files and confirm it saves (backend restart).
  5. Click into the search field so the list loses focus; confirm the row action buttons disappear.
  6. Open a cloud-only session's history and confirm it imports without the HTTP 400 BadRequest error.

Blocked checks and substitute verification

  • None. Ran ./gradlew typecheck and the full ./gradlew test suite from packages/kilo-jetbrains/ — both pass (executed by the agent).

User impact

On update, the plugin auto-downloads the pinned CLI (v7.4.13) on first connect, verifies its checksum, caches it, and prunes older cached versions. No user action required.

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.

kirillk added 2 commits July 21, 2026 15:01
…laude Code compatibility

Adds a Rules page under Agent Behavior for managing additional instruction files (config `instructions`) with a Skills-style list: open in editor, in-dialog content editor, and delete. Unifies the add/edit path dialog into a shared SettingsPathDialog (OK button, focused input) and hides in-place list action buttons when the list is not focused.
…port

The plugin runs the CLI release pinned in package.json (was 7.4.11), which contains the pre-fix cloud-import path that returns HTTP 400 BadRequest in compiled builds. The fix (#12329) first ships in CLI v7.4.13. No stable release contains it yet (7.4.14 is a draft with no assets), so pin to the v7.4.13 pre-release; the automated jetbrains-cli-pin-bump PR will move to a stable release >= 7.4.13 later. kilo.cli.pinned stays true.
@kirillk kirillk changed the title feat(jetbrains): add Rules settings page feat(jetbrains): add Rules settings page; pin CLI to v7.4.13 Jul 21, 2026
Comment thread .changeset/jetbrains-rules-settings.md Outdated
@kilo-code-bot

kilo-code-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

All issues from the previous review were addressed in 3d5ee24:

  • Removed the test-only component() seams on SettingsPathDialog and InstructionEditDialog; tests now exercise settingsPathInput/settingsContentScroll and the public dialog API directly.
  • Removed the unused settings.rules.files.remove bundle key from all 22 locale files.
  • Updated the changeset to mention the cloud session history import fix alongside the Rules feature.

No new issues found in the incremental changes.

Files Reviewed (4 files in incremental diff)
  • .changeset/jetbrains-rules-settings.md
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsPathDialog.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/rules/RulesSettingsUi.kt
  • packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle*.properties (22 locale files)
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/settings/base/SettingsPathDialogTest.kt
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/settings/rules/RulesSettingsUiTest.kt
Previous Review Summary (commit c7c7d77)

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

Previous review (commit c7c7d77)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsPathDialog.kt 39 component() is a production method added only for test access, violating the package's own AGENTS.md guidance
packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/rules/RulesSettingsUi.kt 313 Same test-only seam pattern on InstructionEditDialog.component()

SUGGESTION

File Line Issue
packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle.properties 525 settings.rules.files.remove bundle key is added but never referenced (dead string, duplicated across 29 locale files)
.changeset/jetbrains-rules-settings.md 5 Changeset describes only the Rules feature, omitting the user-facing CLI pin fix for cloud session history import
Files Reviewed (40 files)
  • .changeset/jetbrains-rules-settings.md
  • packages/kilo-jetbrains/package.json
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/app/KiloAppService.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/agents/AgentBehaviorConfigurable.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/agents/SkillsConfigurable.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsContentEditor.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsListModel.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsListRenderer.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsListView.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsPathDialog.kt - 1 issue
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/base/SettingsPathInput.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/rules/RulesConfigurable.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/rules/RulesSettingsState.kt
  • packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/settings/rules/RulesSettingsUi.kt - 1 issue
  • packages/kilo-jetbrains/frontend/src/main/resources/kilo.jetbrains.frontend.xml
  • packages/kilo-jetbrains/frontend/src/main/resources/messages/KiloBundle*.properties (30 locale files) - 1 issue
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/settings/** (7 test files)
  • packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/testing/FakeAgentBehaviorRpcApi.kt

Fix these issues in Kilo Cloud


Reviewed by claude-sonnet-5 · Input: 26 · Output: 4K · Cached: 546.7K

Review guidance: REVIEW.md from base branch main

kirillk added 2 commits July 21, 2026 15:21
- Drop test-only component() seams on SettingsPathDialog and
  InstructionEditDialog; test layout helpers and public dialog API directly
- Remove unused settings.rules.files.remove bundle key across all locales
- Note cloud session history import fix in the changeset
@kirillk
kirillk merged commit 5c7978c into main Jul 21, 2026
23 checks passed
@kirillk
kirillk deleted the feat/jetbrains-rules-settings branch July 21, 2026 20:00
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…settings

feat(jetbrains): add Rules settings page; pin CLI to v7.4.13
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