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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 0bb8b2fd3208 chore: Fix overview tab ESC unselect highlight and chart 
mode toggle
0bb8b2fd3208 is described below

commit 0bb8b2fd32081aaf9497d8dc378d8dc80cf1ba18
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Jul 6 13:14:25 2026 +0200

    chore: Fix overview tab ESC unselect highlight and chart mode toggle
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java |  1 +
 .../apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java  | 10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
index 63028e631a96..72085c2b530f 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
@@ -557,6 +557,7 @@ public class CamelMonitor extends CamelCommand {
             if (ctx.selectedPid != null) {
                 ctx.selectedPid = null;
                 ctx.lastSelectedName = null;
+                tabRegistry.overviewTab().tableState.clearSelection();
                 return true;
             }
             return true;
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java
index dab3cce6e4a8..4af1263a93b8 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/OverviewTab.java
@@ -131,7 +131,12 @@ class OverviewTab extends AbstractTab {
             return true;
         }
         if (ke.isCharIgnoreCase('a')) {
-            chartMode = (chartMode + 1) % 3;
+            if (ctx.selectedPid == null) {
+                // no selection: toggle between all and off (skip single)
+                chartMode = chartMode == CHART_ALL ? CHART_OFF : CHART_ALL;
+            } else {
+                chartMode = (chartMode + 1) % 3;
+            }
             return true;
         }
         // Process control keys
@@ -775,7 +780,8 @@ class OverviewTab extends AbstractTab {
         hint(spans, TuiIcons.HINT_SCROLL, "navigate");
         if (!ctx.isInfraSelected()) {
             hint(spans, "s", "sort");
-            hint(spans, "a", "chart " + switch (chartMode) {
+            int effectiveMode = (chartMode == CHART_SINGLE && ctx.selectedPid 
== null) ? CHART_ALL : chartMode;
+            hint(spans, "a", "chart " + switch (effectiveMode) {
                 case CHART_ALL -> "[all]";
                 case CHART_SINGLE -> "[single]";
                 default -> "[off]";

Reply via email to