CAMEL-23720: Add emoji icons to camel-jbang TUI tab headers and centralize glyphs#24412
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 2 tested, 1 compile-only — current: 2 all testedMaveniverse Scalpel detected 3 affected modules (current approach: 2).
|
davsclaus
left a comment
There was a problem hiding this comment.
Review: CAMEL-23720 — Add emoji icons to TUI tab headers and centralize glyphs
Well-structured refactoring across 5 commits. TuiIcons as single source of truth, MoreTab record consolidation, and mnemonic-derived shortcuts are all sound. Excellent test coverage (icon width, VS16 absence, shortcut uniqueness, historical sequence oracle, Browse/Configuration regression guard).
Minor suggestions (non-blocking)
-
TuiHelper.fileEmoji()/fileEmojiByName()still return raw emoji literals —FilesBrowser.fileType()now switches onTuiIconsconstants, but the methods producing the values it compares against haven't been migrated. Works because the values are identical, but contradicts the "single source of truth" principle this PR establishes. Good follow-up candidate. -
VS16 in some constants —
DEV_PROFILE = "🛠️"andWARN = "⚠️"contain VS16 (U+FE0F), while the class Javadoc and CAMEL-23818 reference say to avoid it. TheprimaryTabEmojisHaveNoVariationSelectortest only checksPRIMARY_TAB_ICONS. These were pre-existing values; consider cleaning them up or documenting as exceptions. -
Icon alias naming —
TuiIcons.OTEL(🔗) is reused for MCP connection doctor checks (not OTel-related), andTAB_STARTUPreusesQUARKUS(🚀) though Startup isn't Quarkus-specific. Naming nitpicks, not bugs.
None of these are blocking. Nice contribution!
This review does not replace specialized tools such as CodeRabbit, Sourcery, or SonarCloud.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Introduce TuiIcons as the single source of truth for emoji and UI symbols across the camel-jbang TUI: tab bar, More submenu, footer navigation hints, and the F2 Actions/Go-to popups. Consolidate the More submenu into a MoreTab record with & mnemonics, add a compact tab-bar threshold, and strengthen TUI icon tests (TuiIconsTest, tab bar render tests) validating icon width constraints and MoreTab invariants. Co-authored-by: Cursor <cursoragent@cursor.com>
Migrate raw emoji literals that lived in popup/browser classes to the TuiIcons registry, completing the single-source-of-truth goal: - ExampleBrowserPopup: bundled/online/Docker/infra/Citrus icons and legend - InfraBrowserPopup: infra service row prefix - FolderBrowser: directory icon - DoctorPopup: MCP connection check now uses TuiIcons.MCP instead of reusing TuiIcons.OTEL (which stays for OTel Spans) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…i to TuiIcons constants Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Description
Adds emoji icons to the
camel-jbang-plugin-tuimonitor and centralizes all glyph handling:TuiIconsas the single source of truth for emoji and UI symbols. Add icons to every primary tab header, the More submenu, and the Go to popup; replace hardcoded footer navigation hints withTuiIconsconstants.TabRegistry.MoreTabrecord (icon, name, label, tab), replacing the fragile parallel arrays and theMORE_TAB_KEY_INDEXoffset table.PopupManager,McpFacade, andActionsPopupnow read from this one list.&mnemonic markers embedded in each label, so the underline offset and the trigger key can no longer drift apart. Mnemonic triggers are case-insensitive.Review feedback addressed:
DEV_PROFILEandWARNso allTuiIconsconstants are consistently plain 2-column emoji without VS16, matching the class Javadoc contract.TuiHelper.fileEmoji(),fileEmojiByName(), anddetectPomEmoji()to useTuiIconsconstants instead of raw emoji literals, completing the glyph centralization.AI-generated PR description on behalf of Adriano Machado, via Claude Code.