Skip to content

ide-plugin: live LuaBridge tool window (connect, NPC inspector, world queries, console) - #12

Open
devin-ai-integration[bot] wants to merge 3 commits into
mainfrom
devin/1789750000-ide-toolwindow
Open

devin-ai-integration[bot] wants to merge 3 commits into
mainfrom
devin/1789750000-ide-toolwindow

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Replaces the static tool-window stub with a live LuaBridge panel.

Split that matters: LuaBridgeSession is IntelliJ-free — all socket I/O runs on a single daemon executor; state changes reach the Swing layer through an injected dispatcher (SwingUtilities::invokeLater in production, Runnable::run in tests). LuaMapToolWindowPanel is pure EDT-side rendering.

  • Session: connect/disconnect/reconnect, states DISCONNECTED/CONNECTING/CONNECTED/ERROR, status poll every 2 s while connected, one auto-reconnect attempt per 1.5 s (toggleable), refresh/queryBlock/listScripts/runScript/eval convenience requests. NPCs come from eval of NPC_LIST_LUA (npc.list() → sorted name,x,y,z CSV — LuaJ has no JSON serializer) — no protocol change needed.
  • Panel: host/port fields, Connect/Disconnect/Reconnect, status badge + detail text, Auto-reconnect and Auto-refresh checkboxes (poll listener re-pulls the NPC table), NPC inspector table, world.getblock query row, script list + Run, eval console.
  • Lifecycle: factory registers the panel as Disposable under the content — closing the window/project stops polling, closes the socket, and shuts the executor down.
  • Tests: MockBridgeServer (loopback NDJSON) + 11 tests covering connect/error/disconnect transitions, drop→auto-reconnect, NPC/status parsing, block+eval replies, script list, protocol framing, and non-blocking connect().
  • Build plumbing: the platform test task is disabled — on the unified 2025.3 distro it crashes (missing coroutines-debug javaagent, then java.base/sun.nio.fs module export under PathClassLoader) — replaced by plain-JVM unitTest on the 21 toolchain, wired into check on both sides (launcher check also depends on it). Verified plugin.xml range unchanged: since-build="241", no until-build.

Verified: ./gradlew clean build — BUILD SUCCESSFUL, 0 failures (bridge 11 + mod 37 + launcher 25 + ide-plugin 11 = 84). Tool-window visual/EDT behavior not exercised on headless VM — the IntelliJ-free split is what makes the logic unit-testable at all.

Link to Devin session: https://app.devin.ai/sessions/f2c11399d60948a394f9836472375e2f
Open in Devin Desktop: https://app.devin.ai/desktop/session/f2c11399d60948a394f9836472375e2f?variant=devin
Requested by: @CommunityPoke

CommunityPoke and others added 2 commits September 18, 2026 16:53
… unit tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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