This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/camel-tui-cosmetic in repository https://gitbox.apache.org/repos/asf/camel.git
commit b1db406636abdc98143097ea49b83b58bb1c0173 Author: Claus Ibsen <[email protected]> AuthorDate: Fri May 15 19:17:00 2026 +0200 Fix garbage characters on tab switch by clearing content area before render When switching tabs, TamboUI's buffer diff does not guarantee that every styled cell from the previous tab is reset - RED error cells from the log detail panel can bleed through onto other tabs. Explicitly clearing the content area buffer before rendering the active tab ensures a clean slate regardless of what the previous tab rendered there. --- .../org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java | 4 ++++ 1 file changed, 4 insertions(+) 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 82131166e2c4..73044262afc2 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 @@ -797,6 +797,10 @@ public class CamelMonitor extends CamelCommand { } private void renderContent(Frame frame, Rect area) { + // Clear the content area before rendering the active tab. Without this, styled cells + // from the previous tab (e.g. RED error text in the log detail) can bleed through when + // switching tabs if TamboUI's buffer diff does not reset every cell in the region. + frame.buffer().clear(area); switch (tabsState.selected()) { case TAB_OVERVIEW -> renderOverview(frame, area); case TAB_ROUTES -> renderRoutes(frame, area);
