[
https://issues.apache.org/jira/browse/CAMEL-23838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adriano Machado updated CAMEL-23838:
------------------------------------
Fix Version/s: (was: 4.21.0)
> camel-jbang TUI: F1/? help broken - NoClassDefFoundError from commonmark
> version conflict and ? not bound
> ---------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-23838
> URL: https://issues.apache.org/jira/browse/CAMEL-23838
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Reporter: Adriano Machado
> Assignee: Adriano Machado
> Priority: Major
>
> h2. Summary
> In {{camel tui}} \(the camel\-jbang TUI plugin\), the context\-sensitive help
> is broken in two ways:* Pressing {{?}} does nothing.
> * Pressing {{F1}} throws {{java.lang.NoClassDefFoundError:
> org/commonmark/renderer/markdown/MarkdownRenderer$MarkdownRendererExtension}}.
> h2. Root cause
> _F1 crash \(NoClassDefFoundError\):_ The {{camel\-launcher}} fat\-jar bundles
> every ASF plugin on a single flat classpath. Maven dependency mediation
> resolves a split commonmark:
> * {{org.commonmark:commonmark}} \(core\) \-> 0.21.0, pulled in by
> {{camel\-jbang\-plugin\-generate}} \-> {{openapi\-generator:7.23.0}}
> \(declared first\).
> * {{org.commonmark:commonmark\-ext\-\*}} \-> 0.28.0, pulled in by
> {{camel\-jbang\-plugin\-tui}} \-> {{tamboui\-markdown:0.4.0}}.
> commonmark 0.21.0 does not contain the
> {{org.commonmark.renderer.markdown.MarkdownRenderer}} class at all \(it was
> added later\). The TUI's markdown help view \(tamboui {{MarkdownView}}\)
> references {{MarkdownRenderer$MarkdownRendererExtension}}, so rendering help
> throws {{NoClassDefFoundError}}.
> _? does nothing:_ {{CamelMonitor.handleGlobalKeys}} only bound {{KeyCode.F1}}
> to the help overlay; the {{?}} character was never handled, and
> {{HelpOverlay}} swallowed {{?}} without closing.
> The on\-demand {{camel\-jbang\-main}} path is not affected, since it
> downloads only the requested plugin into its own classloader \(clean
> commonmark 0.28.0\).
> h2. Fix
> * Pin {{org.commonmark:commonmark}} to 0.28.0 in {{camel\-launcher}}
> {{dependencyManagement}} so the core matches the {{commonmark\-ext\-\*}}
> modules. openapi\-generator only uses the stable {{Parser}}/{{HtmlRenderer}}
> builder APIs, which are unchanged in 0.28.0.
> * Bind {{?}} to open/toggle help in {{CamelMonitor}} \(guarded so it does not
> trigger while typing in a search/filter input\), and let {{HelpOverlay}} also
> close on {{?}} so the binding is a true toggle.
> * Documentation updated in {{camel\-jbang\-tui.adoc}} \(TIP line and Keyboard
> Shortcuts table\).
> * Added {{HelpOverlayTest}} covering close\-on\-{{?}}, F1/{{q}} regression,
> and that an unrelated key keeps the overlay open.
> h2. Affected component
> camel\-jbang \(TUI plugin / launcher\)
> ----
> _Generated by Claude Code on behalf of Adriano Machado._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)