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
commit c3880ef89dd493b7e03c1897c421cdc68f2ebd08 Author: Claus Ibsen <[email protected]> AuthorDate: Fri Jul 10 16:38:42 2026 +0200 TUI: Fix circuit breaker failure rate gauge using panel width instead of MAX_CHART_POINTS The gauge bar width was copy-pasted from the sparkline constant (300), causing the bar to overflow the panel and clip the percentage label at moderate failure rates. Use the actual panel inner width instead. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java index 4e210e6c3980..9bcd40533117 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CircuitBreakerTab.java @@ -285,7 +285,7 @@ class CircuitBreakerTab extends AbstractTableTab { barColor = Theme.success(); } String rateLabel = String.format(" %.0f%%", Math.max(0, cb.failureRate)); - int barWidth = MAX_CHART_POINTS; + int barWidth = Math.max(0, vSplit.get(0).width() - 6); int usable = barWidth - rateLabel.length(); int filled = Math.max(0, (int) (usable * rate / 100.0)); int empty = Math.max(0, usable - filled);
