CAMEL-23635: camel-jbang - Add shell panel to TUI#23605
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
Oh can the toggle be 25%/50%/100% or does that not work to well ? |
|
Updated — the toggle now cycles through three sizes:
The split uses Claude Code on behalf of Guillaume Nodet |
|
There is a merge conflict, thanks |
|
Merge conflict resolved — rebased on latest main which added the Claude Code on behalf of Guillaume Nodet |
|
🧪 CI tested the following changed modules:
All tested modules (2 modules)
|
davsclaus
left a comment
There was a problem hiding this comment.
Nice feature — the JLine ScreenTerminal + LineDisciplineTerminal wiring is solid, and the convertAttrToStyle() bit extraction correctly matches JLine's own generateSpanTag(). A couple of minor observations below.
This review does not replace specialized AI review tools (CodeRabbit, Sourcery) or static analysis (SonarCloud).
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
| } | ||
| virtualTerminal = null; | ||
| } | ||
| screenTerminal = null; |
There was a problem hiding this comment.
FQCN: org.jline.shell.Shell should be imported rather than used inline (per project convention in CLAUDE.md). The OpenRewrite build plugin will auto-fix this on mvn clean install, so just make sure to rebuild before pushing.
| screenTerminal = null; | |
| try (Shell shell = Shell.builder() |
(with import org.jline.shell.Shell; added to the imports block)
| startShell(innerWidth, innerHeight); | ||
| } | ||
|
|
||
| // Handle resize |
There was a problem hiding this comment.
Minor: close() calls stopShell() which destroys the virtual terminal and shell thread. The PR test plan mentions "Reopen shell → verify previous session state", but reopening creates a fresh shell with no prior state. Consider updating the test plan description, or alternatively only setting visible = false without destroying the shell (and deferring stopShell() to TUI exit).
997476b to
a3025ba
Compare
Embed a real JLine shell inside the TUI using JLine's virtual terminal infrastructure (LineDisciplineTerminal + ScreenTerminal): - ShellPanel: new overlay panel with embedded camel shell - Uses ScreenTerminal as VT100 emulator with readable screen buffer - LineDisciplineTerminal provides master/slave pipes - Shell runs in background thread via ShellBuilder - Screen buffer dumped and converted to TamboUI widgets each frame - Full resize handling (half/full toggle, terminal resize) - Key events forwarded as ANSI escape sequences - ActionsPopup: add "Shell" action to F2 menu (always visible) - CamelMonitor: integrate shell panel - Event routing: shell panel intercepts keys when open - Split-screen rendering: 50/50 with monitoring tabs - Full-screen mode: shell takes entire content area - Footer hints: Esc to close/shrink, F11 to toggle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a3025ba to
c78d71a
Compare
CAMEL-23635
Summary
Embeds a real JLine shell inside the TUI using JLine's virtual terminal infrastructure:
ShellPanel: new overlay panel accessible from F2 → Shell
LineDisciplineTerminal+ScreenTerminal(VT100 emulator) +ScreenTerminalOutputStream— the same wiring pattern as JLine's ownWebTerminalShellBuilderwithPicocliCommandRegistry— full tab completion, history, aliases, fish-style autosuggestionsSpan/Linewidgets with proper color/attribute mappingsetSize()→ SIGWINCHLayout: three sizes — 25%, 50%, or 100% of the content area
Test plan
camel top→ F2 → Shell → verify shell prompt appearscatalog component --filter=kafka→ verify output with colorsClaude Code on behalf of Guillaume Nodet