Skip to content

CAMEL-23634: camel-jbang - TUI Send Message dialog#23598

Merged
davsclaus merged 6 commits into
mainfrom
CAMEL-23634
May 28, 2026
Merged

CAMEL-23634: camel-jbang - TUI Send Message dialog#23598
davsclaus merged 6 commits into
mainfrom
CAMEL-23634

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

@davsclaus davsclaus commented May 28, 2026

Summary

Adds a "Send Message" action to the TUI F2 actions menu. This lets users send messages to running Camel integrations directly from the TUI — similar to camel cmd send but with an interactive dialog.

Send Message Dialog

  • Route selector: cycles through available routes with left/right arrows
  • Smart default: prefers direct:, seda:, platform-http: routes (endpoints designed to receive messages)
  • Pre-selection: when opened from the Routes tab, the currently highlighted route is pre-selected
  • Body text input: type the message body inline
  • Header editing: press + to add key-value header rows, Tab navigates between fields, Backspace on empty key deletes the row
  • Clipboard paste: Cmd+V / Ctrl+V support via TamboUI bracketed paste mode
  • Mode toggle: switch between InOnly (fire-and-forget) and InOut (request-reply) exchange patterns
  • Async send: sends on the scheduler thread to avoid blocking the TUI render loop
  • Result display: shows elapsed time, reply body (InOut), or error message

Works from any tab since F2 is global. Uses the existing action file mechanism. Headers are sent as JSON array of key/value objects matching CamelSendAction.writeSendData() format.

History Tab Fix

  • F5 refresh: F5 now correctly triggers a one-shot refresh of history data (was previously a no-op in the non-trace view)

Test plan

  • Build: mvn install -pl dsl/camel-jbang/camel-jbang-plugin-tui -DskipTests
  • Run a direct route: camel run tui-hello-world (from examples)
  • Open TUI, press F2, Send Message
  • Verify route selector shows available routes with smart default on direct:greet
  • Type body, press Enter, verify Sent result
  • Toggle to InOut mode, verify reply body shown
  • Press + to add headers, type key/value, verify Tab navigates between fields
  • Backspace on empty header key removes header row
  • Paste text via Cmd+V into body field
  • Test from Routes tab: select a route, press F2, verify pre-selection
  • Switch to History tab, press F5, verify history data refreshes

Claude Code on behalf of Claus Ibsen

davsclaus and others added 5 commits May 28, 2026 12:48
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the dsl label May 28, 2026
@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.

F5 now triggers a one-shot refresh of history data instead of being a no-op.

Co-Authored-By: Claude <noreply@anthropic.com>
@davsclaus davsclaus merged commit e5e7e9a into main May 28, 2026
6 checks passed
@davsclaus davsclaus deleted the CAMEL-23634 branch May 28, 2026 12:01
@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-plugin-tui
All tested modules (2 modules)
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: Launcher :: Container

⚙️ View full build and test results

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