CAMEL-23237: camel-jbang - Adapt CLI table output to terminal width#22219
Merged
CAMEL-23237: camel-jbang - Adapt CLI table output to terminal width#22219
Conversation
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 (26 modules)
|
c40c1c5 to
47abe10
Compare
apupier
approved these changes
Mar 24, 2026
Contributor
Author
Rendering details — Claude Code on behalf of Guillaume Nodet
|
- Add TerminalWidthHelper utility that detects terminal width via JLine and provides methods for proportional column width scaling - Add terminalWidth() method to CamelCommand base class - Update all 33 command files that produce AsciiTable output to adapt their column widths based on the detected terminal width - CatalogDoc tables use proportional scaling across all columns for FANCY_ASCII bordered tables (most visible in demos) - Process/action commands scale their flexible columns (URI, DESCRIPTION, MESSAGE, etc.) while keeping small fixed columns unchanged Co-Authored-By: Claude Opus 4.6 <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
TerminalWidthHelperutility that detects terminal width via JLine and providesflexWidth()/scaleWidth()methods for adaptive column sizingflexWidth()for single flexible columns (NO_BORDERS tables),scaleWidth()for proportional scaling of all columns (FANCY_ASCII tables)TerminalWidthHelperRendering comparison
See the rendering details comment for before/after table comparisons at 85-col and 120-col terminals.
Test plan
TerminalWidthHelperTest— 18 tests coveringflexWidth,scaleWidth, border overhead, and integration scenarioscamel-jbang-coretest suite passes (334 tests)