davsclaus opened a new pull request, #28456: URL: https://github.com/apache/camel/pull/28456
_Claude Code on behalf of @davsclaus_ A large route takes a lot of screen in the route diagram of `camel tui`: a step is a box of up to three lines with four empty rows below it, so a 45-row terminal shows about four steps. This adds zoom levels and folding to the route diagram, and zoom to the topology.  ## Zoom levels (route diagram and topology) - `+` / `-` move through three levels: - **detailed** (3/3): the boxes as before - **compact** (2/3, the new default): a box of one line per step, the steps closer together; about twice as many steps fit - **bare** (1/3): no boxes, each step a mark and its text on one row, with the counts on the lines between them - `z` is **fit**: the most detailed level in which the whole route (or topology) fits the screen - The level is shown in the view bar (`zoom: compact 2/3`, `fit bare 1/3`). It is kept for the next start and shared by the Diagram and Routes tabs. - Zooming keeps the selected step selected, on the same row of the screen. - The topology zooms the same way, which helps with many routes, such as when the utility routes are shown: compact routes have their count in the border, bare routes are a mark in their group's colour, their name and their count. ## Folding (route diagram) - `Space` folds the block of the selected step (a choice, a branch, a split, a doTry...) into its first step, which says how many steps are folded (`▸ 12 steps folded`); `Space` on a folded step unfolds it. - `f` folds all the blocks, nested ones included; `F` expands them all. - A folded block is left out before the layout, so it gives its rows and columns back. - The title of a route says how many steps it has and how many are folded (`· 34 steps · 12 folded`). ## Other changes - **Diagram tab level bar**: Architecture › Topology › Route were dim words at the end of the diagram title, easy to miss and cut off when the title was long. They now lead the view bar after the `v` key, the current one highlighted, as the help page and the manual already described. - **Esc back from a linked route** selects the step the link was followed from, on its row of the screen, instead of the `from` at the top. - At compact and bare, the lines of many branches join (`┌ ┬ ┼ ┐`) instead of drawing over each other. - To keep `DiagramSupport` under its size limit, the topology layout and the marking of remote steps moved to `DiagramLayouts` (`DiagramSupport` is now 2399 lines, and `loadAllDiagramsInBackground` is under the method limit). The layout engine in camel-diagram is not changed: the TUI places the rows again for a density (`RouteDensity`, `TopologyZoom`). ## Docs Help pages of the Diagram and Routes tabs, the footer hints, and a new "Zoom and Folding" section in `camel-jbang-tui-diagram.adoc` with the screenshot above. ## Testing - `mvn test` in `camel-jbang-plugin-tui`: 2259 tests, 0 failures, before the rebase onto current main. New tests: `RouteDensityTest`, `RouteDiagramZoomTest`, `TopologyZoomTest`, `DiagramTabLevelBarTest`, and an Esc-back case in `AbstractDiagramTabTest`. - Tried live in a running TUI on a route of about 40 steps (choice, doTry, split with filter, multicast) and its topology with nine routes. - The branch was rebased onto current main without conflicts; it has not been built against current main locally, so CI is the check for that. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
