diff --git a/CHANGELOG.md b/CHANGELOG.md
index f32d54f3..4d2c9eac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,4 @@
+- Fixed choice menu not appearing when option descriptions span more than 3 terminal lines
- Fixed disabled models (e.g. `Fable (disabled)`) appearing in the model selector combo with an error message as their name
- Fixed session becoming permanently unresponsive when the working directory is on a git branch whose name contains dots (e.g. `feature/e9.5-refactor`)
diff --git a/pom.xml b/pom.xml
index 8ac82eb3..4dbf77ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
io.github.nbplugins
netbeans-plugin-claude-code-gui
- 1.2.24-SNAPSHOT
+ 1.2.25-SNAPSHOT
nbm
Netbeans Plugin Claude Code GUI
NetBeans plugin that provides a GUI for Claude Code CLI — run claude code sessions directly inside the IDE.
diff --git a/src/main/java/io/github/nbplugins/claudecodegui/process/ScreenContentDetector.java b/src/main/java/io/github/nbplugins/claudecodegui/process/ScreenContentDetector.java
index 65188632..372858e1 100644
--- a/src/main/java/io/github/nbplugins/claudecodegui/process/ScreenContentDetector.java
+++ b/src/main/java/io/github/nbplugins/claudecodegui/process/ScreenContentDetector.java
@@ -156,11 +156,13 @@ public Optional detectChoiceMenu(List screenLines) {
continuationCount = 0;
// Option "1" is always the first — stop collecting here
if ("1".equals(opt.response())) break;
+ } else if (isSeparatorLine(trimmed)) {
+ // structural separator between option groups — don't count toward continuationCount
} else if (!trimmed.isBlank()) {
continuationCount++;
- if (continuationCount > 3) {
+ if (continuationCount > 8) {
LOG.fine(tag + "[ScreenContentDetector] stopped upward scan at row " + i
- + " (continuationCount>3): " + trimmed);
+ + " (continuationCount>8): " + trimmed);
break;
}
}
diff --git a/src/test/resources/io/github/nbplugins/claudecodegui/process/screen-content-detector/detect-choice-menu/long-option-descriptions.expectedRes.json b/src/test/resources/io/github/nbplugins/claudecodegui/process/screen-content-detector/detect-choice-menu/long-option-descriptions.expectedRes.json
new file mode 100644
index 00000000..143d5aa1
--- /dev/null
+++ b/src/test/resources/io/github/nbplugins/claudecodegui/process/screen-content-detector/detect-choice-menu/long-option-descriptions.expectedRes.json
@@ -0,0 +1,11 @@
+{
+ "text": "The IDEA engine's UsageInfo machinery needs a live Document the standalone session can't maintain. How should I resolve the multi-declaration path?",
+ "options": [
+ {"display": "Stub MoveRenameUsageInfo", "response": "1", "description": "Add a JVM-linkage stub of com.intellij.refactoring.util.MoveRenameUsageInfo (extends the real UsageInfo) whose ctor skips the document-length assertion"},
+ {"display": "Engine wired, env-degraded", "response": "2", "description": "After add(), commit the target document so PSI/document agree (this reparses and drops the copyable-usage marks the engine reads, so retargetUsages becomes a no-op)."},
+ {"display": "Whole-file copy + prune", "response": "3", "description": "For multi-declaration, follow IDEA's file-copy path: copy the entire source file, then delete the other top-level declarations from the copy. Robust for multi-decl."},
+ {"display": "Type something.", "response": "4"},
+ {"display": "Chat about this", "response": "5"}
+ ],
+ "defaultOptionIndex": 0
+}
diff --git a/src/test/resources/io/github/nbplugins/claudecodegui/process/screen-content-detector/detect-choice-menu/long-option-descriptions.src.txt b/src/test/resources/io/github/nbplugins/claudecodegui/process/screen-content-detector/detect-choice-menu/long-option-descriptions.src.txt
new file mode 100644
index 00000000..89d8902f
--- /dev/null
+++ b/src/test/resources/io/github/nbplugins/claudecodegui/process/screen-content-detector/detect-choice-menu/long-option-descriptions.src.txt
@@ -0,0 +1,21 @@
+─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+ ☐ Engine vs env
+
+The IDEA engine's UsageInfo machinery needs a live Document the standalone session can't maintain. How should I resolve the multi-declaration path?
+
+❯ 1. Stub MoveRenameUsageInfo
+ Add a JVM-linkage stub of com.intellij.refactoring.util.MoveRenameUsageInfo (extends the real UsageInfo) whose ctor skips the document-length assertion
+ — same pattern as the existing BaseRefactoringProcessor/Registry stubs. Keeps the real engine algorithm fully working (retarget + shorten + import insertion). Risk: it
+ must shadow the copy already present in the bundled analysis jar (classloader order), which is less certain than stubbing a class absent at runtime; may need stripping
+ it from the jar.
+ 2. Engine wired, env-degraded
+ After add(), commit the target document so PSI/document agree (this reparses and drops the copyable-usage marks the engine reads, so retargetUsages becomes a no-op).
+ The declaration is copied correctly but with no import retargeting for the multi-decl case — matches the no extra import synthesis behavior you already approved.
+ Lowest risk; the engine is present but effectively inert for multi-decl.
+ 3. Whole-file copy + prune
+ For multi-declaration, follow IDEA's file-copy path: copy the entire source file, then delete the other top-level declarations from the copy. Robust for multi-decl.
+ 4. Type something.
+─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+ 5. Chat about this
+
+Enter to select · ↑/↓ to navigate · Esc to cancel