This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-23934 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1f0c4e811e59f23e7cd293ee4f44446746590b0c Author: Claus Ibsen <[email protected]> AuthorDate: Wed Jul 8 13:23:44 2026 +0200 CAMEL-23934: Remove redundant MCP CSS tokens Consolidate mcp-active/mcp-idle/mcp-down into existing success/muted/error semantic tokens since they mapped to identical colors. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../dsl/jbang/core/commands/tui/CamelMonitor.java | 4 ++-- .../camel/dsl/jbang/core/commands/tui/Theme.java | 18 ------------------ .../src/main/resources/tui/themes/dark.tcss | 3 --- .../src/main/resources/tui/themes/light.tcss | 3 --- .../camel/dsl/jbang/core/commands/tui/ThemeTest.java | 10 ---------- 5 files changed, 2 insertions(+), 36 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 3567c9bb5cd0..ec6160ea73a9 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 @@ -1771,11 +1771,11 @@ public class CamelMonitor extends CamelCommand { suffix = active ? " " + TuiIcons.SELECTED : " " + TuiIcons.IDLE; mcpLabel += " (" + client + ")"; labelStyle = Theme.success(); - suffixStyle = active ? Theme.mcpActive() : Theme.mcpIdle(); + suffixStyle = active ? Theme.success() : Theme.muted(); } else { suffix = " " + TuiIcons.CROSS; labelStyle = Theme.muted(); - suffixStyle = Theme.mcpDown(); + suffixStyle = Theme.error(); } rightSpans.add(Span.styled(mcpLabel, labelStyle)); rightSpans.add(Span.styled(suffix, suffixStyle)); diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/Theme.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/Theme.java index 3a2057be8943..366b0becd796 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/Theme.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/Theme.java @@ -66,9 +66,6 @@ public final class Theme { private static final Style FALLBACK_SELECTION = Style.EMPTY.fg(Color.WHITE).bg(Color.rgb(0x26, 0x4F, 0x78)).bold(); private static final Style FALLBACK_INFO = Style.EMPTY.fg(Color.rgb(0x9C, 0xDC, 0xFE)); private static final Style FALLBACK_NOTICE = Style.EMPTY.fg(Color.rgb(0xC5, 0x86, 0xC0)); - private static final Style FALLBACK_MCP_ACTIVE = Style.EMPTY.fg(Color.rgb(0x4E, 0xC9, 0xB0)); - private static final Style FALLBACK_MCP_IDLE = Style.EMPTY.fg(Color.rgb(0x60, 0x60, 0x60)); - private static final Style FALLBACK_MCP_DOWN = Style.EMPTY.fg(Color.rgb(0xF4, 0x87, 0x71)); private static final Color FALLBACK_ZEBRA = Color.rgb(0x25, 0x25, 0x25); private static final Color FALLBACK_BASE_BG = Color.rgb(0x1E, 0x1E, 0x1E); private static final Color FALLBACK_BASE_FG = Color.rgb(0xD4, 0xD4, 0xD4); @@ -221,21 +218,6 @@ public final class Theme { return style("notice", FALLBACK_NOTICE); } - /** MCP indicator: connected with recent activity. */ - public static Style mcpActive() { - return style("mcp-active", FALLBACK_MCP_ACTIVE); - } - - /** MCP indicator: connected but idle. */ - public static Style mcpIdle() { - return style("mcp-idle", FALLBACK_MCP_IDLE); - } - - /** MCP indicator: not connected. */ - public static Style mcpDown() { - return style("mcp-down", FALLBACK_MCP_DOWN); - } - /** Secondary accent for field labels, section headers, key hints, and popup titles. */ public static Style label() { return style("label", FALLBACK_LABEL); diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/themes/dark.tcss b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/themes/dark.tcss index 1d9585f1765b..e65f71a42793 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/themes/dark.tcss +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/themes/dark.tcss @@ -34,9 +34,6 @@ $dark-fg: #D4D4D4; #info { color: #9CDCFE; } #notice { color: #C586C0; } #row-alt { background: #252525; } -#mcp-active { color: #4EC9B0; } -#mcp-idle { color: #606060; } -#mcp-down { color: #F48771; } #base-bg { background: $dark-bg; } #base-fg { color: $dark-fg; } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/themes/light.tcss b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/themes/light.tcss index 0497a74b9b95..022c7142e5d0 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/themes/light.tcss +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/themes/light.tcss @@ -34,9 +34,6 @@ $light-fg: #24292E; #info { color: #0366D6; } #notice { color: #6F42C1; } #row-alt { background: #F6F8FA; } -#mcp-active { color: #22863A; } -#mcp-idle { color: #959DA5; } -#mcp-down { color: #D73A49; } #base-bg { background: $light-bg; } #base-fg { color: $light-fg; } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ThemeTest.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ThemeTest.java index 91c020f5371e..306f3feda389 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ThemeTest.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ThemeTest.java @@ -73,9 +73,6 @@ class ThemeTest { assertEquals(Style.EMPTY.fg(Color.WHITE).bg(Color.rgb(0x26, 0x4F, 0x78)).bold(), Theme.selectionBg()); assertEquals(Style.EMPTY.fg(Color.rgb(0x9C, 0xDC, 0xFE)), Theme.info()); assertEquals(Style.EMPTY.fg(Color.rgb(0xC5, 0x86, 0xC0)), Theme.notice()); - assertEquals(Style.EMPTY.fg(Color.rgb(0x4E, 0xC9, 0xB0)), Theme.mcpActive()); - assertEquals(Style.EMPTY.fg(Color.rgb(0x60, 0x60, 0x60)), Theme.mcpIdle()); - assertEquals(Style.EMPTY.fg(Color.rgb(0xF4, 0x87, 0x71)), Theme.mcpDown()); assertEquals(Color.rgb(0x25, 0x25, 0x25), Theme.zebra()); assertEquals(Color.rgb(0x1E, 0x1E, 0x1E), Theme.baseBg()); assertEquals(Color.rgb(0xD4, 0xD4, 0xD4), Theme.baseFg()); @@ -88,10 +85,6 @@ class ThemeTest { assertEquals(Color.rgb(0xF6, 0x91, 0x23), Theme.accent()); assertEquals(Style.EMPTY.fg(Color.rgb(0x22, 0x86, 0x3A)), Theme.success()); assertEquals(Style.EMPTY.fg(Color.rgb(0xC0, 0xC0, 0xC0)), Theme.border()); - // MCP indicator hues track the light palette: idle gray and down red differ from the dark ANSI variants. - assertEquals(Style.EMPTY.fg(Color.rgb(0x22, 0x86, 0x3A)), Theme.mcpActive()); - assertEquals(Style.EMPTY.fg(Color.rgb(0x95, 0x9D, 0xA5)), Theme.mcpIdle()); - assertEquals(Style.EMPTY.fg(Color.rgb(0xD7, 0x3A, 0x49)), Theme.mcpDown()); // Zebra background is theme-aware: light gray on light, unlike the dark gray used on dark. assertEquals(Color.rgb(0xF6, 0xF8, 0xFA), Theme.zebra()); // Base colors differ significantly between themes: white background and dark text on light mode. @@ -242,9 +235,6 @@ class ThemeTest { assertNotNull(Theme.selectionBg()); assertNotNull(Theme.info()); assertNotNull(Theme.notice()); - assertNotNull(Theme.mcpActive()); - assertNotNull(Theme.mcpIdle()); - assertNotNull(Theme.mcpDown()); assertNotNull(Theme.zebra()); assertNotNull(Theme.baseBg()); assertNotNull(Theme.baseFg());
