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 d3548c36a6e9bb37b3b5a4bf5aa10d151c4b2e77 Author: Claus Ibsen <[email protected]> AuthorDate: Mon May 18 09:15:43 2026 +0200 TUI: move tab badge counters above labels instead of below Badges now appear on row 0 (top); labels on row 1 (bottom). The Tabs widget is passed a sub-rect starting at y+1 so it renders on the second row while the first row carries the centred counts. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --- .../apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 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 09dc0a54493d..659398b2ccff 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 @@ -1096,11 +1096,15 @@ public class CamelMonitor extends CamelCommand { .divider(Span.styled(" | ", Style.EMPTY.dim())) .build(); - frame.renderStatefulWidget(tabs, area, tabsState); + // Row 1: labels (Tabs widget renders at the top of whatever rect it receives) + Rect labelsArea = area.height() >= 2 + ? new Rect(area.x(), area.y() + 1, area.width(), 1) + : area; + frame.renderStatefulWidget(tabs, labelsArea, tabsState); - // Row 1: badge counters centered below each tab label + // Row 0: badge counters centered above each tab label if (area.height() >= 2) { - int badgeY = area.y() + 1; + int badgeY = area.y(); int dividerW = CharWidth.of(" | "); String[] badgeTexts = { "", "", "", "", "", "", "", "", "" };
