Skip to content

feat(jetbrains): add JetBrains IDE plugin + npm/build/refresh fixes - #300

Open
rlarin wants to merge 10 commits into
pixel-agents-hq:mainfrom
rlarin:upstream-jetbrains
Open

feat(jetbrains): add JetBrains IDE plugin + npm/build/refresh fixes#300
rlarin wants to merge 10 commits into
pixel-agents-hq:mainfrom
rlarin:upstream-jetbrains

Conversation

@rlarin

@rlarin rlarin commented Jun 4, 2026

Copy link
Copy Markdown

Summary

Adds a JetBrains Platform plugin (PyCharm/WebStorm and other IntelliJ-based IDEs) plus a few general fixes, all under the existing pixel-agents naming.

  • JetBrains plugin: embedded office via JCEF pointed at the standalone pixel-agents server (?ide=jetbrains); + Agent opens an IDE terminal running claude --session-id <uuid> through a native JBCefJSQuery bridge; ServerManager boots/reuses the standalone server via ~/.pixel-agents/server.json; WebSocket transport for other messages. Plugin icon + description, build:jetbrains scripts.
  • fix(npm): add a files whitelist so npm publish ships dist/ — without it npm falls back to .gitignore (which ignores dist) and the pixel-agents bin is shipped non-functional.
  • fix(build): cmd-compatible quoting in generate-messages so npm run package works on Windows.
  • fix(jetbrains): widen untilBuild to 261.* so the plugin installs on 2026.1 IDEs; pass -y to npx so first launch doesn't block on a confirm prompt.
  • feat: manual refresh — a webview button (re-sends webviewReady) and a native JetBrains "Reload" tool-window action.

Notes

  • Requires pixel-agents published on npm with a working bin (the files fix above) for the plugin's npx pixel-agents launch.
  • The embedded-terminal launch works on 2026.1 in testing, but TerminalView.createLocalShellWidget is deprecated upstream; a future migration to TerminalToolWindowTabsManager may be warranted.

Test plan

  • npm run build:jetbrains produces the plugin zip
  • Install from disk in PyCharm/WebStorm 2026.1, office renders
  • + Agent opens a terminal and spawns a character
  • Refresh button / Reload action re-sync the office

🤖 Generated with Claude Code

rlarin added 10 commits June 3, 2026 15:47
Thin Kotlin plugin that embeds the existing React webview via JCEF and
manages Claude Code terminal lifecycle in JetBrains IDEs.

- Gradle scaffold: IntelliJ Platform Gradle Plugin 2.16, Kotlin 2.1.21, Gradle 9
- ServerManager: starts/detects npx pixel-agents server, non-blocking (portFuture)
- TerminalManager: opens IDE terminal with claude --session-id, EDT-safe, IOException-safe
- PixelAgentsBrowserPanel: JCEF browser with JS bridge for launchAgent, deferred URL load
- PixelAgentsService: project service with Node.js availability check and notification
- PixelAgentsToolWindowFactory: bottom panel tool window
- Webview: JetBrains runtime detection via ?ide=jetbrains URL param, JetBrainsTransport
- GitHub Actions CI: jetbrains-release.yml triggered on jetbrains-v* tags
- Windows-compatible: cmd /c npx for process launching, @volatile on shared state
Keeps the working tree clean of npx/Gradle leftovers from building the
JetBrains plugin: IntelliJ Platform sandbox, the stray org/ output dir,
and *.stackdump crash files.
Without a files whitelist, npm publish falls back to .gitignore, which
excludes dist/ — so the published tarball shipped without dist/cli.js
and the `pixel-agents` bin was non-functional (the JetBrains plugin
relies on `npx pixel-agents` to launch the standalone server).

Add a files whitelist (dist + icon) and a prepublishOnly build so the
package always ships the CLI bundle, webview, assets, and hook script.
The prettier/eslint invocations single-quoted the output path, which
cmd.exe does not strip, so `npm run package` failed on Windows with
"No files matching the pattern" — breaking prepublishOnly and any
production build/publish from Windows. Quote with double quotes on
win32, single quotes elsewhere.
The IntelliJ Platform Gradle plugin defaults untilBuild to 251.* when
building against 2025.1, so the plugin was flagged "Not compatible" on
PyCharm/WebStorm 2026.1. Raise the cap to 261.* so it installs on
2026.1.x.

Note: the embedded-terminal API (TerminalView.createLocalShellWidget)
is deprecated and may be non-functional on 2026.1; "+ Agent" terminal
launch needs verification there and a possible migration to
TerminalToolWindowTabsManager.

Also add SCREENSHOT_PROMPT.md with instructions to produce the
Marketplace screenshot.
- Webview: a refresh button in the zoom controls re-sends webviewReady
  over the transport, prompting the host to re-broadcast full state
  (agents, layout, assets) without losing camera/zoom.
- JetBrains: a native "Reload" title action on the tool window that
  re-navigates the embedded JBCef browser as a hard fallback.
On a machine without the package cached, `npx pixel-agents` can prompt
to confirm the install; the plugin spawns it non-interactively so the
prompt would stall server startup. Add -y to auto-confirm.
@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

@rlarin is attempting to deploy a commit to the pablodelucca's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant