CAMEL-23512: Fix TamboUI API misuse in camel-jbang-plugin-tui#23200
Merged
Conversation
- Replace deprecated KeyEvent.character() with ke.string() for proper Unicode support - Use CharWidth for display width calculations instead of String.length() - Fix TuiHelper.truncate() to use CharWidth.truncateWithEllipsis() - Fix CamelCatalogTui.wrapText() and flowFields() to use CharWidth - Fix CamelMonitor diagram width calculation to use CharWidth - Enable mouse capture in CamelMonitor for diagram scrolling - Move TableState for processors and route header to class fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… checks Replace raw KeyCode checks with semantic binding methods so vim/emacs key bindings are respected automatically via TamboUI's binding system. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use standard Home/End keys for jump-to-top and jump-to-end in the log viewer instead of vim-style g/G for consistency with normal users. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual Unicode box-drawing character repetition with TamboUI's Block widget using Borders.TOP_ONLY for idiomatic separator rendering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Avoid unnecessary method call overhead by using the Style.EMPTY constant directly instead of the Style.create() factory method which just returns EMPTY. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual line slicing and custom wrapText() method with Paragraph's built-in scroll() and Overflow.WRAP_WORD support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract hint(), hintLast(), and hintRefresh() helpers to eliminate repeated Span.styled/Span.raw patterns across all six tab footers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
|
🧪 CI tested the following changed modules:
All tested modules (2 modules)
|
gnodet
approved these changes
May 13, 2026
Contributor
gnodet
left a comment
There was a problem hiding this comment.
Nice improvements, LGTM !
Move refreshData() and loadDiagramForSelectedRoute() to background threads using TuiRunner.scheduler() to prevent UI freezes. - refreshData() now runs on the scheduler thread with AtomicBoolean guard against overlapping refreshes; results swapped to render thread - loadDiagramForSelectedRoute() shows loading state immediately, then runs file I/O, polling, and diagram rendering on the scheduler thread; diagram state applied atomically via runOnRenderThread() - Convert logLines/filteredLogEntries to swap-on-write pattern for thread-safe reads from the render thread - pollJsonResponse() Thread.sleep loop no longer blocks the render thread Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove custom orange thumb color from vertical scrollbar so both vertical and horizontal scrollbars use the same default style. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Place PgUp/PgDn and Home/End next to each other in the Log tab footer for consistent grouping of navigation keys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KeyEvent.character()withke.string()for proper Unicode supportCharWidthfor display width calculations instead ofString.length()(fixes CJK/emoji display)isPageUp(),isCancel(),isFocusNext(), etc.) instead of rawKeyCodechecks, enabling vim/emacs key binding supportStyle.EMPTYconstant instead ofStyle.create()(219 occurrences)BlockwithBorders.TOP_ONLYfor catalog separator instead of manual character repetitionscroll()andOverflow.WRAP_WORDinstead of manual line slicing and customwrapText()methodg/Gkeys withHome/Endin Log tab for consistencyhint()helper methods (-27 lines)Test plan
mvn clean install -pl dsl/camel-jbang/camel-jbang-plugin-tui -Dquickly)mvn formatter:format impsort:sort)camel tui monitorand verify all 6 tabs render correctlycamel tui catalogand verify component browsing, filtering, and description scrolling🤖 Generated with Claude Code
Claude Code on behalf of Claus Ibsen