chore: remove plan files from PR

This commit is contained in:
kirillk
2026-05-28 09:20:09 -04:00
parent 449c740784
commit ad2bb21048
2 changed files with 0 additions and 162 deletions
-90
View File
@@ -1,90 +0,0 @@
# Fix JetBrains Publish Verification
## Failure Summary
The `publish-jetbrains` workflow failed in the `Verify plugin` step for tag `jetbrains/v7.0.1-rc.2`.
The verifier reports the plugin is otherwise compatible with `IU-261.22158.277`, but fails the build because of blocking problem classes:
- `INTERNAL_API_USAGES`
- `OVERRIDE_ONLY_API_USAGES`
Non-blocking verifier output also includes deprecated and experimental API usages, but those are not the reason for this publish failure.
## Local IntelliJ Source Insights
The local IntelliJ checkout at `/Users/kirillk/products/intellij-community` confirms the verifier findings and the safe replacements:
- `platform/editor-ui-api/src/com/intellij/openapi/actionSystem/remoting/ActionRemoteBehavior.kt:10-12` and `70-72` mark `ActionRemoteBehavior` and `ActionRemoteBehaviorSpecification` as `@ApiStatus.Internal` and `@ApiStatus.Experimental`.
- `platform/util/ui/src/com/intellij/ui/icons/CachedImageIcon.kt:338-346` implements `createWithPatcher(...)`, but it depends on internal icon loader state.
- `platform/util/ui/src/com/intellij/util/SVGLoader.kt:105-115` defines `SvgElementColorPatcherProvider`; it is part of the internal patching path.
- `platform/platform-impl/src/com/intellij/ui/GotItComponentBuilder.kt:1169-1204` contains the source pattern that `SvgIconColorizer.kt` mirrors, including digest generation and `setAttribute(...)` behavior.
- `platform/platform-api/src/com/intellij/openapi/actionSystem/ex/ActionUtil.kt:662-681` exposes `ActionUtil.getAction(...)` and `ActionUtil.getActionGroup(vararg ids)` as non-override alternatives for retrieving registered actions.
- `platform/bookmarks/src/com/intellij/ide/bookmark/ui/BookmarksViewFactory.kt:26` shows a platform example of setting tool window title actions using a looked-up action/group instead of calling `ActionGroup.getChildren(...)` directly.
- `platform/platform-api/src/com/intellij/openapi/options/ShowSettingsUtil.java:32-42` exposes the public predicate-based `showSettingsDialog(...)` API already used by `ShowProfileAction`.
## Root Causes
1. `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/actions/ShowProfileAction.kt`
- Implements `ActionRemoteBehaviorSpecification.Frontend`.
- The verifier flags `ActionRemoteBehaviorSpecification.Frontend`, `ActionRemoteBehavior`, and `getBehavior()` as internal API usage.
- The actual settings behavior already uses public `ShowSettingsUtil.showSettingsDialog(project, predicate, additionalConfiguration)`.
- The action is declared in `kilo.jetbrains.frontend.xml`, so it should already be frontend-side in split mode without the internal remoting marker.
2. `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/SvgIconColorizer.kt`
- Imports and uses `CachedImageIcon`, `SVGLoader.SvgElementColorPatcherProvider`, and `SvgAttributePatcher` through `createWithPatcher(...)`.
- The verifier flags these classes and methods as internal API usage.
- The local IntelliJ source confirms this helper is copied from internal platform code, but the copied implementation still references internal platform symbols.
- Current usage is only from `ScrollButtonIcon.kt`, so this can be fixed locally without broad UI churn.
3. `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/KiloToolWindowFactory.kt`
- Calls `toolbar.getChildren(null)` to expand `Kilo.ToolWindowToolbar`.
- The verifier flags direct invocation of `ActionGroup.getChildren(AnActionEvent)` as override-only API usage.
## Plan
1. Replace the override-only toolbar expansion in `KiloToolWindowFactory.kt`.
- Stop calling `ActionGroup.getChildren(null)`.
- Prefer `ActionUtil.getActionGroup("Kilo.NewSession", "Kilo.History", "Kilo.ShowProfile", "Kilo.Settings")` or `listOfNotNull(ActionUtil.getAction(...))`.
- Pass the resulting action or action list directly to `toolWindow.setTitleActions(...)`.
- Keep the existing XML group only if still useful for declarative organization; do not expand it manually.
- Remove the now-unused `ActionGroup` import if no longer needed.
2. Remove internal action-remoting API from `ShowProfileAction.kt`.
- Delete the `ActionRemoteBehaviorSpecification` import.
- Remove `ActionRemoteBehaviorSpecification.Frontend` from the class declaration.
- Keep the existing public predicate-based `ShowSettingsUtil.showSettingsDialog(...)` call; this is already the correct OpenAPI way to open a wrapped configurable and focus `UserProfileConfigurable.FOCUS_ACCOUNT_COMBO`.
- Validate split-mode behavior after the change because the frontend module XML declaration should be sufficient for a frontend-only action.
3. Replace internal SVG patching in `SvgIconColorizer.kt` with Kilo-owned public-API code.
- Do not import or reference `CachedImageIcon`, `SVGLoader.SvgElementColorPatcherProvider`, `SvgAttributePatcher`, or `createWithPatcher(...)`.
- Keep the useful copied semantics from the IntelliJ internal source: attribute/pixel replacement by fill/stroke role and alpha preservation.
- Implement the replacement as a Kilo-owned `Icon` wrapper using public Swing/Java2D APIs:
- Paint the source icon into an offscreen `BufferedImage` at the current icon size.
- Replace known source colors for the supported scroll icons with target `fillColor` and `borderColor`, preserving alpha.
- Cache the recolored image by icon size and target RGB/alpha to avoid repaint-time allocation where practical.
- Limit the helper to the current use case if possible. `ScrollButtonIcon.kt` only recolors `scroll-bottom.svg` and `scroll-question.svg`, so supporting arbitrary SVG DOM patching is unnecessary.
- If exact SVG attribute-level theming becomes required later, vendor a complete independent SVG loading path under Kilo-owned code rather than referencing JetBrains internal icon classes.
4. Update `ScrollButtonIcon.kt` only as needed for the new public helper.
- Keep the existing SVG resources if the new helper still paints from them.
- If the helper becomes scroll-icon-specific, pass the source colors or role mapping explicitly from `ScrollButtonIcon.kt` so `SvgIconColorizer.kt` does not need to know XML element IDs.
- Preserve theme-derived target colors: `UiStyle.Colors.warningLabelForeground()`, `JBUI.CurrentTheme.Button.defaultButtonColorStart()`, and `JBUI.CurrentTheme.Button.defaultButtonForeground()`.
5. Re-check for verifier-blocked APIs.
- Search `packages/kilo-jetbrains/frontend/src/main/kotlin` for `ActionRemoteBehaviorSpecification`, `ActionRemoteBehavior`, `CachedImageIcon`, `SvgElementColorPatcherProvider`, `SvgAttributePatcher`, `createWithPatcher`, and `getChildren(null)`.
- Confirm no remaining usages correspond to the verifier report.
6. Validate locally from `packages/kilo-jetbrains/`.
- Run `java -version` and confirm Java 21.
- Run `./gradlew typecheck`.
- Run `./gradlew test` if the touched frontend/UI code has related tests or if typecheck passes quickly.
- Run `./gradlew verifyPlugin --stacktrace` for a non-production local verifier pass.
- If production CLI resources are available or can be prepared, run `bun script/build.ts --production --prepare-cli` and `./gradlew verifyPlugin -Pproduction=true -Pkilo.channel=eap --stacktrace` from the tag context or with an equivalent local tag setup.
## Notes
- Do not suppress `INTERNAL_API_USAGES` or `OVERRIDE_ONLY_API_USAGES`; the publish workflow is correctly catching Marketplace-incompatible plugin API usage.
- Do not use `com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(...)`; it lives in an implementation package and is not the clean OpenAPI fix for plugin code.
- The Node.js 20 warning in the job is unrelated to this failure. The workflow already sets `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24` and uses Node 24.
- No changeset is required unless the final implementation changes user-visible JetBrains plugin behavior beyond restoring publish verification.
@@ -1,72 +0,0 @@
# Implement JetBrains Follow-ups
## Context
The current worktree already has the previous verifier-oriented changes:
- `ShowProfileAction` no longer implements the internal remoting marker. Keep this fix.
- `SvgIconColorizer` uses a public Swing/Java2D icon wrapper. Keep this fix.
- `ScrollButtonIcon` currently owns SVG source-color constants that should move to `UiStyle`.
- `KiloToolWindowFactory` currently uses direct per-action lookup, but the requested behavior is to look up `Kilo.ToolWindowToolbar`, cast to `ActionGroup`, and expand its children.
- Runtime stack trace shows `PromptPanel.syncEditorHeight()` calls `editor.document.lineCount` during initialization/style application on EDT without read access.
## Implementation Plan
1. Update tool-window title action expansion as requested.
- In `KiloToolWindowFactory.kt`, import `ActionGroup` again.
- Replace the hardcoded `listOfNotNull(ActionManager.getInstance().getAction("Kilo.NewSession"), ...)` with:
- `val toolbar = ActionManager.getInstance().getAction("Kilo.ToolWindowToolbar")`
- `if (toolbar is ActionGroup) toolWindow.setTitleActions(toolbar.getChildren(null).toList())`
- Keep the existing XML group `Kilo.ToolWindowToolbar` as the source of ordering and membership.
- Note for validation: this intentionally returns to the requested `getChildren(null)` pattern, which may be reported by plugin verifier as override-only API usage again. Verify and report the exact outcome.
2. Keep `ShowProfileAction` unchanged except for incidental formatting if required.
- Do not reintroduce `ActionRemoteBehaviorSpecification`.
- Keep the public predicate-based `ShowSettingsUtil.showSettingsDialog(...)` implementation.
3. Move scroll icon source-color constants into `UiStyle`.
- Add a small `object ScrollIcon` (or similarly narrow name) under `UiStyle` with:
- `const val BOTTOM_LIGHT = 0x384F6B`
- `const val BOTTOM_DARK = 0x233143`
- `const val QUESTION = 0xE08800`
- `const val FOREGROUND = 0xFFFFFF`
- These are asset source palette constants, not runtime theme colors, so keep them separate from `UiStyle.Colors` unless the existing style layout strongly favors nesting there.
- Update `ScrollButtonIcon.kt` to reference `UiStyle.ScrollIcon.*` and remove local constants.
- Keep the public `colorizeIfPossible(...)` Java2D implementation unchanged.
4. Fix prompt editor read-access violation.
- In `PromptPanel.kt`, wrap the `editor.document.lineCount` read inside `syncEditorHeight()` with a public read-action helper.
- Prefer `ReadAction.computeBlocking<Int, RuntimeException> { editor.document.lineCount }` from `com.intellij.openapi.application.ReadAction` because IntelliJ source documents it as usable from EDT and it avoids the experimental `WriteIntentReadAction` API.
- Keep the rest of `syncEditorHeight()` on EDT; only the model/document access needs the read action.
- Do not move initialization off EDT; this is UI construction and mutation.
5. Validate blocked verifier symbols and threading fix.
- Search `packages/kilo-jetbrains/frontend/src/main/kotlin` for:
- `ActionRemoteBehaviorSpecification`
- `ActionRemoteBehavior`
- `CachedImageIcon`
- `SvgElementColorPatcherProvider`
- `SvgAttributePatcher`
- `createWithPatcher`
- Also search for `getChildren(null)` and confirm it exists only in `KiloToolWindowFactory.kt` as requested.
6. Run focused checks from `packages/kilo-jetbrains/`.
- `java -version` to confirm Java 21.
- `./gradlew typecheck`.
- `./gradlew test` because `PromptPanelTest` and session UI tests exercise the touched prompt UI.
- `./gradlew verifyPlugin --stacktrace` if CLI resources are present.
- If verifier fails only on the intentionally reintroduced `ActionGroup.getChildren(null)` override-only usage, report that clearly rather than masking it.
## Expected Files To Edit
- `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/KiloToolWindowFactory.kt`
- `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/ui/UiStyle.kt`
- `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/scroll/ScrollButtonIcon.kt`
- `packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/ui/prompt/PromptPanel.kt`
## Non-Goals
- Do not change the already accepted `ShowProfileAction` fix.
- Do not reintroduce internal SVG patching APIs.
- Do not suppress plugin verifier failures.
- Do not edit module XML unless action IDs or group membership need to change, which is not expected.