Repository navigation
fix(jetbrains): support IntelliJ 2026.3 terminal API - #8
Merged
Merged
Conversation
Replace process-stream interception with a ProcessTtyConnector that supports the legacy and modern terminal startup paths. Preserve terminal output forwarding, command execution, Unix shutdown, and Windows ConPTY interrupt handling. Add connector tests, packaged bytecode checks, exact 2026.3 verifier coverage, and pull-request gates. Document that the compatibility bridge supports local terminals only.
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
ProxyPtyProcessstream wrapper withRawOutputTtyConnector, aProcessTtyConnectorsubclass. It forwards every decoded output chunk to the extension host exactly once.Root cause
IntelliJ 2026.3 (build 263.5701.42) changed the terminal startup API.
LocalTerminalDirectRunner.createProcess(ShellStartupOptions)no longer returnsPtyProcess. It returnsjava.lang.Process, and the session enters throughcreateTtyConnector(ShellStartupOptions). The oldcreateProcessoverride and theProxyPtyProcesswrapper do not resolve on 2026.3. The terminal fails to start there.Solution
TerminalInstancestarts the PTY itself withPtyProcessBuilder. Both platform paths sharestartTerminalProcess.createProcessandcreateTtyConnector(PtyProcess). It declarescreateTtyConnector(ShellStartupOptions)withoutoverride. The descriptor matches the 2026.3 platform method, so virtual dispatch binds at runtime.RawOutputTtyConnectorextends jeditermProcessTtyConnector. The(java.lang.Process, Charset)constructor descriptor is the same in build 233 and build 263. One compiled super call resolves on both. The platformPtyProcessTtyConnectoris not usable as the superclass. Its constructor takesPtyProcesson 233 andjava.lang.Processon 2026.3.close()mirrors the JetBrains local terminal connector. Unix processes get SIGHUP first. The path destroys them one second later if they survive. Windows ConPTY processes get the ETX interrupt byte on stdin before destroy. The path destroys other processes at once.super.closedoes not run, because it destroys at once and removes the one second grace window.resize()skips a dead process, matching the platform connector on both builds. The charset is UTF-8, the same value the platform connector uses.Support boundary
The bridge is local-only. It starts a
PtyProcesson the local machine. WSL-internal terminals, dev-container terminals, and RemDev sessions are out of scope. On 2026.3 those sessions carry non-local EEL descriptors. This bridge implements no EEL support. The RemDev frontend stops at the inherited platform guard and never reaches this runner.Validation
RawOutputTtyConnectorTestcovers output forwarding, multibyte decode at every byte boundary, write encoding and flush, SIGHUP close on a real Unix PTY, Windows-style destroy, resize behavior, and inherited lifecycle methods.verifyPackagedBytecodescans the packaged plugin jar. It rejects every reference to thecreateProcessdescriptor that 2026.3 removed. Thechecktask runs it.runPluginVerifier(verifier 1.410) checks the plugin against exact IC-263.5701.42. CI downloads the EAP archive, checks the SHA-256 pinned ingradle.properties, and passes the unpacked IDE with-PverifierLocalIde. The task fails only on compatibility problems and invalid plugin results. Deprecation notices do not hide real failures.smoke263Dispatchruns headless against the exact 2026.3 build. It proves thecreateTtyConnector(ShellStartupOptions)dispatch binds. It proves no packaged class references the removedcreateProcess. It proves the connector decodes and forwards output against this IDE build jediterm and pty4j binaries..github/workflows/pr.ymlruns the connector tests, the build, the bytecode scan, the verifier, and the smoke check on every pull request.release.ymlruns the same gates with the same-Pflags as the publish step. The verified artifact is the shipped zip.Release notes