ammachado opened a new pull request, #24613: URL: https://github.com/apache/camel/pull/24613
## Description The Camel TUI (`camel-jbang-plugin-tui`) rebuilt and diffed the **entire widget tree on every tick event**. At TamboUI's default tick rate of 40ms that is ~25 redraws per second, even when the UI is idle and nothing changed. ### Root cause `CamelMonitor.handleTickEvent` unconditionally returned `true`, and `TuiRunner` redraws whenever the event handler returns `true`. Application data only changes every `refreshInterval` (default 500ms), so roughly 24 of every 25 renders produced identical frames. There is no visible flicker (the framework double-buffers and diffs before writing to the terminal), but it wastes CPU on every idle frame. ### Fix The tick handler now returns `true` only when: - the periodic data refresh actually fired, **or** - an animation is in flight: an open shell/AI panel, a sliding pinned-log panel, a canvas animation, a typing/fading caption, a header notification wave, or the recorded-keystroke highlight. All other time-based UI elements (footer indicators, auto-dismissing draw overlays, live tab metrics) are healed by the next periodic data-refresh redraw, bounded by the refresh interval (≤500ms). Idle redraw rate drops from ~25 fps to ~2 fps while animations stay smooth. The redraw decision is extracted into a pure static `needsAnimationRedraw(...)` so its intent is unit-tested without standing up the whole monitor. ### Testing - New `CamelMonitorTickRedrawTest`: idle tick does not redraw; each of the 7 animation sources alone triggers a redraw. - Full `camel-jbang-plugin-tui` suite: **687 tests, 0 failures**. --- _Authored by Claude Code on behalf of @ammachado._ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
