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


The following commit(s) were added to refs/heads/main by this push:
     new 5f804ab0f943 chore: camel-jbang monitor menu icons that are emoji by 
default (#27580)
5f804ab0f943 is described below

commit 5f804ab0f943196db0cdb5a303527a078aca9274
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Oct 8 17:43:46 2026 +0200

    chore: camel-jbang monitor menu icons that are emoji by default (#27580)
    
    The keyboard, record, stop and wastebasket icons used text-default glyphs
    with the VS16 variation selector. Many terminals draw those in one column,
    so their menu labels started one column left of the others. Use glyphs that
    are emoji by default and two columns wide everywhere: ๐Ÿ”ก keystrokes,
    ๐Ÿ”ด record, โฌ› stop recording, ๐Ÿšฎ delete.
    
    
    Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
---
 .../camel/dsl/jbang/core/commands/tui/TuiIcons.java      | 16 ++++++++--------
 .../camel/dsl/jbang/core/commands/tui/TuiIconsTest.java  | 15 ++++++++-------
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/TuiIcons.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/TuiIcons.java
index 1308442ab22e..ff4cac037eb7 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/TuiIcons.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/TuiIcons.java
@@ -21,10 +21,10 @@ import java.util.List;
 /**
  * Single source of truth for emoji and symbolic icons used across the Camel 
TUI.
  * <p/>
- * Tab/menu icons are 2-column emoji. A text-default glyph such as the 
keyboard or the wastebasket must carry the VS16
- * variation selector (U+FE0F): TamboUI counts the bare glyph as 2 columns 
while terminals draw it in 1, and with VS16
- * both TamboUI 0.5.0 (tamboui/tamboui#388) and the xterm.js grapheme width 
tables used by {@code --web} agree on 2.
- * Doctor and legacy status glyphs may still use mixed-width symbols until 
migrated.
+ * Tab/menu icons are 2-column emoji. Use glyphs that are emoji by default 
(wide in the Unicode width tables), not
+ * text-default glyphs with the VS16 variation selector (U+FE0F) such as the 
keyboard or the wastebasket: TamboUI and
+ * xterm.js count those as 2 columns, but many terminals still draw them in 1, 
which shifts the menu labels. Doctor and
+ * legacy status glyphs may still use mixed-width symbols until migrated.
  */
 final class TuiIcons {
 
@@ -63,17 +63,17 @@ final class TuiIcons {
     static final String RENAME = "๐Ÿ”ค";
     static final String DUPLICATE = "๐Ÿ“‘";
     static final String CONVERT = "๐Ÿ”€";
-    static final String DELETE = "๐Ÿ—‘๏ธ";
+    static final String DELETE = "๐Ÿšฎ";
 
     // ---- Actions menu ----
     static final String GO_TO = "๐Ÿ”";
     static final String MESSAGE = "๐Ÿ“ฉ";
-    static final String KEYSTROKES = "โŒจ๏ธ";
+    static final String KEYSTROKES = "๐Ÿ”ก";
     static final String SLEEP = "๐Ÿ’ค";
     static final String STOP = "๐Ÿ›‘";
     static final String QUIT = "๐Ÿšช";
-    static final String RECORD = "โบ๏ธ";
-    static final String STOP_RECORD = "โน๏ธ";
+    static final String RECORD = "๐Ÿ”ด";
+    static final String STOP_RECORD = "โฌ›";
     static final String DOCTOR = "๐Ÿฉบ";
     static final String RESET = "๐Ÿ”„";
     static final String CLEAN = "๐Ÿงน";
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/TuiIconsTest.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/TuiIconsTest.java
index 60613d46491a..2475c7267428 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/TuiIconsTest.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/TuiIconsTest.java
@@ -22,13 +22,14 @@ import dev.tamboui.text.CharWidth;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Validates {@link TuiIcons} emoji widths (CAMEL-23818: every icon has to 
take the 2 columns TamboUI reserves for it,
- * which for text-default glyphs means carrying VS16) and the mnemonic and 
runtime/platform icon helpers. More-submenu
- * icons and labels are validated in {@link TabRegistryTest} where the {@link 
TabRegistry.MoreTab} records that own them
- * are constructed.
+ * using glyphs that are emoji by default, as text-default glyphs with VS16 
are drawn 1 column wide on many terminals)
+ * and the mnemonic and runtime/platform icon helpers. More-submenu icons and 
labels are validated in
+ * {@link TabRegistryTest} where the {@link TabRegistry.MoreTab} records that 
own them are constructed.
  */
 class TuiIconsTest {
 
@@ -61,11 +62,11 @@ class TuiIconsTest {
     }
 
     @Test
-    void textDefaultMenuEmojisCarryVs16AndAreTwoColumnsWide() {
-        // bare U+2328, U+23F9, U+23FA and U+1F5D1 render in one column on 
terminals; the VS16 sequence is what
-        // makes the terminal, the --web xterm.js tables and TamboUI agree on 
two
+    void menuEmojisAreEmojiByDefaultAndTwoColumnsWide() {
+        // text-default glyphs (keyboard, record, stop, wastebasket) with VS16 
are drawn in 1 column on many terminals,
+        // so the menu uses glyphs that are emoji by default
         for (String icon : List.of(TuiIcons.KEYSTROKES, TuiIcons.RECORD, 
TuiIcons.STOP_RECORD, TuiIcons.DELETE)) {
-            assertTrue(icon.endsWith("\uFE0F"), "Icon should end with the VS16 
variation selector: " + icon);
+            assertFalse(icon.contains("\uFE0F"), "Icon should not need the 
VS16 variation selector: " + icon);
             assertEquals(2, CharWidth.of(icon), "Icon should be 2 terminal 
columns wide: " + icon);
         }
     }

Reply via email to