ide-plugin: live LuaBridge tool window (connect, NPC inspector, world queries, console) - #12
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
… 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>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Summary
Replaces the static tool-window stub with a live LuaBridge panel.
Split that matters:
LuaBridgeSessionis IntelliJ-free — all socket I/O runs on a single daemon executor; state changes reach the Swing layer through an injected dispatcher (SwingUtilities::invokeLaterin production,Runnable::runin tests).LuaMapToolWindowPanelis pure EDT-side rendering.connect/disconnect/reconnect, statesDISCONNECTED/CONNECTING/CONNECTED/ERROR,statuspoll every 2 s while connected, one auto-reconnect attempt per 1.5 s (toggleable),refresh/queryBlock/listScripts/runScript/evalconvenience requests. NPCs come fromevalofNPC_LIST_LUA(npc.list()→ sortedname,x,y,zCSV — LuaJ has no JSON serializer) — no protocol change needed.world.getblockquery row, script list + Run, eval console.Disposableunder the content — closing the window/project stops polling, closes the socket, and shuts the executor down.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-blockingconnect().testtask is disabled — on the unified 2025.3 distro it crashes (missing coroutines-debug javaagent, thenjava.base/sun.nio.fsmodule export underPathClassLoader) — replaced by plain-JVMunitTeston the 21 toolchain, wired intocheckon both sides (launchercheckalso depends on it). Verified plugin.xml range unchanged:since-build="241", nountil-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