davsclaus opened a new pull request, #24505:
URL: https://github.com/apache/camel/pull/24505

   ## Summary
   
   _Claude Code on behalf of davsclaus_
   
   The route diagram's mini tree preview (bottom-right overlay) now scrolls to 
keep the currently selected EIP node visible. Previously, the tree always 
rendered top-down from the root and truncated at `maxLines` (max 10 lines), so 
nodes deep in the tree (e.g., the end of an `otherwise` branch in a 
content-based router) were never shown.
   
   **Fix:** Build the full tree first, then window the output centered around 
the selected node's line index.
   
   - `RouteTreePreview.buildTree()` — builds all lines without a size limit, 
tracks which `TreeNode` each line corresponds to, finds the selected node's 
line index, and returns a `maxLines`-sized window centered on it
   - Added `RouteTreePreviewTest` with 4 tests covering: small tree fits 
without scrolling, scroll to bottom node, scroll to middle node, no selection 
shows from top
   
   ## Test plan
   
   - [x] `RouteTreePreviewTest` — 4 tests pass
   - [ ] Manual: run `camel run content-based-router.camel.yaml`, open TUI 
diagram, drill into route, navigate to `otherwise` → `log` — mini tree should 
scroll to show the selected node highlighted
   
   Co-Authored-By: Claude Opus 4.6 <[email protected]>


-- 
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]

Reply via email to