[
https://issues.apache.org/jira/browse/CAMEL-26864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-26864.
---------------------------------
Resolution: Fixed
Resolved for 4.24.0. All items are done in six merged PRs: #29639 (Startup
total and parents, tui_get_history on Inspect, tab names, small display fixes,
the Warmup typo), #29653 (Diagram drill-down, Inspect diagram, Endpoints avg
body, MCP keys to the tab), #29657 (Log paused/live, "(no body)"), #29658
(Consumers total, Inspect Info panel), #29659 (processor-detail names the route
input by the id of its from) and #29661 (tui_get_diagram). Item 13 (the
Endpoints arrows) stays as designed: → is into Camel, ← is out of Camel.
_Claude Code on behalf of davsclaus_
> camel-jbang - TUI: issues found walking the tabs of a running integration
> -------------------------------------------------------------------------
>
> Key: CAMEL-26864
> URL: https://issues.apache.org/jira/browse/CAMEL-26864
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Findings from walking every tab of the Camel TUI (4.24.0-SNAPSHOT, main at
> 89929a305815) on a running integration, driven from the TUI's own AI panel
> through the camel-tui MCP tools. Each item says the tab, what was seen, what
> was expected, and where the code is when known. The items are independent and
> can be fixed one by one.
> h3. Reproduce
> {{camel run hello.camel.yaml}} then {{camel tui}}:
> {code:yaml}
> - route:
> id: hello
> from:
> uri: timer:tick
> parameters:
> period: 2000
> steps:
> - setBody:
> simple: "Hello ${random(100)}"
> - choice:
> when:
> - simple: "${body} contains '7'"
> steps:
> - to: direct:seven
> otherwise:
> steps:
> - log: "${body}"
> - route:
> id: seven
> from:
> uri: direct:seven
> steps:
> - log: "Lucky ${body}"
> {code}
> h3. Bugs
> # *Diagram: drilling into a route shows the nodes of another route.*
> {{tui_navigate(tab=Diagram, route=hello, node=choice1)}} fails with "Node not
> found: choice1 in route hello". The state is then diagramMode=route,
> routeId=hello, but the EIP node list is [seven, log2] (route seven's nodes)
> and the selected node is from[direct:seven]. The Topology route list is
> ordered [seven, hello] and the routes are [hello, seven], so it looks like an
> index into a list in a different order. Expected: hello's nodes (setBody1,
> choice1, to1, log1).
> # *Diagram: the screen does not follow the drill-down.* After the call above
> (and after {{tui_navigate(tab=Diagram, route=hello)}}, which returns
> selectedRoute=hello), the screen still draws the Architecture view while
> tui_get_state says diagramMode=route. Expected: the screen shows the Topology
> / Route view the state says.
> # *Inspect: the screen shows an old exchange.* The Info panel and the History
> Topology diagram show exchange ...0051 from 13:16:12 ("Step: 1/6"), while the
> tab's table data (tui_get_table Inspect) is the latest exchange ...046E from
> 13:51:18 with 5 steps. Expected: the screen and the data show the same
> exchange.
> # *tui_get_history finds no data.* It returns "No history data available.
> Ensure the History tab has data." while the Inspect tab has data.
> {{TuiToolRegistry.callGetHistory}} looks up the tab "History", which is now
> called "Inspect". With an exchangeId it also calls
> {{facade.navigateToTab("History")}}, so a tui_get_* tool changes what the
> user sees, unlike the other tui_get_* tools.
> # *Startup: the total is wrong.* The title says "Total: 222ms", the longest
> single step ({{StartupTab}} line 369: {{max(duration)}}). The startup went
> from the first step at ...209063 to the end of "Start CamelContext" at
> ...209527, which is about 465ms, and "Start CamelContext" (182ms) runs after
> "Init CamelContext" (222ms). Expected: the time from the first step to the
> end of the last one.
> # *Startup: steps are under the wrong parent.* The rows are ordered by begin
> time, so the children of "seven Create Route" ("direct:seven Get Endpoint",
> "log2 Create Log Processor", parentId 19) are shown under "hello Init Route"
> (id 22), which began at the same millisecond. Expected: depth-first by
> parentId, so each child is under its own parent.
> # *camel-core typo.* {{InternalRouteStartupManager.java:320}} records the
> startup step "Warump Route". It should be "Warmup Route" (shown on the
> Startup tab).
> # *Endpoints: outgoing is 0 for a route that sends.* With the hello →
> direct://seven (out, 202 hits) row selected, the Flow panel shows "1131 in, 0
> out" and the msg/s chart shows "out:0", while the avg body chart shows "out:7
> B". Expected: the out count and rate include direct://seven ({{EndpointsTab}}
> around line 370, {{EndpointFlow.total}}).
> # *tui_send_keys has no effect while the AI panel is open.*
> {{tui_send_keys(["Enter"])}} on the Diagram tab returned sent=1, but nothing
> changed and tui_get_events did not record the key. The keys seem to go to the
> AI panel's input. Expected: keys from the MCP tool reach the active tab, or
> the tool says where they went.
> h3. Inconsistencies and UX
> # *Log: same paused-or-live problem as the Timeline.* The Log tab stayed
> paused at 13:17 while the time was 13:51. The only signs were "(paused, End
> follows)" in plain text in the title and "f follow off" in the footer. The
> Timeline pauses with Space and the Log with f/End. Expected: the same badge
> and border as the Timeline (see the PR that adds ‖ PAUSED / ● live there),
> and the same key on both tabs.
> # *Log: missing space in the title.* "Log level:INFO" should be "Log level:
> INFO".
> # *Source and Inspect: the body type "null".* On the Source tab the setBody
> line shows the body type as the word "null" (the timer exchange's body before
> setBody), and Inspect has bodyType "null" for the from and setBody steps.
> Expected: "(no body)", or say whether the type is before or after the step.
> # *Endpoints: the arrows are the wrong way round.* The DIR column shows "→
> in" and "← out" ({{EndpointsTab}} lines 247-248: in = KEY_RIGHT, out =
> KEY_LEFT), while the Flow panel draws in ───► [route] ───► out. Expected: the
> same direction in both.
> # *tui_get_table names the wrong tab.* tui_get_table(tab=Inspect) returns
> "tab":"History" ({{HistoryTab}} line 2473) and tui_get_table(tab="Memory
> Usage") returns "tab":"Memory" ({{MemoryTab}} line 503). Expected: the names
> tui_get_options lists.
> # *Inspect: two ids for the same step.* The trace says nodeId "from1" for the
> from of route hello, while tui_get_processor_detail says its id is "hello".
> The exchange property CamelMessageBodySize is 0 at every step, even when the
> body is "Hello 34". The Info panel shows the raw direction marker ("Step: 1/6
> *->") and an empty "Changed:" label.
> # *Routes and Overview: unlabelled time in TOTAL.* The TOTAL column shows
> "1128 (1s)" and "201 (13s)". The value in brackets, the time since the last
> exchange, has no header or legend.
> # *Consumers: no count for event-driven consumers.* The direct consumer of
> route seven has an empty POLLS column and no total (tui_get_table has no
> totalCounter for it), although it received 200+ messages. Expected: a
> received count for consumers that are not polled.
> # *Diagram (Architecture): double brackets.* The entry point label reads
> "timer:tick (period=2000) (internal)". Expected: something like "timer:tick
> (period=2000, internal)".
> # *Startup: a leading space for steps with no name.* " Init CamelContext"
> and " Scan HealthChecks" get an extra space where the name would be.
> # *Errors: empty state in the wrong place.* "No errors captured" is drawn in
> the middle of the row, under EXCEPTION/MESSAGE. Expected: aligned like the
> empty states of the other tabs.
> h3. Notes for whoever picks this up
> * Most items are in {{dsl/camel-jbang/camel-jbang-plugin-tui}}. Item 7 is in
> {{core/camel-base-engine}}.
> * The render tests ({{*RenderTest}}, {{TuiTestHelper.renderToString}}) are
> the quickest way to reproduce and cover the screen items. Items 1, 2, 4 and 9
> are in the MCP tool layer ({{TuiToolRegistry}} and the facade).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)