This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch feat/camel-tui in repository https://gitbox.apache.org/repos/asf/camel.git
commit 2dadb7919b340fcfdd757a564958dbce587412ee Author: Claus Ibsen <[email protected]> AuthorDate: Mon May 18 16:41:57 2026 +0200 TUI: fix spec viewer scroll - early nav handler was consuming up/down/pgup/pgdn The global up/down/pageup/pagedown handler always returned true before the showHttpSpec scroll block could fire. Added showHttpSpec guards at the top of each navigation branch so scroll works while viewing a spec. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --- .../camel/dsl/jbang/core/commands/tui/CamelMonitor.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 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 0e0222a3055d..a6c0dbba1dae 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 @@ -463,7 +463,9 @@ public class CamelMonitor extends CamelCommand { // Navigation (all tabs) if (ke.isUp()) { - if (tab == TAB_LOG && showLogLevelPopup) { + if (tab == TAB_HTTP && showHttpSpec) { + httpSpecScroll = Math.max(0, httpSpecScroll - 1); + } else if (tab == TAB_LOG && showLogLevelPopup) { logLevelListState.selectPrevious(); } else if (showDiagram && tab == TAB_ROUTES) { diagramScroll = Math.max(0, diagramScroll - 1); @@ -473,7 +475,9 @@ public class CamelMonitor extends CamelCommand { return true; } if (ke.isDown()) { - if (tab == TAB_LOG && showLogLevelPopup) { + if (tab == TAB_HTTP && showHttpSpec) { + httpSpecScroll++; + } else if (tab == TAB_LOG && showLogLevelPopup) { logLevelListState.selectNext(LOG_LEVELS.length); } else if (showDiagram && tab == TAB_ROUTES) { diagramScroll++; @@ -483,7 +487,9 @@ public class CamelMonitor extends CamelCommand { return true; } if (ke.isPageUp() || ke.isKey(KeyCode.PAGE_UP)) { - if (showDiagram && tab == TAB_ROUTES) { + if (tab == TAB_HTTP && showHttpSpec) { + httpSpecScroll = Math.max(0, httpSpecScroll - 20); + } else if (showDiagram && tab == TAB_ROUTES) { diagramScroll = Math.max(0, diagramScroll - 20); } else if (tab == TAB_LOG) { logFollowMode = false; @@ -498,7 +504,9 @@ public class CamelMonitor extends CamelCommand { return true; } if (ke.isPageDown() || ke.isKey(KeyCode.PAGE_DOWN)) { - if (showDiagram && tab == TAB_ROUTES) { + if (tab == TAB_HTTP && showHttpSpec) { + httpSpecScroll += 20; + } else if (showDiagram && tab == TAB_ROUTES) { diagramScroll += 20; } else if (tab == TAB_LOG) { logScroll += 20;
