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 05bc30c6194e chore: Fix TAB cycling to include More tab and prevent NPE
05bc30c6194e is described below
commit 05bc30c6194e30b84854f5df364b7d4b5e944baf
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Jul 6 22:45:22 2026 +0200
chore: Fix TAB cycling to include More tab and prevent NPE
Use handleTabKey() for TAB/Shift+TAB cycling so the More popup
opens automatically when cycling to it. Add null guard in
renderFooter for tabs without a MonitorTab instance.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
.../dsl/jbang/core/commands/tui/CamelMonitor.java | 20 +++-----------------
1 file changed, 3 insertions(+), 17 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 6b49fd544b88..b57e497f0a77 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
@@ -630,15 +630,8 @@ public class CamelMonitor extends CamelCommand {
int prev = tabRegistry.selectedTabIndex() == TAB_OVERVIEW ?
TAB_LOG : TAB_OVERVIEW;
tabsState.select(prev);
} else {
- // Skip TAB_MORE when cycling – it is a popup trigger, not a
renderable tab
int prev = (tabRegistry.selectedTabIndex() - 1 + NUM_TABS) %
NUM_TABS;
- if (prev == TAB_MORE) {
- prev = (prev - 1 + NUM_TABS) % NUM_TABS;
- }
- if (prev != TAB_OVERVIEW) {
- tabRegistry.overviewTab().selectCurrentIntegration();
- }
- tabsState.select(prev);
+ tabRegistry.handleTabKey(prev, ctx, dataService);
}
return true;
}
@@ -647,15 +640,8 @@ public class CamelMonitor extends CamelCommand {
int next = tabRegistry.selectedTabIndex() == TAB_OVERVIEW ?
TAB_LOG : TAB_OVERVIEW;
tabsState.select(next);
} else {
- // Skip TAB_MORE when cycling – it is a popup trigger, not a
renderable tab
int next = (tabRegistry.selectedTabIndex() + 1) % NUM_TABS;
- if (next == TAB_MORE) {
- next = (next + 1) % NUM_TABS;
- }
- if (next != TAB_OVERVIEW) {
- tabRegistry.overviewTab().selectCurrentIntegration();
- }
- tabsState.select(next);
+ tabRegistry.handleTabKey(next, ctx, dataService);
}
return true;
}
@@ -1694,7 +1680,7 @@ public class CamelMonitor extends CamelCommand {
if (tabRegistry.selectedTabIndex() == TAB_OVERVIEW) {
fKeyTotal = renderOverviewFooter(spans);
- } else {
+ } else if (tab != null) {
tab.renderFooter(spans);
fKeyTotal = insertFKeyHints(spans);
}