From d8b3fcf964d9a69b7174eaa9c9bed04c92301e28 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Sat, 21 Nov 2026 22:01:05 +0900 Subject: [PATCH 1/2] test(clion): the settings run types once the input has the focus and reads the settled text main's run after 1.6.0 failed the settings dialog's check that the input receives the typed value on CLion 2026.2.4.1 (Linux x86_64): the text was read as the last key was posted, before the EDT had handled the keys, and the keys went to whatever had the focus when the request to focus was still queued. The run now waits until the input owns the focus before typing, and reads the text once it has settled, within ten seconds each. --- .../src/test/kotlin/SettingsInteractionTest.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mide-plugins/clion/integration-tests/src/test/kotlin/SettingsInteractionTest.kt b/mide-plugins/clion/integration-tests/src/test/kotlin/SettingsInteractionTest.kt index 1ba5fd9..865b6f9 100644 --- a/mide-plugins/clion/integration-tests/src/test/kotlin/SettingsInteractionTest.kt +++ b/mide-plugins/clion/integration-tests/src/test/kotlin/SettingsInteractionTest.kt @@ -45,6 +45,7 @@ interface SettingsTextRemote { fun getText(): String fun setText(value: String) fun requestFocusInWindow(): Boolean + fun isFocusOwner(): Boolean } @Remote("com.intellij.openapi.application.PathManager") @@ -129,6 +130,10 @@ class SettingsInteractionTest { val apply = dialog.x("//div[@visible_text='Apply' or @text='Apply']") fun typeValue(target: SettingsTextRemote, value: String) { assertTrue(withContext(OnDispatcher.EDT) { target.requestFocusInWindow() }) + // Keys go to the focus owner, which the request makes it only once the EDT has run it. + val focused = System.nanoTime() + java.util.concurrent.TimeUnit.SECONDS.toNanos(10) + while (!withContext(OnDispatcher.EDT) { target.isFocusOwner() } && System.nanoTime() < focused) Thread.sleep(50) + assertTrue(withContext(OnDispatcher.EDT) { target.isFocusOwner() }, "the input owns the keyboard before it is typed into") label.keyboard { // This check exercises actual text-input events, which // notify the native Settings editor of modifications. @@ -137,7 +142,11 @@ class SettingsInteractionTest { backspace() if (value.isNotEmpty()) typeText(value) } - assertEquals(value, target.getText(), "the real input receives the typed value") + // The typed keys are events the EDT handles after they are posted: the text is read once it + // has settled, not as the last key is posted. + val typed = System.nanoTime() + java.util.concurrent.TimeUnit.SECONDS.toNanos(10) + while (withContext(OnDispatcher.EDT) { target.getText() } != value && System.nanoTime() < typed) Thread.sleep(50) + assertEquals(value, withContext(OnDispatcher.EDT) { target.getText() }, "the real input receives the typed value") } fun setAndApply(value: String) { typeValue(field, value) From 8dcfe87094659b59b92b7b121a0bbcfe4e427bf4 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Sat, 21 Nov 2026 22:10:25 +0900 Subject: [PATCH 2/2] ci: the real-IDE runs follow every CLion build of a change clion-stable needed clion alone with the default condition, and a change of the plugin alone skips the backend's jobs, which clion follows; the skip reached clion-stable, so such a change never ran the real IDE. It now runs whenever clion succeeded. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01b7fa6..e54fee3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -650,8 +650,11 @@ jobs: # Both stable families load the exact same packaged ZIP. These are actual # IDE startup/session checks, in addition to the static Plugin Verifier. + # Whenever the plugin was built here: a change of the plugin alone skips the backend's jobs, and a + # skipped job upstream would otherwise skip this one too. clion-stable: needs: clion + if: ${{ !cancelled() && needs.clion.result == 'success' }} uses: ./.github/workflows/clion-stable.yml with: plugin_artifact: mcpp-clion-zip