This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-23648-tui-send-fullscreen
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ccbbc340f31500a9d0d3f54532a56009b4e46cb8
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun May 31 09:40:34 2026 +0200

    CAMEL-23648: camel-jbang - TUI fix Reset Screen menu item rendering
    
    Fix missing Reset Screen entry in visual menu list, use dynamic
    visualActionCount instead of hardcoded sums, and use ๐Ÿงน emoji
    instead of ๐Ÿ–ฅ๏ธ which has a variation selector causing width mismatch.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .../camel/dsl/jbang/core/commands/tui/ActionsPopup.java    | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java
index 830bdfbccb6e..204783e8b2a6 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ActionsPopup.java
@@ -198,13 +198,16 @@ class ActionsPopup {
     }
 
     private int visualActionCount() {
+        int total = 0;
+        for (int gs : GROUP_SIZES) {
+            total += gs;
+        }
+        int dividers = GROUP_SIZES.length - 1;
         if (mcpEnabled) {
-            // 4 + 4 + 5 + 2 actions = 15, plus 3 dividers = 18
-            return 15 + 3;
-        } else {
-            // 4 + 4 + 5 actions = 13, plus 2 dividers = 15
-            return 13 + 2;
+            total += MCP_GROUP_SIZE;
+            dividers++;
         }
+        return total + dividers;
     }
 
     private boolean isDividerIndex(int visualIndex) {
@@ -708,6 +711,7 @@ class ActionsPopup {
         items.add(ListItem.from("  ๐Ÿฉบ Run Doctor"));
         items.add(ListItem.from("  ๐Ÿ“ฆ Show Classpath"));
         items.add(ListItem.from("  ๐Ÿ”„ Reset Stats"));
+        items.add(ListItem.from("  ๐Ÿงน Reset Screen"));
         items.add(ListItem.from(stopLabel));
         items.add(ListItem.from(divider).style(Style.EMPTY.dim()));
         // Group 3: Recording & Presentation

Reply via email to