fix: make TUI charts fill available width on wide terminals#24318
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:
All tested modules (2 modules)
|
davsclaus
left a comment
There was a problem hiding this comment.
Nice cleanup — the dynamic sizing logic is correct and the buffer increase is well-scoped.
One thing I noticed: CircuitBreakerTab has the same fixed-60 chart sizing (MAX_CHART_POINTS = 60 at line 52, renderPoints = MAX_CHART_POINTS at line 355) that this PR fixes in EndpointsTab. The CB history buffer in MetricsCollector is already bumped to 300 (it goes through recordEndpointSample → MAX_ENDPOINT_CHART_POINTS), but the render side is still hardcoded. Could be addressed in a follow-up.
Also a pre-existing nit: OverviewTab declares its own MAX_SPARKLINE_POINTS instead of referencing MetricsCollector.MAX_SPARKLINE_POINTS — they could drift.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Charts previously used a fixed 60-point buffer which left empty space on wide terminals. Increase history buffers to 300 points and compute renderPoints dynamically from the available area width so sparklines and bar charts fill their panels. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same treatment as EndpointsTab: increase MAX_CHART_POINTS to 300, compute renderPoints from available width, and use dynamic x-axis labels. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
398034a to
cf8d06e
Compare
Summary
Claude Code on behalf of Guillaume Nodet
Charts previously used a fixed 60-point history buffer which left significant empty space on wide terminals. This PR makes charts dynamically size to fill the available width.
Changes
MAX_SPARKLINE_POINTSfrom 60 to 300 (bar chartrenderPointswas already computed dynamically from available width)MAX_CHART_POINTSfrom 60 to 300 and computerenderPointsdynamically from the chart area width in all three chart methods (renderEndpointFlow,renderSingleEndpointChart,renderPayloadSizeChart)Test plan
🤖 Generated with Claude Code