Skip to content

TUI: overview info panel, chart toggle, source view and UX improvements#23262

Merged
davsclaus merged 6 commits into
mainfrom
fix/camel-tui-polish
May 16, 2026
Merged

TUI: overview info panel, chart toggle, source view and UX improvements#23262
davsclaus merged 6 commits into
mainfrom
fix/camel-tui-polish

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

Summary

Claude Code on behalf of Claus Ibsen

A collection of UX and feature improvements to the Camel JBang TUI monitor (camel-jbang-plugin-tui):

  • Overview info panel: Added a panel beside the throughput bar chart showing runtime identity (platform, Camel version, JVM version/vendor/VM name), uptime, heap (used/max/%), non-heap (metaspace), and thread counts. JVM fields (javaVendor, javaVmName) are now also emitted by LocalCliConnector.
  • Chart scope toggle: Press a on the Overview tab to switch the throughput chart between aggregated stats for all integrations ([All]) and the selected integration only (name shown in yellow).
  • Auto-select on scroll: Scrolling up/down on the Overview table now immediately updates the selected integration (same behaviour as the Routes tab).
  • Reset tab state on integration switch: Switching to a different integration on Overview resets diagram, route table, log scroll/follow, trace detail, and source view state so all tabs show a clean slate.
  • Esc race fix: Diagram no longer re-shows if the user presses Esc while the background load is still in flight.
  • Source code view: Press c on the Routes tab to fetch and display the source code of the selected route. Auto-scrolls to the route's start line. Supports arrow/PgUp/PgDn/Home/End with vertical and horizontal scrollbars. Press c or Esc to close.

Test plan

  • Start one or more Camel integrations with camel run
  • Open TUI with camel monitor and verify the info panel appears beside the throughput chart on the Overview tab
  • Press a to toggle chart between all/single and confirm title changes
  • With 2+ integrations, scroll up/down on Overview and confirm the info panel updates immediately
  • Navigate to Routes tab, press c and confirm source code is shown with correct line highlight
  • Press Esc or c to close source view
  • Switch integrations on Overview, navigate to Routes tab and confirm no stale diagram/source is shown
  • Open a text diagram (D), press Esc quickly while it loads — confirm it does not reappear

🤖 Generated with Claude Code

davsclaus and others added 6 commits May 16, 2026 17:35
Shows a 22-col Info panel to the right of the diagram with:
- HEAP: used/max (percent)
- THREADS: current count and peak

Removes the HEAP column from the overview integrations table since
the information is now visible on the diagram tab.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add missing renderDiagramInfoPanel call at the end of the text diagram
path, and extract helper method shared by both image and text paths.
Panel renders last so it draws on top of any diagram overflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tails

Add an info panel beside the throughput chart on the Overview tab showing:
- Runtime platform and Camel version
- JVM version, vendor, and VM name (new fields added to LocalCliConnector)
- Uptime, heap (used/max/%), non-heap (metaspace), and thread counts

Also emits javaVendor and javaVmName from LocalCliConnector via RuntimeMXBean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n switch

- Scrolling up/down on the Overview table now immediately updates the
  selected integration (same behaviour as the Routes tab)
- Switching to a different integration resets all tab-specific view state:
  diagram, route table, log scroll/follow, and trace detail view
- Fix Esc race: diagram no longer re-shows if user presses Esc while the
  background load is still in flight

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Press 'a' on the Overview tab to switch the throughput bar chart between
aggregated stats for all running integrations [All] and stats for the
currently selected integration only, with the name shown in yellow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Press 'c' on the Routes tab to fetch and display the source code of the
currently selected route. The view auto-scrolls to the route's start line,
supports arrow/PgUp/PgDn/Home/End scrolling with both vertical and
horizontal scrollbars, and shows the source filename and line number in
the title. Press 'c' or Esc to close. Shows a message when no source is
available (e.g. programmatic routes without a file location).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions Bot added the dsl label May 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-cli-connector
  • dsl/camel-jbang/camel-jbang-plugin-tui
All tested modules (7 modules)
  • Camel :: DSL :: CLI Connector
  • Camel :: DSL :: CLI Debug
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container

⚙️ View full build and test results

@davsclaus davsclaus merged commit 050af78 into main May 16, 2026
6 checks passed
@davsclaus davsclaus deleted the fix/camel-tui-polish branch May 16, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant